[Bug 6733] New: [XQX] XQueryX for leading "/"

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6733

           Summary: [XQX] XQueryX for leading "/"
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQueryX
        AssignedTo: jim.melton@acm.org
        ReportedBy: andrew.eisenberg@us.ibm.com
         QAContact: public-qt-comments@w3.org


In Bug #5727, we agreed to add the following text to constraint
"leading-lone-slash" in Appendix A.1.2:

"Therefore to reduce the need for lookahead, if the token immediately following
a slash can form the start of a RelativePathExpr, then the slash must be the
beginning of a PathExpr, not the entirety of it."


Let's consider the following query:

(/) * 5


A user might write this as:

<?xml version="1.0"?>
<xqx:module xmlns:xqx="http://www.w3.org/2005/XQueryX"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.w3.org/2005/XQueryX
                                http://www.w3.org/2005/XQueryX/xqueryx.xsd">
  <xqx:mainModule>
    <xqx:queryBody>
      <xqx:multiplyOp>
        <xqx:firstOperand>
          <xqx:pathExpr>
            <xqx:rootExpr/>
          </xqx:pathExpr>
        </xqx:firstOperand>
        <xqx:secondOperand>
          <xqx:integerConstantExpr>
            <xqx:value>5</xqx:value>
          </xqx:integerConstantExpr>
        </xqx:secondOperand>
      </xqx:multiplyOp>
    </xqx:queryBody>
  </xqx:mainModule>
</xqx:module>


Our stylesheet translates this into (/*5), which is invalid.

We could change the stylesheet so that (/) * 5 is generated.

If we make no change, then the user would have to wrap the xqx:pathExpr in an
xqx:sequenceExpr element.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 24 March 2009 19:00:13 UTC