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

Are this files correct?

From: Chelkowski, Tadeusz <Tadeusz.Chelkowski@softwareag.com>
Date: Fri, 29 Jun 2001 12:05:49 +0200
Message-ID: <6B2492D663ECD4119EB70008C7E6F673FED69D@softwareag.com>
To: xmlschema-dev@w3.org
Hello

Please take a look at this schema and xml file, below are also result from
two different validators xsv and xerces 1.3 could you explain why they
behave different?

Thank you 

Regards
Tadeusz Chelkowski, Software AG Poland

 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <xsd:elementname="Person">
 <xsd:complexType>
 <xsd:sequence>
 <xsd:element ref="Name" /> 
 <xsd:element ref="Surname" /> 
 <xsd:element ref="Date" /> 
 </xsd:sequence>
 </xsd:complexType>
  </xsd:element>
  <xsd:element name="Name"type="xsd:string" /> 
  <xsd:element name="Surname"type="xsd:string" /> 
  <xsd:element name="Date"type="xsd:date" /> 
  </xsd:schema>

<?xml version="1.0" encoding="UTF-8"?>
<Person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="test.xsd">
	<Name>Tadeusz</Name>
	<Surname>Chelkowski</Surname>
	<Date>19765050</Date>
</Person>

Xsv gives me no error

C:\Program Files\XSV>xsv test.xml
<?xml version='1.0'?>
<xsv docElt='{None}Person' instanceAssessed='true' instanceErrors='0'
rootType='
[Anonymous]' schemaErrors='0' schemaLocs='None -> test.xsd'
target='file:/C:/Pro
gram Files/XSV/test.xml' validation='strict' version='XSV 1.196/1.97 of
2001/06/
09 19:14:08' xmlns='http://www.w3.org/2000/05/xsv'>
<importAttempt URI='file:/C:/Program Files/XSV/test.xsd' outcome='success'/>
</xsv>


Results from xerces 1.3 

ERROR MSG:org.xml.sax.SAXParseException: Element type "Person" must be
declared.
ERROR MSG:org.xml.sax.SAXParseException: Element type "Name" must be
declared.
ERROR MSG:org.xml.sax.SAXParseException: Element type "Surname" must be
declared.
ERROR MSG:org.xml.sax.SAXParseException: Element type "Date" must be
declared. 
Received on Friday, 29 June 2001 06:06:03 GMT

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