[Bug 22767] Default priority calculation for parenthesized patterns

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

Abel Braaksma <abel.braaksma@xs4all.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |abel.braaksma@xs4all.nl

--- Comment #3 from Abel Braaksma <abel.braaksma@xs4all.nl> ---
In the current internal WD, the following Note was added:

"The rules are based on the raw syntax of the pattern as written. So, for
example, enclosing a pattern in parentheses changes its priority; and the rule
that a template rule with match="a|b" is treated as two separate template rules
does not apply if the pattern is written as match="(a|b)"."

I'm not sure whether the editor's intention was to expand on this or change it
in a later draft.

This fixes the problem spec-wise, but I believe we can do better. It benefits
both users and implementations if they are allowed to remove the redundant
parenthesis, if and only if they encompass the whole expression.

Otherwise, we cannot rewrite (a | b) as a | b, which I think is odd and
counter-intuitive, and removes the ability to expand that expression as
multiple matching templates match="a" and match="b".

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

Received on Saturday, 27 July 2013 12:57:54 UTC