D
Daniel Frey
Hello
I'd like to match a dynamic node, given as a parameter to the
stylesheet. Something like:
<xsl:stylesheet ...>
<xslaram name="tomatch"/>
<xsl:template match="{$tomatch}">
Hallo
</xsl:template>
</xsl:stylesheet>
However, this seems not to be so simple, as "{" and if I remove the
parentesis the "$" are not allowed in the match value.
Certainly, I could take this as a row xslt and pre-transform it with
another script to merge the value of the variable into the {$tomatch}
location. However, then I would need two steps, one to create the
merged xslt, and another to transform the xml with it.
Is there a way to get it simlier? Any idea how to match dynamic nodes
given in parameters would be highly appreciated.
Thanks in advance.
Daniel Frey
I'd like to match a dynamic node, given as a parameter to the
stylesheet. Something like:
<xsl:stylesheet ...>
<xslaram name="tomatch"/>
<xsl:template match="{$tomatch}">
Hallo
</xsl:template>
</xsl:stylesheet>
However, this seems not to be so simple, as "{" and if I remove the
parentesis the "$" are not allowed in the match value.
Certainly, I could take this as a row xslt and pre-transform it with
another script to merge the value of the variable into the {$tomatch}
location. However, then I would need two steps, one to create the
merged xslt, and another to transform the xml with it.
Is there a way to get it simlier? Any idea how to match dynamic nodes
given in parameters would be highly appreciated.
Thanks in advance.
Daniel Frey