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

[Bug 29868] XQueryX stylesheet does not always convert arrowExpr to XQuery correctly

From: <bugzilla@jessica.w3.org>
Date: Fri, 23 Sep 2016 19:10:35 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29868-523-14RxZlg3OE@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29868

--- Comment #1 from Josh Spiegel <josh.spiegel@oracle.com> ---
I propose conditionally adding parens around <xsl:apply-templates select="."/>

  <xsl:template match="xqx:arrowExpr">
    <xsl:value-of select="$LPAREN"/>
    <xsl:value-of select="$SPACE"/>
    <xsl:apply-templates select="xqx:argExpr"/>
    <xsl:for-each select="*[not(self::xqx:argExpr) and
not(self::xqx:arguments)]">
      <xsl:text> =&gt; </xsl:text>
      <xsl:choose>
        <xsl:when test="self::xqx:EQName or self::xqx:variableRef">
          <xsl:apply-templates select="."/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="$LPAREN"/>
          <xsl:apply-templates select="."/>
          <xsl:value-of select="$RPAREN"/>
        </xsl:otherwise>
      </xsl:choose>
      <xsl:choose>
        <xsl:when test="following-sibling::*[1][self::xqx:arguments]">
          <xsl:for-each select="following-sibling::*[1][self::xqx:arguments]">
            <xsl:call-template name="parenthesizedList"/>
          </xsl:for-each>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="$LPAREN"/>
          <xsl:value-of select="$RPAREN"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:for-each>
    <xsl:value-of select="$SPACE"/>
    <xsl:value-of select="$RPAREN"/>
  </xsl:template>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 23 September 2016 19:10:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:58:02 UTC