Bug 22851 - [XQX30] simpleMapExpr
Summary: [XQX30] simpleMapExpr
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQueryX 3.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Jim Melton
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
Reported: 2013-08-01 16:04 UTC by Tim Mills
Modified: 2013-09-26 08:37 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Tim Mills 2013-08-01 16:04:39 UTC
The conversion of a simpleMapExpr of the form

PathExpr1 | PathExpr2 | PathExpr3

requires rather a lot of markup.

Because simpleMapExpr is not itself a pathExpr, you end up with (roughly)


which seems excessively verbose (even for XQueryX!).  

Is this intentional, or have I missed something?
Comment 1 Jim Melton 2013-08-30 22:40:44 UTC
Thanks for the comment.  I cannot recall just now why it was necessary to make simpleMapExpr a sequenceExpt and not a pathExpr, but I suspect it was because I couldn't make it work as a pathExpr.  Or maybe it was because I didn't really think of the possibility. 

If you have a firm proposal to make a change to the XQueryX 3.0 schema and stylesheet that accomplishes the goal of retaining the current semantics without all of that syntax, please make that proposal.  There is certainly not much time remaining to do so, and I am personally out of time before leaving on a nearly 3-week international standards trip. 

I'm leaving this bug open (although it was tempting to mark it RESOLVED/WONTDO) in case you do have a detailed proposal in mind.
Comment 2 Tim Mills 2013-09-09 08:21:41 UTC
I'd suggest allowing simpleMapExpr to contain a sequence of two or more pathExpr, mirroring the XQuery grammar:

[106]    	SimpleMapExpr 	   ::=    	PathExpr ("!" PathExpr)*

(I've gone for 2 or more, rather than one or more, but I don't think it matters).

  <xsd:complexType name="simpleMapExpr">
      <xsd:extension base="expr">
        <xsd:sequence minOccurs="2" maxOccurs="unbounded"/>
          <xsd:element ref="pathExpr"/>

Here's the corresponding change to the transformation.

  <xsl:template match="xqx:simpleMapExpr">
    <xsl:value-of select="$LPAREN"/>
    <xsl:value-of select="$SPACE"/>
    <xsl:apply-templates select="xqx:pathExpr[1]"/>
    <xsl:value-of select="$SPACE"/>
    <xsl:value-of select="$RPAREN"/>

    <xsl:for-each select="xqx:pathExpr[position() != 1]">
      <xsl:value-of select="$NEWLINE"/>
      <xsl:value-of select="$EXCLAMATIONMARK"/>
      <xsl:value-of select="$SPACE"/>
      <xsl:value-of select="$LPAREN"/>
      <xsl:value-of select="$SPACE"/>
      <xsl:apply-templates select="." />
      <xsl:value-of select="$SPACE"/>
      <xsl:value-of select="$RPAREN"/>
Comment 3 Jim Melton 2013-09-26 01:15:20 UTC
The XML Query WG agreed during its teleconference of 2013-09-26 to make the changes that you propose in Comment 2.  Those changes have been made and are visible at http://www.w3.org/XML/Group/qtspecs/specifications/xqueryx-30/html/Overview.html

As a result of this decision and those changes, I have marked this bug RESOLVED/FIXED. 

The XQueryX 3.0 document will be reverted to Last Call WD, in which the status section will identify this specific change.  If no negative comments are received during the three-week Last Call review period, XQueryX 3.0 will be advanced directly to Proposed Recommendation. 

If you are satisfied with this action, please indicate by marking this bug CLOSED.
Comment 4 Tim Mills 2013-09-26 08:37:42 UTC
Thanks.  Closing...