W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2016

[Bug 30015] New: TransformWithExpr and ArrowExpr grammar entries conflict for Update Facility 3.1

From: <bugzilla@jessica.w3.org>
Date: Sat, 19 Nov 2016 10:50:20 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-30015-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=30015

            Bug ID: 30015
           Summary: TransformWithExpr and ArrowExpr grammar entries
                    conflict for Update Facility 3.1
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Update 3.1
          Assignee: jonathan.robie@gmail.com
          Reporter: msclrhd@gmail.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

The Update Facility 3.0 grammar contains the constructs:

[96] CastExpr ::= TransformWithExpr ( "cast" "as" SingleType )?
[97] TransformWithExpr ::= UnaryExpr ( "transform" "with" "{" Expr? "}" )?
[98] UnaryExpr ::= ("-" | "+")* ValueExpr

The XQuery 3.1 Candidate Recommendation grammar contains the constructs:

[95] CastExpr ::= ArrowExpr ( "cast" "as" SingleType )?
[96] ArrowExpr ::= UnaryExpr ( "=>" ArrowFunctionSpecifier ArgumentList )*
[97] UnaryExpr ::= ("-" | "+")* ValueExpr

As such, it is unclear what order TransformWithExpr and ArrowExpr should be
applied in.

Using `ArrowExpr > TransformWithExpr` allows:

    $x => upper-case() transform with {}

Using `TransformWithExpr > ArrowExpr` allows:

    $x transform with {} => upper-case()

>From this, using `ArrowExpr > TransformWithExpr` would make more sense. That
would mean that the Update Facility 3.1 grammar would be:

[..] CastExpr ::= ArrowExpr ( "cast" "as" SingleType )?
[..] ArrowExpr ::= TransformWithExpr ( "=>" ArrowFunctionSpecifier ArgumentList
)*
[..] TransformWithExpr ::= UnaryExpr ( "transform" "with" "{" Expr? "}" )?
[..] UnaryExpr ::= ("-" | "+")* ValueExpr

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Saturday, 19 November 2016 10:50:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:58:03 UTC