completed A-642-05 (switch decision re parsing MapConstructorEntry)

> ACTION A-642-05 MDyck to update the spec to reflect NCName:*/*:NCName
> change to option 1a as per
> https://lists.w3.org/Archives/Public/public-xsl-query/2016Mar/0035.html
> [this is the decision regarding parsing MapConstructorEntry]

Done.

Specifically:

- In the xpath31 and xquery31 grammars, in the Wildcard production,
   I fused the terminal symbols into ":*" and "*:".

   (Didn't need to undo any '2b' changes, because I hadn't checked them in
   yet.)

- In the XPath/XQuery 3.1 docs:

   - At the end of A.2.2 "Terminal Delimitation", I dropped the bullet that
     requires symbol separators when the ":" of a MapConstructorEntry
     is followed by a QName, an NCName, or "*".

   - In 3.11.1.1 "Map Constructors", I expanded the Note re parsing:

       In some circumstances, it is necessary to include whitespace
       before or after the colon of a MapConstructorEntry to ensure
       that it is parsed as intended.

       For instance, consider the expression map{a:b}. Although it
       matches the EBNF for MapConstructor (with a matching MapKeyExpr
       and b matching MapValueExpr), the "longest possible match" rule
       requires that a:b be parsed as a QName, which results in a
       syntax error. Changing the expression to map{a :b} or map{a: b}
       will prevent this, resulting in the intended parse.

       Similarly, consider these three expressions:
         map{a:b:c}
         map{a:*:c}
         map{*:b:c}
       In each case, the expression matches the EBNF in two different ways,
       but the "longest possible match" rule forces the parse in which
       the MapKeyExpr is a:b, a:*, or *:b (respectively) and the
       MapValueExpr is c. To achieve the alternative parse (in which
       the MapKeyExpr is merely a or *), insert whitespace before and/or
       after the first colon.

       See A.2 Lexical structure.

These changes will be visible the next time Jonathan builds the docs.

-Michael

Received on Tuesday, 10 May 2016 15:08:25 UTC