【发布时间】:2010-12-11 21:26:31
【问题描述】:
saxon:if 有什么替代品吗? 和saxon:before XSLT 2.0 / XPath 2.0 中的函数?
我有这样的代码:
<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 的替代品。
【问题讨论】: