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 2020 - R-042: Potential problem with particle derivation Choice:Choice rules
Summary: R-042: Potential problem with particle derivation Choice:Choice rules
Status: CLOSED LATER
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.0 only
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Henry S. Thompson
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-07 20:22 UTC by Sandy Gao
Modified: 2009-04-21 19:24 UTC (History)
0 users

See Also:


Attachments

Description Sandy Gao 2005-09-07 20:22:52 UTC
The particle derivation rules for "RecurseLax" appear to prohibit the following 
type derivation. Was this intentional, or should the rules be modified to 
permit such a derivation? The mail below suggests a possible modification of 
the rules.

<xs:complexType name="B">
 <xs:choice minOccurs="1" maxOccurs="1">
  <xs:group minOccurs="0" maxOccurs="1" ref="ChoiceGroup"/>
  <xs:element name="e"/>
 </xs:choice>
</xs:complexType>

<xs:complexType name="derived">
 <xs:complexContent>
  <xs:restriction base="xs:B">
   <xs:group minOccurs="0" maxOccurs="1" ref="ChoiceGroup"/>
  </xs:restriction>
 </xs:complexContent>
</xs:complexType>

<xs:group name="ChoiceGroup">
 <xs:choice>
  <xs:element name="e2"/>
  <xs:element name="e3"/>
 </xs:choice>
</xs:group>

See
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2001JulSep/0035.html
Comment 1 Sandy Gao 2005-09-07 20:23:45 UTC
As per issue 2002 (R-024), the WG has decided that although the rules have some 
awkward results, they are not in error. The issue will be added to a list of 
items to consider for a future revision of XML Schema.