simpleContent restriction: Xerces vs xmlspy and turboxml

Greetings,

We are trying to resolve an issue relating to simpleContent restriction in a complexType.  Specifically, in the code snip below, Xerces flags the error: 

"A simple type definition, http://www.w3.org/2001/XMLSchema:string, cannot be the basetype of a complex type definition derived by restriction"

Here is another error report stating the same thing:
http://lists.w3.org/Archives/Public/xmlschema-dev/2001Sep/0011.html

Yet the makers of 2 widely used schema editors state that is this in fact not an error and that Xerces is wrong.  XMLSPY (Altova) and TurboXML (Tibco) both tell me that the code is valid and refer to these links:

http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#declare-type
http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-simpleContent::restriction
http://www.w3.org/TR/xmlschema-1/#Complex_Type_Definitions

   <element name="FormattedName" minOccurs="0" maxOccurs="unbounded">
    <complexType>
     <simpleContent>
      <restriction base="string">
       <attribute name="type" default="presentation">
        <simpleType>
         <restriction base="string">
          <enumeration value="presentation"/>
          <enumeration value="legal"/>
          <enumeration value="sortOrder"/>
         </restriction>
        </simpleType>
       </attribute>
      </restriction>
     </simpleContent>
    </complexType>
   </element>


I can see why one could say that using <extension> rather then <restriction>  better models what is happening here, but I don't see where this is considered invalid.  
Whom would you say is correct Xerces or XMLSPY and TurboXML?

Thank you in advance,

Paul Kiel
HR-XML Consortium

Received on Monday, 19 November 2001 14:28:43 UTC