This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1442 - [XQX] Remove xs:choice
Summary: [XQX] Remove xs:choice
Status: CLOSED WONTFIX
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQueryX 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Jim Melton
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-13 23:54 UTC by Michael Rys
Modified: 2005-06-02 22:51 UTC (History)
0 users

See Also:


Attachments

Description Michael Rys 2005-05-13 23:54:27 UTC
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.
Comment 1 Jim Melton 2005-06-02 20:27:15 UTC
The XML Query Working Group has carefullyy discussed and considered your comment
and has concluded that the suggested change to the XQueryX specification is
neither necessary nor desirable.  In particular, it is felt that making the
suggested sort of change would cause the XQueryX schema to be less usable rather
than more. 

The Working Group has decided to close this issue with no changes to the XQueryX
specification. 

Please let us know if you agree with this resolution of your issue, by adding a
comment to the issue record and changing the Status of the issue to Closed. Or,
if you do not agree with this resolution, please add a comment explaining why.
If you wish to appeal the WG's decision to the Director, then also change the
Status of the record to Reopened. If you wish to record your dissent, but do not
wish to appeal the decision to the Director, then change the Status of the
record to Closed. If we do not hear from you in the next two weeks, we will
assume you agree with the WG decision.