[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] What to use instead of a mutable variable ?
Hello everebody,
I have something like this code in my xsl <xsl:template match="insertItem"> <xsl:for-each select="$book/itens"> <xsl:apply-templates select="$layout//insertItens/*" /> </xsl:for-each> </xsl:template> <xsl:template match="insertName"> <xsl:value-of select="$book/itens/name"/> </xsl:template> <xsl:template match="@*|*"> <xsl:copy> <xsl:apply-templates select="@*|node()" /> </xsl:copy> </xsl:template> How can I make the template "insertItens" to use a diferrent name everytime it is called? I want to achieve something like <xsl:template match="insertName"> <xsl:param name="position" /> <xsl:value-of select="$book/itens/name[$position]"/> </xsl:template> though I ca't call this template directly, because there is some nodes tha need to be "copied" to the output first when the "for each" is being processed. I needed an alterable global variable, but that is not possible in XSL. Did I explain the situation correctly? Thanks.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|