[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl:include
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: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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|