Copia xslt de todos los nodos a variable
¿Cómo se puede asignar a la variable una copia de otra variable que contenga un conjunto de nodos? Aquí está mi código:
<xsl:variable name="btchs" select="$idoc/E1EDL20/E1EDL24[./HIPOS != 0]"></xsl:variable>
<xsl:variable name="lines" select="$idoc/E1EDL20/E1EDL24[./HIPOS = 0]"></xsl:variable>
<xsl:variable name="cnt" select="count($btchs)"></xsl:variable>
<xsl:variable name="blines">
<xsl:choose>
<xsl:when test="$cnt=0">
Here I want to make a copy all nodes of $lines variable
</xsl:when>
<xsl:otherwise>
Here I want to make a copy all nodes of $btchs variable
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
Defino otra variable porque luego se usa como contador de bucle for-each.
<xsl:for-each select="$blines">
...
</xsl:for-each>