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

[RE: Conditional typing] xsi:type not checked against schema

From: Piccand Régis <regis.piccand@imtf.ch>
Date: Mon, 11 Feb 2002 14:11:03 +0100
Message-ID: <DF7EC83D7AFBD411965B0008C7596EC53ED57C@imtfexchange.imtf.ch>
To: " 'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Cc: "'Eric van der Vlist'" <vdv@dyomedea.com>
Hello again,

(Eric, I have upgraded to XML Spy 4.3 and it works nearly fine now...)

When using xsi:type in an instance document, the validation checks that the
value of the tag is valid, but the type specified is not checked against the

For instance, my "element" is of type "valueType" which is a union of
base64Binary and string.

In an instance document, any xsi:type is accepted.

schema :
	<xs:element name="root">
				<xs:element name="element"
	<xs:simpleType name="valueType">
		<xs:union memberTypes="xs:base64Binary xs:string"/>

valid instance :

	<element xsi:type="xs:int">1</element> 
	<element xsi:type="xs:boolean">1</element> 
	<element xsi:type="xs:string">hello world</element> 

- As far as I understand, only xs:string and xs:base64Binary should be
accepted. Is that true ?
- Is there a way to make the xsi:type attribute compulsory ?

Thanks for your support

Received on Monday, 11 February 2002 08:18:07 UTC

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