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

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