Hello,
I have one template (which I cannot change but have to use), that processes the currently selected node, it might look like this (heavily simplified):
<xsl:template name="foreignTemplate">
<xsl:value-of select="." />
</xsl:template>
In XSLT 2.0 I could do something like this to bind "." in that template to an arbitrary variable:
<xsl:template match="dummyNode">
<xsl:variable name="inputString">foobar</xsl:variable>
<xsl:variable name="result" select="$inputString">
<xsl:call-template name="foreignTemplate" />
</xsl:variable>
</xsl:template>
Given this source document:
<?xml version="1.0"?>
<dummyNode>DUMMY TEXT</dummyNode>
applying the above transformation with an XSLT 2.0 processor would evaluate to "foobar".
However, in XSLT 1.0 xsl:variable-Elements cannot have a select attribute and be non-empty at the same time. How can I achieve the same result in XSLT 1.0?