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 2177 - R-179: Defect in schema component model wrt enumeration and annotations
Summary: R-179: Defect in schema component model wrt enumeration and annotations
Status: ASSIGNED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Datatypes: XSD Part 2 (show other bugs)
Version: 1.0 only
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: needsDrafting
Depends on:
Blocks:
 
Reported: 2005-09-14 18:40 UTC by Sandy Gao
Modified: 2007-03-29 18:48 UTC (History)
0 users

See Also:


Attachments

Description Sandy Gao 2005-09-14 18:40:10 UTC
Consider the following example: 

<!-- other Address derivations for more countries -->
<simpleType name="USState">
 <restriction base="string">
  <enumeration value="AK">
   <annotation>lt;documentation>Alaska<documentation>lt;annotation>
  <enumeration>
  <enumeration value="AL">
    <annotation>lt;documentation>Alabama<documentation>lt;annotation>
  <enumeration>
  <enumeration value="AR">
    <annotation>lt;documentation>Arkansas<documentation>lt;annotation>
  <enumeration>
  < and so on ... -->
 <restriction>
<simpleType>

Per Part 2, http://www.w3.org/TR/xmlschema-2/#ct-enumeration 

{value} A set of values from the value space of the {base type definition}. 
{annotation} Optional. An annotation. 

and

Mapping XML Rep to schema components, 

{annotation} The annotations corresponding to all the <annotation> element 
information items in the [children], if any. 

and 

Schema Representation Constraint: Multiple enumerations 

If multiple <enumeration> element information items appear as [children] of a 
<simpleType> the {value} of the enumeration component should be the set of all 
such [value]s. 

This results in one enumeration component in the USState simple type 
component's {facets} property. That is, 

enumeration 
{value} = {AK, AL, AR, .. }
{annotation} = This is processor dependent.

This defect applies to enumeration and pattern schema components. This is not a 
critical issue and just a defect, I believe. 

See:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002OctDec/0000.html
Comment 1 Sandy Gao 2005-09-14 18:40:44 UTC
Discussed and resolved at the 2003-11-14 telecon
Comment 2 C. M. Sperberg-McQueen 2005-11-09 17:16:22 UTC
The fix to this bug should take into account the work done in 1.1
on the enumeration component.