W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2013

[Bug 22851] [XQX30] simpleMapExpr

From: <bugzilla@jessica.w3.org>
Date: Mon, 09 Sep 2013 08:21:41 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-22851-523-TzZ49gdXjv@http.www.w3.org/Bugs/Public/>

--- Comment #2 from Tim Mills <tim@cbcl.co.uk> ---
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

  <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"/>

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Monday, 9 September 2013 08:21:43 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:53 UTC