ノードのセットを含む別の変数のコピーをどのように変数に割り当てることができますか?後でそれがために、各ループカウンタとして使用していますので、私は別の変数を定義xsltすべてのノードを変数
<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>
: はここに私のコードです。あなたはXSLT-1.0またはXSLT-2.0を使用している場合に依存
<xsl:for-each select="$blines">
...
</xsl:for-each>
''テスト条件によって 'call-template'を使うべきです。なぜあなたはもう一つの変数を定義し、 'btchs'または' lines'のうちの1つを割り当てたいのでしょうか? –
SomeDude