Subject: Re: [xsl] double pass in XSLT2 From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Date: Thu, 20 Feb 2003 19:07:25 +0000 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] double pass in XSLT2, Tobias Reif | Thread | [xsl] Reading the DocType in XSL, Gary Lawrence Murphy |
RE: [xsl] How to Save Transformed X, Michael Kay | Date | [xsl] xsl:for-each - RETRIEVING ONL, Mike Rudolph |
Month |