xsl-list
[Top] [All Lists]

[xsl] multiple passes dont work

2011-02-18 04:47:34
Hi, 

I know i've asked a quite similar question recently but i can't seem to
realize this. 
I want to have one Stylesheet do do a few passes. (isntead of using more
than one stylesheet).

I did this:

<xsl:variable name="pass2">
                <xsl:apply-templates select="node()"/>
</xsl:variable>
        
        
<xsl:template match="* | processing-instruction()"> 
        <xsl:copy>
                <xsl:copy-of select="@*"/>
                <xsl:apply-templates/>
        </xsl:copy>
</xsl:template>
        
<xsl:template match="* | processing-instruction()" mode="second"> 
        <xsl:copy>
                <xsl:copy-of select="@*"/>
                <xsl:apply-templates/>
        </xsl:copy>
</xsl:template>


<xsl:template match="/">
        <xsl:apply-templates select="$pass2" mode="second"/>
</xsl:template>


There are also a couple of templates that actually do something. 
Most oft hem have no mode definend (for the first pass) and 1 of them
has mode="second".

Unfortunately the result looks just like it would look after the first
pass.

What am I doing wrong ?!

Kind regards

. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
 XSLT-Entwickler 
LexisNexis
Marxergasse 25, 1030 Wien

mailto:patrick(_dot_)szabo(_at_)lexisnexis(_dot_)at
Tel.: +43 (1) 534 52 - 1573 
Fax: +43 (1) 534 52 - 146 






--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>