Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
XML
Basic XSLT/XSLTC question
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Philippe Poulard, post: 771716"] Hi, It is also possible to store "XML constants" inside your stylesheet and refer to them with the document() function, that will be adressable with XPath (no extension required) : <xsl:stylesheet ... xmlns:xsl="..." xmlns:data="..."> <data:structures> <rainbow> <color>red</color> <color>blue</color> <color>green</color> </rainbow> </data:structures> <xsl:template match="/"> <xsl:variable name="rainbow" select="document('')/*/data:structures/rainbow"/> <xsl:for-each select="$rainbow/color"> <xsl:value-of select="."/> </xsl:for-each> </xsl:template> </xsl:stylesheet> -- Cordialement, /// (. .) -----ooO--(_)--Ooo----- | Philippe Poulard | ----------------------- [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
XML
Basic XSLT/XSLTC question
Top