W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2001

Simple type cannot be used in a derivation by RESTRICTION for a complexType.

From: <NJayaraman@tomax.com>
Date: Fri, 7 Sep 2001 19:32:33 -0400 (EDT)
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <OF64137043.6705B15C-ON87256AC0.0080FD48@tomax.com>
Hi All,
     I am recieving the above error message when I try to parse the
following xml. Please let me know how to solve this problem. In XML-spy it
works fine. xerces-J 1.4.2 fails.
Thanks !!

<xsd:complexType name="AddressLineType">
     <xsd:simpleContent>
         <xsd:restriction base="xsd:string">
             <xsd:attribute name="index" type="xsd:string" use="optional"
default="1"/>
         </xsd:restriction>
     </xsd:simpleContent>
</xsd:complexType>


Error message :
**Parsing Error**
 Line: 4
 URI: null
 Message: Schema error: ComplexType 'AddressLineType': ct-props-correct.2:
The type 'xsd:string' is a simple type.  It cannot be used in a derivation
by RESTRICTION for a complexType.
main:org.xml.sax.SAXException: Error Encountered
Received on Monday, 10 September 2001 10:11:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 22 July 2006 00:12:44 GMT