Union patterns in XSLT #1770
Labels
Enhancement
A change or improvement to an existing feature
PR Pending
A PR has been raised to resolve this issue
XSLT
An issue related to XSLT
The original XSLT 1.0 rule for union patterns such as
match="A|B"
said that the default priority was calculated as if there were two separate template rules withmatch="A"
andmatch="B"
. This became more complicated with the introduction ofxsl:next-match
in XSLT 2.0 - what should happen if the item matches both branches? It became more complicated again in XSLT 3.0 with the introduction ofon-multiple-match
- is it a multiple match if an item matches both branches? And in 4.0 it's complicated further by the introduction of constructs likematch="element(A|B)"
which is deemed equivalent tomatch=A|B
.I would like to break this cycle with a backwards-incompatible change. The default priority of a union pattern should be the numeric maximum of the default priorities of its branches; the treatment as being somewhat-equivalent to two separate template rules should go. We should encourage implementations to issue a compatibility warning if a union pattern appears with no explicit priority, and with multiple branches having different default priority.
The text was updated successfully, but these errors were encountered: