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

XSV reports a validation error I can't figure out

From: <Alex.Vallat@i2.co.uk>
Date: Thu, 18 Jan 2001 11:19:50 -0000
Message-ID: <1E73B637CFC3D411A12F00B0D0795DDD078100@uknts40exh01.i2.co.uk>
To: xmlschema-dev@w3.org
I am using XSV to validate an instance against a schema, but I keep getting
an error reported that a certain xsi:type is undefined.  I am fairly sure
that it is defined, so I have produced a massivley cut down xsd and xml pair
that still produce the error, and I can't figure out how to fix it.  I am
very new at xml and xsd, so I realise this is almost certain to be something
I have done wrong rather than a problem with XSV, but I would appreciate it
if someone could look at the following:

==== Test.xsd ====

<?xml version="1.0" encoding="UTF-8"?>
<schema
targetNamespace="http://www.i2group.com/Schemas/2001-01-01/TestSchema"
xmlns:vlvx="http://www.i2group.com/Schemas/2001-01-01/TestSchema"
xmlns="http://www.w3.org/2000/10/XMLSchema">
	<complexType name="endType" abstract="true">
		<sequence>
			<element name="properties" type="string"/>
		</sequence>
	</complexType>
	<complexType name="person">
		<complexContent>
			<extension base="vlvx:endType">
				<sequence>
					<element name="PersonProperties"
type="string"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<element name="ends">
		<complexType>
			<sequence>
				<element name="end" type="vlvx:endType"
minOccurs="0" maxOccurs="unbounded"/>
			</sequence>
		</complexType>
	</element>
</schema>

===============

==== Test.xml ====

<?xml version="1.0" encoding="UTF-8"?>
<vlvx:ends xmlns:vlvx="http://www.i2group.com/Schemas/2001-01-01/TestSchema"
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xsi:schemaLocation="http://www.i2group.com/Schemas/2001-01-01/TestSchema
Test.xsd">
	<end xsi:type="vlvx:person">
		<properties>NormalBit</properties>
		<PersonProperties>ExtraBit</PersonProperties>
	</end>
</vlvx:ends>

==============

Running xsv with command line: xsv -o xsvout.xml Test.xml

results in the output:

==== xsvout.xml ====

<?xml version="1.0"?>
<xsv docElt="{http://www.i2group.com/Schemas/2001-01-01/TestSchema}ends"
instanceAssessed="true" instanceErrors="1" rootType="[Anonymous]"
schemaErrors="0"
schemaLocs="http://www.i2group.com/Schemas/2001-01-01/TestSchema ->
Test.xsd" target="file:/C:/Documents and Settings/Alex/My
Documents/TestXML/Test.xml" validation="strict" version="XSV
1.173.2.15/1.74.2.20 of 2000/12/16 12:10:29"
xmlns="http://www.w3.org/2000/05/xsv">
	<importAttempt URI="file:/C:/Documents and Settings/Alex/My
Documents/TestXML/Test.xsd"
namespace="http://www.i2group.com/Schemas/2001-01-01/TestSchema"
outcome="success"/>
	<invalid char="2" code="cvc-elt.2.2" line="3"
resource="file:/C:/Documents and Settings/Alex/My
Documents/TestXML/Test.xml">xsi:type vlvx{&#60;XMLInfoset.Namespace instance
at 8f2fb8>}:person undefined</invalid>
</xsv>

================

The important part being: xsi:type vlvx{&#60;XMLInfoset.Namespace instance
at 8f2fb8>}:person undefined

I would appreciate any help with this matter.

Best Regards,

Alex Vallat
Received on Thursday, 18 January 2001 06:27:12 GMT

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