开发者

List of XSLT instructions/functions that change the context node?

Does anyone know of a list of XSLT instructions/functions that change the context node?

开发者_JS百科

For example, instruction like for-each is one of them.


The obvious XSLT 2.0 instructions that change the context are for-each, apply-templates, for-each-group, and analyze-string. But there's also, for example, xsl:sort and xsl:key.

In XPath, the operators / and [] change the context. There are no functions that change the context.


There are only two things in XSLT 1.0 that change the context and neither of them are functions. These are:

<xsl:apply-templates select='some-test'/>

(which will lead to the selected nodes being processed, each one becoming the context node as it is processed)

and

<xsl:for-each select='some-test'/>

In XSLT 2.0, you also have

<xsl:for-each-group/>

(which sets the context node in slightly more complex way than xsl:apply-templates and xsl:for-each

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜