更新时间:2023-02-19 20:34:53
查看您的 XSLT 片段,看起来您希望 blines
变量包含所有 E1EDL24
HIPOS
不为零的元素,如果不存在这样的元素,它应该包含所有 E1EDL24
其中 HIPOS
为零.
Looking at your XSLT fragment, it looks like you want the blines
variable to contain all the E1EDL24
elements where HIPOS
is not zero, and if no-such elements exist, it should contain all E1EDL24
where HIPOS
is zero.
如果是这种情况,您可以按如下方式定义 blines
变量,而不是尝试复制变量中的元素:
If this is the case, instead of trying to copy the elements in the variables, you could define the blines
variable as follows:
<xsl:variable name="blines" select="$btchs|$lines[not($btchs)]" />
这将引用源 XML 中的原始元素,而不是创建结果树片段,因此仍可查询.
This would reference the original elements in the source XML, rather than create a Result Tree Fragment, and so would still be queryable.