RE: [xsl] Reprocess template results in same stylesheet?

Subject: RE: [xsl] Reprocess template results in same stylesheet?
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Mon, 5 Jan 2004 04:50:49 -0800 (PST)
> You can do all the transformations in your pipeline in one stylesheet by
> performing transformations within variables, with each variable
> operating on the previous one.
> So, as top-level variables you could have:
> <xsl:variable name="firstVar-rtf"> 
>   <xsl:apply-templates/> 
> </xsl:variable> 
> <xsl:variable name="firstVar" select="exsl:node-set($firstVar-rtf)"/> 
> <xsl:variable name="secondVar-rtf"> 
>   <xsl:for-each select="$firstVar"> 

This will select just the root node (/) of the temporary tree contained in

Must be:

    <xsl:for-each select="$firstVar/node()"> 

>     <xsl:apply-templates/> 
>   </xsl:for-each> 
> </xsl:variable> 
> <xsl:variable name="secondVar" select="exsl:nodet-set($secondVar-rtf)"/>

> Here $firstVar operates on the source xml, and $secondVar works on the
> 'result' of the apply-templates in $firstVar.
> The final link in the chain is of course:
> <xsl:template match="/"> 
>   <xsl:for-each select="$lastVar"> 

The same problem:

Must be:

    <xsl:for-each select="$lastVar/node()"> 

Dimitre Novatchev.
FXSL developer -- the home of FXSL

Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003

 XSL-List info and archive:

Current Thread