This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: xsl:include


Hi Yue,

The xsl:include element is used to import templates into your
stylesheet, not xml data.

The way to import data from an external xml document is to use the
document() function, which switches the stylesheet's context to an
external file.

For example:	
<xsl:variable name="filename" select="document('x.xml')/FileID"/>

- Jason

-----Original Message-----
From: Yue Ma [mailto:may@mail.nlm.nih.gov] 
Sent: Thursday, January 31, 2002 12:59 PM
To: xsl-list@lists.mulberrytech.com
Subject: [xsl] xsl:include


Hi there,
How can I use xsl:include if I want something like this:
(If I have an XML called x.xml:
<FileID>
    Something
</FileID>
)
<xsl:stylesheet ....>
  <xsl:variable name="filename" select="//FileID"/>
  <xsl:include href="concat($filename,'.xsl')"/>
..
</xsl:stylesheet>

Looks like I can not do that....

Thanks
Yue


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]