XSLT 2.0 / XPath 2.0 中的saxon:if 和saxon:before函数是否有替代品?
我有这样的代码:
<xsl:variable name="stop"
select="(following-sibling::h:h1|following-sibling::h:h2)[1]" />
<xsl:variable name="between"
select="saxon:if($stop,
saxon:before(following-sibling::*, $stop),
following-sibling::*)" />
想法是between
变量应该包含当前节点和下一个h1
或元素之间的所有元素h2
(存储在stop
变量中),或者所有剩余的元素,如果没有下一个h1
或h2
。
我想在新的 XSLT 2.0 模板中使用此代码,并且我正在寻找saxon:if
和saxon:before
.