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

RE: Xsd Include Validation Error

From: Dare Obasanjo <dareo@microsoft.com>
Date: Mon, 18 Aug 2003 15:21:41 -0700
Message-ID: <830178CE7378FC40BC6F1DDADCFDD1D171A9F4@RED-MSG-31.redmond.corp.microsoft.com>
To: "Wirth, Kevin" <Kevin.Wirth@kcc.com>, <xmlschema-dev@w3.org>

This is a bug in the .NET Framework's W3C XML Schema validator which
should be fixed in the next version of the .NET Framework. 

-- 
PITHY WORDS OF WISDOM 
People can be divided into two types: those who still possess a fierce
hunting instinct and those who pay to park.


This posting is provided "AS IS" with no warranties, and confers no
rights. 

 

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Wirth, Kevin
> Sent: Thursday, July 31, 2003 11:52 AM
> To: 'xmlschema-dev@w3.org'
> Subject: Xsd Include Validation Error
> 
> 
> Hi,
> 
> 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.
> 
> Thanks
> Kevin Wirth
> 
> 
> T1.Xsd (included)
> <?xml version="1.0" encoding="utf-8" ?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
> 	elementFormDefault="unqualified" 
> 	attributeFormDefault="unqualified">
> 	<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:restriction>
> 	</xsd:simpleType>
> 	<xsd:complexType name="DataTypeType" >
> 		<xsd:simpleContent>
> 			<xsd:extension base="DataType1Type">
> 				<xsd:attribute name="OtherValue"
> type="xsd:string" />
> 			</xsd:extension>
> 		</xsd:simpleContent>
> 	</xsd:complexType>
> </xsd:schema>
> 
> 
> 
> T1Test.XSD
> <?xml version="1.0" encoding="utf-8" ?>
> <xsd:schema id="T1Test" 
> targetNamespace="http://tempuri.org/T1Test.xsd" 
> elementFormDefault="qualified" 
> xmlns="http://tempuri.org/T1Test.xsd" 
> xmlns:mstns="http://tempuri.org/T1Test.xsd" 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> 	<xsd:include schemaLocation="T1.xsd" />
> 
> 	<xsd:complexType name="Testelement1">
> 		<xsd:sequence>
> 			<xsd:element name="Prop1" type="xsd:string" />
> 			<xsd:element name="Prop2" type="xsd:string" />
> 		</xsd:sequence>
> 	</xsd:complexType>	
> </xsd:schema>
> 
> 
> 
> --------------------------------------------------------------
> ----------------
> 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 Monday, 18 August 2003 18:21:46 GMT

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