I have something like the following code::
<xsl:variable name="sample">
<xsl:copy-of select="//foo">
<xsl:copy-of select="//bar">
</xsl>
And in a template I’d like to use:
<xsl:for-each select="$sample/*">
<!-- do something -->
</xsl:for-each>
However, $sample/* does not seem to be a valid xpath expression or return a node-set and I can't quite figure out, how to fix it.
I also tried just plain $sample, but that isn't a node-set either :/
Any ideas, what I’m doing wrong?