Does anyone know of a list of XSLT instructions/functions that change the context node?
For example, instruction like for-each
is one of them.
Does anyone know of a list of XSLT instructions/functions that change the context node?
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
, andanalyze-string
. But there's also, for example,xsl:sort
andxsl: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:
(which will lead to the selected nodes being processed, each one becoming the context node as it is processed)
and
In XSLT 2.0, you also have
(which sets the context node in slightly more complex way than
xsl:apply-templates
andxsl:for-each