Subject: Re: [xsl] grouping + global variable (?) (was re: regexs, From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx> Date: Thu, 12 Aug 2004 18:07:56 -0400 |
2. Extended XSLT 1.0: create your first result by applying templates to your source and binding the results to a variable, which you then use a processor extension to turn into a node set for further processing. You'll probably need modes (if only to keep yourself sane), so:
<xsl:variable name="intermediate-result"> <xsl:apply-templates select="/" mode="pass1"/> </xsl:variable>
<xsl:template match="/">
<xsl:apply-templates select="exslt:node-set($intermediate-result)" mode="pass2"/>
</xsl:template>
<xsl:template match="/" mode="pass1"> <xsl:apply-templates select="pass1"/> </xsl:template>
where exslt:node-set is an extension function that creates a node-set from a result-tree-fragment (see exslt.org or consult your processor's documentation).
3. XSLT 2.0 -- same as 2, except no extension function is needed: it'll happen transparently.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] grouping + global variabl, Wendell Piez | Thread | Re: [xsl] grouping + global variabl, Wendell Piez |
Re: [xsl] grouping + global variabl, Wendell Piez | Date | [xsl] XSL length output, prenom nom |
Month |