Re: [xsl] xsl:include

Subject: Re: [xsl] xsl:include
From: Yue Ma <may@xxxxxxxxxxxxxxxx>
Date: Wed, 06 Feb 2002 10:31:59 -0500
I think I confused you guys. ;-)
I don't really want to include an XML file but a dynamic XSL, which its
name is determined
by reading a content data from an XML.
Since XPath does not allow variable appear in the path string, so I think
I just simply can not archive
what I want.....

Thanks
Yue

Jason Macki wrote:

> 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@xxxxxxxxxxxxxxxx]
> Sent: Thursday, January 31, 2002 12:59 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> 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


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


Current Thread