Re: double pass in XSLT2
Hi Tobi, > how would I write a double pass (eg > http://www.biglist.com/lists/xsl-list/archives/200302/msg00306.html ) > in XSLT2? Just drop the xx:node-set() call -- in XSLT 2.0 a variable set using its content gets set to the document node of the tree constructed by the content: <xsl:variable name="temp"> <xsl:apply-templates select="/" mode="phase1"/> </xsl:variable> <xsl:template match="/"> <xsl:apply-templates select="$temp" mode="phase2"/> </xsl:template> I prefer the $temp variable to be declared within the template for the document node, but that's just a stylistic thing. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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