Support #6170
closedWhich XSLT instructions actually change the context-node before processing the children?
0%
Description
I am looking for all the XSLT instructions that actually change the context-node before processing the children.
According to [[https://www.w3.org/TR/xslt-30/#additional-dynamic-context]] , these are all the elements and attributes:
- accumulator/@match
- analyze-string/@select
- apply-templates/@select
- for-each/@select
- for-each-group/@group-adjacent
- for-each-group/@group-by
- for-each-group/@group-ending-with
- for-each-group/@group-starting-with
- for-each-group/@select
- key/@match
- number/@count
- number/@from
How can I be sure that this is the correct list?
Updated by Michael Kay over 1 year ago
This isn't actually the best place for questions about the W3C specification, but I'll do my best...
There are clearly omissions from your list, such as xsl:iterate
, xsl:merge
, and xsl:sort
. The list you point to is primarily about parts of the dynamic context other than the context item itself.
I don't think there is any central list of things that change the context item. §5.3.3.1 talks about the principles, but says:
In other cases (for example, where the containing element is xsl:sort, xsl:with-param, or xsl:key), the rules are given in the specification of the containing element.
I think there are one or two cases that are still underspecified in the XSLT 3.0 spec, for example it's not entirely clear what the context is for evaluating xsl:param/@select.
Updated by Philip Fearon over 1 year ago
For changing the context node, do these count also?
xsl:copy with @select
xsl:perform-sort
xsl:merge-source
xsl:source-document
Updated by Gerben Abbink over 1 year ago
Can I tell from the Saxon source code which instructions change the
context-node?
On Tue, Aug 15, 2023 at 9:39 PM Saxonica Developer Community <
notifications@plan.io> wrote:
Updated by Michael Kay over 1 year ago
You can look for calls of XPathContext.setCurrentIterator()
Please register to edit this issue