W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2013

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

From: <bugzilla@jessica.w3.org>
Date: Tue, 23 Jul 2013 09:18:30 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-22767-523@http.www.w3.org/Bugs/Public/>
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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:53 UTC