[Bug 29210] [xslt30] xsl:apply-imports and xsl:next-match from within xsl:override

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29210

--- Comment #4 from Michael Kay <mike@saxonica.com> ---
In relation to (B), note also that an xsl:use-package can have more than one
xsl:override child, and that multiple overriding template rules for a given
mode are therefore not necessarily siblings of each other.

The wording I have adopted is:

<quote>
Because a template rule declared as a child of <elcode>xsl:override</elcode>
has higher precedence than any template rule declared in the used package (see
<specref ref="modes-and-packages"/>), the effect of
<elcode>xsl:next-match</elcode> within such a template rule is to consider as
candidates first any other template rules <phrase diff="chg"
at="S-bug29210">for the same mode within the same
<elcode>xsl:use-package</elcode> element (taking into account explicit and
implicit priority, and document order, in the usual way), and then all template
rules in the used package.
</quote>

Concerning (C), I am inserting the following before the paragraph "If no
matching template rule is found" in section 6.8:

<quote>
If a matching template rule R is found, then the result of the xsl:next-match
or xsl:apply-imports instruction is the result of invoking R, with the values
of parameters being set using the child xsl:with-param elements as described in
ยง9.10. The template rule R is evaluated with the same focus as the
xsl:next-match or xsl:apply-imports instruction. The current template rule
changes to be R. The current mode does not change. 

Note: In the case where the current template rule T is declared within an
xsl:override element in a using package P, while the selected rule R is
declared within a different package Q, and where the current mode is M/P, the
effect is that the current mode for evaluation of R remains M/P rather than
reverting to its corresponding mode M/Q. If R contains an xsl:apply-templates
instruction that uses mode="#current", then the set of template rules
considered by this instruction will include any overriding template rules
declared in P as well as the original rules declared in Q.
</quote>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 22 October 2015 21:58:35 UTC