Project

Profile

Help

Feature #6030

closed

in xsl:next-match documentation topic, mention that non-tunneling parameters are not automatically propagated to the next-matching template

Added by Chris Papademetrious 12 months ago. Updated 11 months ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2023-05-10
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

Section 6.8 Overriding Template Rules of the XSLT 3.0 spec states the following about how parameters are passed to the next-matching template:

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 Setting Parameter Values.

The Saxonica documentation for xsl:apply-imports has a full paragraph on parameter behavior, but the documentation for xsl:next-match does not say anything about parameters.

At a minimum, I suggest adding something like this (feel free to edit for style):

Non-tunneling parameters that would have reached the next-matching template are not automatically passed; only non-tunneling parameters explicitly declared with xsl:with-param are passed.

This aspect is difficult to learn the hard way, especially when using xsl:next-match to implement overrides within someone else's code. I understand the desire not to replicate the XSLT specification in Saxonica's documentation. However, this is an important aspect of template overrides that is not obvious (to me) from the XSLT 3.0 specification without deliberate reading to notice it.

Please register to edit this issue

Also available in: Atom PDF