[Bug 2523] xqx: pathExpr and stepExpr

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





------- Additional Comments From jim.melton@acm.org  2005-12-25 00:31 -------
My apologies for leaving you confused. 

Upon further reflection (and additional discussions outside of the Bugzilla
context), I have concluded that your arguments are persuasive. 

In a previous response to this bug, I said that "starting a relativePathExpr
with an xpathAxis was just a bit strange".  Having considered your arguments at
greater length, I agree with you that making the initial xpathAxis optional in a
stepExpr leads to an inconsistency in the XQuery text that results from
transforming XQueryX using the XQueryX stylesheet.  I will now propose that the
leading xpathAxis be mandatory in stepExpr.  This will require a corresponding
change to Example 4. 

The revised solution that I intend to propose to the Working Groups will look
something like this: 

  <xsd:element name="stepExpr">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:choice>
          <xsd:sequence>
            <xsd:element ref="xpathAxis"/>
            <xsd:choice>
              <xsd:element ref="kindTest"/>
              <xsd:element ref="nameTest"/>
              <xsd:element ref="Wildcard"/>
             </xsd:choice>
          </xsd:sequence>
          <xsd:element name="filterExpr">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:group ref="filterExpr"/>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
        <xsd:element name="predicates" type="exprList" minOccurs="0"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

  <xsd:complexType name="pathExpr">
    <xsd:complexContent>
      <xsd:extension base="expr">
        <xsd:sequence>
          <xsd:element ref="stepExpr" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:element name="pathExpr" type="pathExpr" substitutionGroup="expr"/>

Your additional thoughts on this sort of solution would be welcomed.

Received on Sunday, 25 December 2005 00:32:21 UTC