[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: 2 XML Files, 1 XSLt Output to HTML
McDonald, Shaun wrote:
XSLT Version 1.0: <xsl:template match="n1:share"> <xsl:variable name="x" select="@item" /> <xsl:variable name="xx" select="@loc" /> <xsl:for-each select="document(@loc)"> <xsl:value-of select="current()"/> </xsl:for-each> </xsl:template> You are using <xsl:value-of> here. Surely that's not what you want. You don't want the *value* (which returns a string representation of the nodes in the select expression) but a *copy* of all the nodes. Change "value-of" to "copy-of" and you are done (it will copy comment nodes and processing instructions as well but not the opening xml declaration). Another little thing, why the for-each? You can remove it and just use: <xsl:copy-of select="document(@loc)" /> (it is only from xslt 2.0 that document(xx) function can be used on a sequence and will return multiple documents, in which case the for-each could make sense) Cheers, -- Abel Braaksma http://www.nuntia.com
|
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
|