J
Jean-Christophe Michel
Hi,
I have a stylesheet with an accumulator like this
<xslaram name="new-x">
<xsl:for-each select="anode">
<mynode>
<xsl:attribute name="attr">
<xsl:value select="anode/atag" />
</xsl:attribute>
</mynode>
</xsl:for-each>
<xsl:copy-of select="$x" />
</xslaram>
if I test with
<print-x>
<xsl:copy-of select="$new-x" />
</print-x>
i get the expected output:
<print-x>
<mynode attr="foo1" />
<mynode attr="foo2" />
<mynode attr="foo3" />
</print-x>
but later in the same template
count($new-x) returns 1
and
<xsl:for-each select="$new-x">
<xsl-value-of select="@attr" />
</xsl:for-each>
returns an empty result...
Some tips ?
I use xsltproc under debian sid.
I have a stylesheet with an accumulator like this
<xslaram name="new-x">
<xsl:for-each select="anode">
<mynode>
<xsl:attribute name="attr">
<xsl:value select="anode/atag" />
</xsl:attribute>
</mynode>
</xsl:for-each>
<xsl:copy-of select="$x" />
</xslaram>
if I test with
<print-x>
<xsl:copy-of select="$new-x" />
</print-x>
i get the expected output:
<print-x>
<mynode attr="foo1" />
<mynode attr="foo2" />
<mynode attr="foo3" />
</print-x>
but later in the same template
count($new-x) returns 1
and
<xsl:for-each select="$new-x">
<xsl-value-of select="@attr" />
</xsl:for-each>
returns an empty result...
Some tips ?
I use xsltproc under debian sid.