[Bug 1442] New: [XQX]

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

           Summary: [XQX]
           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: mrys@microsoft.com
         QAContact: public-qt-comments@w3.org


Some object model generation tools cannot provide good objects in the presence 
of xs:choice. We therefore recommend to replace them as in the following 
example that shows how to represent the FLWR expression instead (using the 
complex type derivation approach):

  <!-- This is the flwor expression -->
  <xsd:complexType name="FLOWRExpression">
    <xsd:complexContent>
      <xsd:extension base="Expression">
        <xsd:sequence>
          <xsd:element name="ForLetClause" type="ForLetAbstractType" 
maxOccurs="unbounded" />
          <xsd:element name="WhereClause" type="Expression" minOccurs="0"/>
          <xsd:element name="orderByClause" type="OrderByClause" 
minOccurs="0"/>
          <xsd:element name="returnClause" type="Expression" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
 
  <xsd:complexType name="LetClauseType">
    <xsd:complexContent>
      <xsd:extension base="ForLetAbstractType">
        <xsd:sequence>
          <xsd:element name="LetClauseItem" type="LetClauseItem" 
maxOccurs="unbounded" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
 
  <xsd:complexType name="ForLetAbstractType" abstract="true" />

  <xsd:complexType name="ForClauseType">
    <xsd:complexContent>
      <xsd:extension base="ForLetAbstractType">
        <xsd:sequence>
	  <xsd:element name="ForClauseItem" type="ForClauseItem" 
maxOccurs="unbounded" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="ForClauseItem">
    <xsd:complexContent>
      <xsd:extension base="LetClauseItemType">
        <xsd:sequence>
          <xsd:element name="PositionalVariableBinding" type="xsd:QName" 
minOccurs="0" />
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

etc.

Received on Friday, 13 May 2005 23:54:31 UTC