詳見鏈接里倒數第二個例子: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="https://bbs.csdn.net/topics/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:"是啥意思? 謝謝
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/125247.html
標籤:XML/XSL
下一篇:VUE的生命周期鉤子及執行程序
