[Bug 22767] New: Default priority calculation for parenthesized patterns

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

            Bug ID: 22767
           Summary: Default priority calculation for parenthesized
                    patterns
    Classification: Unclassified
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
          Assignee: mike@saxonica.com
          Reporter: vyudenkov@hotmail.com
        QA Contact: public-qt-comments@w3.org

The "XSL Transformations (XSLT) Version 3.0" working draft specification of 10
July 2012 defines EBNF for patterns, which allows parenthesized patterns.

At the same time in section 6.5 doesn't have special rule for parenthesized
expression, the only:

     11. In all other cases, the priority is +0.5.

Therefore, if I use pattern "/", then it's default priority calculated as
"-0.5". But if to write match="(/)" - the priority will be "+0.5".
It confuses me, because I thought that "/" and "(/)" could be used as
equivalent expressions.


Similar misunderstanding could be when I use union in parenthesized expression,
for example: patterns "a | b" vs "(a | b)":

The first pattern is an equivalent to two separate template rules: match="a"
and match ="b". And each separate template rule has it's own default priority -
"0".
The second pattern we could not devide into two separate template rules,
therefore the default priority is calculated to whole pattern and equals
"+0.5".

Thank you, 
Vitaliy

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

Received on Tuesday, 23 July 2013 09:18:32 UTC