This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Passing Parameters or ?
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Passing Parameters or ?
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Thu, 29 Mar 2001 10:15:44 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> I am new to XSL so the following may seem trivial, but I
> could not find the answer in the
> FAQ. How does one pre-process a document or node and then use
> the result in a second pass?
>
Like this:
<xsl:variable name="temp-tree-1">
<xsl:apply-templates select="/" mode="phase1"/>
</xsl:variable>
<xsl:variable name="temp-tree-2">
<xsl:apply-templates select="xx:node-set($temp-tree-1)" mode="phase2"/>
</xsl:variable>
<xsl:template match="/">
<xsl:apply-templates select="xx:node-set($temp-tree-2)" mode="phase3"/>
</xsl:template>
The xx:node-set() is an extension function supplied by your favourite
vendor.
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list