请教xslt的一个例子

cmf41013 2019-12-04 09:41:02
详见链接里倒数第二个例子:Example: Output Hierarchic Section Numbers。

https://www.w3.org/TR/2017/REC-xslt-30-20170608/#accumulator-examples
代码如下:

<xsl:accumulator name="section-nr" as="xs:integer*"
initial-value="0">
<xsl:accumulator-rule match="section" phase="start"
select="0, head($value)+1, tail($value)"/>
<xsl:accumulator-rule match="section" phase="end"
select="tail($value) (:pop:)"/>
</xsl:accumulator>

<xsl:template match="section">
<p>
<xsl:value-of select="reverse(tail(accumulator-before('section-nr')))"
separator="."/>
</p>
<xsl:apply-templates/>
</xsl:template>


请问。xsl:accumulator声明里第二个<xsl:accumulator-rule>中,":pop:"是啥意思? 谢谢

...全文
123 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

8,909

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧