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

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

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

> schema :
> 	<xs:element name="root">
> 		<xs:complexType>
> 			<xs:sequence>
> 				<xs:element name="element"
> type="valueType"/>
> 			</xs:sequence>
> 		</xs:complexType>
> 	</xs:element>
> 	<xs:simpleType name="valueType">
> 		<xs:union memberTypes="xs:base64Binary xs:string"/>
> 	</xs:simpleType>
> 
> 
> 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 ?


Almost. As defined here, "valueType" can also be used.

--> Why are "boolean" and "int" valid, although the union type says "string"
and "base64Binary" ???

Thanks in advance,

Régis
Received on Tuesday, 12 February 2002 03:51:20 GMT

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