This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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) <simpleMapExpr> <pathExpr> <stepExpr> <filterExpr> <sequenceExpr> <simpleMapExpr> PathExpr1 PathExpr2 </simpleMapExpr> </sequenceExpr> </filterExpr> </stepExpr> </pathExpr> PathExpr3 </simpleMapExpr> which seems excessively verbose (even for XQueryX!). Is this intentional, or have I missed something?
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.
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:complexContent> <xsd:extension base="expr"> <xsd:sequence minOccurs="2" maxOccurs="unbounded"/> <xsd:element ref="pathExpr"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> 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"/> </xsl:for-each> </xsl:template>
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.
Thanks. Closing...