Re: Enumerations inside elements with attributes

> 
> The WG has approved a change to the syntax which allows nesting
> anonymous simple types in the case, which will look something like
> this:
> 
> <element name="fruit" xmlns="http://www.w3.org/2000/08/XMLSchema">
>  <complexType>
>   <simpleContent>
>     <extension>
>      <simpleType>
>        <restriction base="string">
>         <enumeration value="apple"/>
>         <enumeration value="orange"/>
>         <enumeration value="peach"/>
>        </restriction>
>      </simpleType>
>      <attribute name="source" type="string"/>
>     </extension>
>   <simpleContent>
>  </complexType>
> </element>

I am very new to reading the normative element definitions found in the
WD, however the following definition for the "complexType" item:

<complexType

   abstract = boolean : false 
   base = QName 
   block = #all or (possibly empty) subset of {extension, restriction} 
   content = elementOnly | empty | mixed | textOnly 
   derivedBy = extension | restriction 
   final = #all or (possibly empty) subset of {extension, restriction} 
   id = ID 
   name = NCName> 
   Content: (annotation? , (((minExclusive | minInclusive | maxExclusive
| maxInclusive | precision | scale | length | minLength | maxLength |
encoding | period | duration | enumeration | pattern)* | (element |
group | all | choice | sequence | any)*) , ((attribute |
attributeGroup)* , anyAttribute?))) 
 </complexType>

Gives me the distinct impression that the "enumeration" element and all
other facets (e.g. minInclusive, pattern) are allowed inside the
"complexType" element.  Am I reading this incorrectly?

XSV reports that a schema has an error when complexType includes
enumerations or other facets.

Ian.

-- 
ian.stokes-rees@decisionsoft.com          tel: +1865 203 192
DecisionSoft Ltd.                         fax: +1865 203 194
www.decisionsoft.com                      Oxford, UK, OX2 OEA

Received on Tuesday, 29 August 2000 13:43:22 UTC