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

RE: schema validation error

From: Priscilla Walmsley <priscilla@walmsley.com>
Date: Tue, 16 Apr 2002 15:09:31 -0400
Message-ID: <01C1E558.B9B4C840.priscilla@walmsley.com>
To: "'Marko Asplund'" <aspa@kronodoc.fi>, "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>

I've seen this message before, when you are trying to restrict a simple 
type to result in a complex type with simple content.  For example, if the 
type for one of your elements looks like:

<xs:element name="EXT">
			<xs:restriction base="xs:integer">
				<xs:minExclusive value="1"/>

It should really be:

<xs:element name="EXT">
		<xs:restriction base="xs:integer">
			<xs:minExclusive value="1"/>

If this is not the problem you are having, please send along the schema and 
we'll take a look at it.

As far as hints for locating the problem, in this case Xerces found a 
problem with a type that was anonymous.  So, it gave it the name 
'#AnonType_EXT' which I believe is just #AnonType_ plus the element name 
(EXT), or perhaps it is the element E within the scope of the element X   
within the scope of the element T (you tell me!) .  The problem it 
identified is shown as src-ct.2.  This error can be traced back to Appendix 
C.3 of the Structures recommendation [1], where it provides a link to the 
actual constraint that was violated.  In this case the violated constraint 
is Complex Type Definition Representation OK, clause 2 (as evidenced by the 

Hope that helps!


Priscilla Walmsley             priscilla@walmsley.com
Author, Definitive XML Schema     (Prentice Hall PTR)

[1] http://www.w3.org/TR/xmlschema-1/

-----Original Message-----
From:	Marko Asplund [SMTP:aspa@kronodoc.fi]
Sent:	Monday, April 15, 2002 9:42 AM
To:	xmlschema-dev@w3.org
Subject:	schema validation error

i'm using Xerces2 v2.0.1 SAX2 API for validating a XML document based on
XML schema with the following parser validation options:


the schema has been constructed using TIBCO Extensibility TurboXML v2.2.1. 
schema validation process stops with the following error on a XML document

parse error, line: 9, col: 37, sys: file:///tmp/wgspd8786.tmp, pub: null
parse error: org.xml.sax.SAXParseException: src-ct.2: Complex Type 
Definition Representation Error for type '#AnonType_EXT'.  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.

the Sun schema validation package succesfully validates the same document
instance. the reason for this validation problem seems to be somekind of
type definition inconsistency between the schema and the document. as my
experience in debugging schema validation errors is very limited i'd
appreciate any hints on how to locate the source for this inconsistency on
XML element level.

best regards,

Received on Tuesday, 16 April 2002 15:06:51 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:56 UTC