W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2003

Xsd Include Validation Error

From: Wirth, Kevin <Kevin.Wirth@kcc.com>
Date: Thu, 31 Jul 2003 13:51:53 -0500
Message-ID: <7788E2A51C96D3119D6B0008C791E2301714BC17@ustcax10.kcc.com>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>


Looking for some help with this pair of XSD's.  The T1.xsd (1st xsd) is used
to declare type that are included.  As you can see DataTypeType extends
DataType1Type within it's own XSD.  I've used .Net's Schema validator and T1
by itself validates.

The problem comes in with using it as an include.  When I validate the
T1Test.xsd (which includes T1) the validator errors with a message of :
"T1Test.xsd(15): Type 'DataType1Type' is not declared. An error occurred at
file:///T1.xsd(15 <file:///T1.xsd(15> , 3)." which points to the
DataTypeType declaration.

Can anyone provide any insight on this?

Any help[ greatly appreciated.

Kevin Wirth

T1.Xsd (included)
<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	<xsd:simpleType name="DataType1Type">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="string" />
			<xsd:enumeration value="byte" />
			<xsd:enumeration value="unsignedByte" />
			<xsd:enumeration value="binary" />
			<xsd:enumeration value="integer" />
			<xsd:enumeration value="Other" />
	<xsd:complexType name="DataTypeType" >
			<xsd:extension base="DataType1Type">
				<xsd:attribute name="OtherValue"
type="xsd:string" />

<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema id="T1Test" 
	<xsd:include schemaLocation="T1.xsd" />

	<xsd:complexType name="Testelement1">
			<xsd:element name="Prop1" type="xsd:string" />
			<xsd:element name="Prop2" type="xsd:string" />

This e-mail is intended for the use of the addressee(s) only and may contain
privileged, confidential, or proprietary information that is exempt from
disclosure under law.  If you have received this message in error, please
inform us promptly by reply e-mail, then delete the e-mail and destroy any
printed copy.   Thank you.
Received on Thursday, 31 July 2003 14:56:59 UTC

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