This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: xsl:include
- From: "Jason Macki" <jmacki at iisd dot ca>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 4 Feb 2002 15:39:54 -0600
- Subject: RE: [xsl] xsl:include
- Reply-to: xsl-list at lists dot mulberrytech dot com
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