This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27026 - [XSLT30] EBNF incompatibility between XP31 MapConstructor and XSLT30 MapExpr
Summary: [XSLT30] EBNF incompatibility between XP31 MapConstructor and XSLT30 MapExpr
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-12 14:05 UTC by Abel Braaksma
Modified: 2014-10-24 11:33 UTC (History)
0 users

See Also:


Attachments

Description Abel Braaksma 2014-10-12 14:05:51 UTC
In XP31 the MapConstructor is defined as:

MapConstructor ::= "map" "{" (MapConstructorEntry ("," MapConstructorEntry)*)? "}"
MapConstructorEntry ::= MapKeyExpr ":" MapValueExpr

In XSLT30 the MapExpr is defined as:

MapExpr ::= "map{" (KeyExpr ":" ValueExpr ("," KeyExpr ":" ValueExpr )*)? "}"

Functionally, these are equal. However, the XP31 production allows a space between the keyword "map" and the opening curly (the production is not marked ws-explicit), whereas XSLT30 does not allow such space.

I propose to allow that space in XSLT30 as well:

MapExpr ::= "map" "{" (KeyExpr ":" ValueExpr ("," KeyExpr ":" ValueExpr )*)? "}"
Comment 1 Michael Kay 2014-10-13 09:58:57 UTC
I agree, we should allow the whitespace between "map" and "{", and it would do no harm to align the way the BNF is written so that people can see that it's the same.
Comment 2 Michael Kay 2014-10-24 11:33:16 UTC
The WG accepted the proposal and it has been implemented.