W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2002

Probs with XML Schema validations using SAX

From: Prakash Surendranadhan (EWU) <Prakash.Surendranadhan@ewu.ericsson.se>
Date: Wed, 12 Jun 2002 15:43:18 -0500
Message-ID: <ABE3B7D9D59ED311AEBC00508B0CAAE30B76B9D2@eamsdnt700.sd.us.am.ericsson.se>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
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 16:44:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:31 GMT