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

[Bug 2523] xqx: pathExpr and stepExpr

From: <bugzilla@wiggum.w3.org>
Date: Tue, 15 Nov 2005 01:21:05 +0000
To: public-qt-comments@w3.org
Message-Id: <E1EbpVR-0004dn-M9@wiggum.w3.org>


           Summary: xqx: pathExpr and stepExpr
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          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

Xquery's PathExpr production is a very simple

[68] PathExpr ::=
  ("/" RelativePathExpr?)
| ("//" RelativePathExpr)
| RelativePathExpr

[69] RelativePathExpr ::=
  StepExpr (("/" | "//") StepExpr)*

so a sequence of steps, separated by / or //.

XqueryX on the other hand has a strange unexplained optional first child
   <xsd:sequence minOccurs="0">
            <xsd:element name="argExpr" type="exprWrapper"/>
            <xsd:element name="predicates" type="exprList" minOccurs="0"/>

which doesn't seem to add anything, and complicates the schema and transforms to
and from XqueryX, Is there any reason not to delete this (or replace it by an
optional xqx:rootExpr), and bring XqueryX closer to the Xquery production?

Similarly XQueryX StepExpr is rather strange,with nameTest and Wildcard
appearing twice:

            <xsd:element ref="xpathAxis"/>
              <xsd:element ref="kindTest"/>
              <xsd:element ref="nameTest"/>
              <xsd:element ref="Wildcard"/>
          <xsd:element ref="nameTest"/>
          <xsd:element ref="Wildcard"/>

so in XqueryX if the step is a nameTest or WildCard the explict axis specifier
is optional (although in all the examples in the specification of name tests,
all but the last two, the child:: axis is made explict) However for kindtests
which the XQuery grammar treats identically to nameTests, XQueryX makes the axis
specifier mandatory. Why this inconsistency? I would propose that the last two
lines of the above schema extract are deleted, thus making the axis specifier
mandatory in XQueryX, this would be consistent with other treatment of
abbreviated XPath syntax such as //and @, forcing that it be expanded.

Received on Tuesday, 15 November 2005 01:21:07 UTC

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