W3C home > Mailing lists > Public > public-qt-comments@w3.org > October 2005

[Bug 2348] [xqueryx] lost parenthesis

From: <bugzilla@wiggum.w3.org>
Date: Mon, 17 Oct 2005 22:23:30 +0000
To: public-qt-comments@w3.org
Message-Id: <E1ERdOE-0000hS-1a@wiggum.w3.org>


           Summary: [xqueryx]  lost parenthesis
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQueryX
        AssignedTo: jim.melton@acm.org
        ReportedBy: davidc@nag.co.uk
         QAContact: public-qt-comments@w3.org

The "natural" XqueryX encoding of the Xquery
<a/>/(for $x in 1 return $x)

is translated by the stylesheet to

 for $x in 1
 return $x

which is a syntax error. As xqx:parenthesizedExpr does not cause () to be added
and (unlike xqx:addOp etc) xqx:filterExpr does not put a () group around its

To be specific about the xqueryx, it's included at the end of this message.
A workaround would be to use xqx:sequenceExpr instead of xqx:parenthesizedExpr 
as that always translates to () but parenthesizedExpr is more natural here
(and corresponds to the production in the EBNF for this expression).

I accept that this will probably be deferred until the next round, but I wanted
to post it now anyway so it didn't get lost.

I think simplest fix would be to add a template for
xqx:filterExpr/xqx:parenthesizedExpr that adds ().


<xqx:module xmlns:xqx="http://www.w3.org/2005/XQueryX">
Received on Monday, 17 October 2005 22:23:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:09 UTC