RE: Probs with XML Schema validations using SAX

It isn't syntactically correct and the error message tells you why and I quote: 
 
" When simpleContent is used, the base type must be a complexType whose content type is simple, or, only if extension is specified, a simple type." 

 -----Original Message----- 
 From: Prakash Surendranadhan (EWU) [mailto:Prakash.Surendranadhan@ewu.ericsson.se] 
 Sent: Wed 6/12/2002 1:43 PM 
 To: 'xmlschema-dev@w3.org' 
 Cc: 
 Subject: Probs with XML Schema validations using SAX
 
 

 Hi, 

 I am encountering the following error when I try to validate my XML file against its Schema. 

 Here is the Schema section that generates this error 

 <xs:element name="hoppers"> 
                                         <xs:complexType> 
                                                 <xs:sequence> 
                                                         <xs:element name="hopper" minOccurs="0" maxOccurs="unbounded"> 
                                                                 <xs:complexType> 
                                                                         <xs:simpleContent> 
                                                                                 <xs:restriction base="xs:string"> 
                                                                                         <xs:attribute name="identity" type="xs:ID" use="required"/>

                                                                                         <xs:attribute name="instance" type="xs:IDREF" use="required"/>

                                                                                         <xs:attribute name="type" default="down">

                                                                                                 <xs:simpleType> 
                                                                                                         <xs:restriction base="xs:NMTOKEN">

                                                                                                                 <xs:enumeration value="up"/>

                                                                                                                 <xs:enumeration value="down"/>

                                                                                                                 <xs:enumeration value="side"/>

                                                                                                         </xs:restriction>

                                                                                                 </xs:simpleType> 
                                                                                         </xs:attribute> 
                                                                                         <xs:attribute name="target" type="xs:string" use="required"/>

                                                                                         <xs:attribute name="mib" type="xs:string" use="required"/>

                                                                                 </xs:restriction> 
                                                                         </xs:simpleContent> 
                                                                 </xs:complexType> 
                                                         </xs:element> 
                                                 </xs:sequence> 
                                         </xs:complexType> 
                                 </xs:element> 



  and this is the error at the CLI 

 D:/Working/XML/out>java sax.SAXCount -v BSS_ResActvnBSS0.xml 
 [Error] BSS_ResActvnBSS0.xml:4:108: src-ct.2: Complex Type Definition Representation Error for type '#AnonType_hopperhopperstop'.  When simpleContent is used, the base type must be a complexType whose content type is simple, or, only if extension is specified, a simple type.

 From what I understand this is syntactically correct, so anybody has any ideas as to what is going wrong. 

 Thanks 
 Prakash 

Received on Wednesday, 12 June 2002 17:19:39 UTC