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

xsi:type and unions

From: Dare Obasanjo <dareo@microsoft.com>
Date: Tue, 26 Aug 2003 14:36:26 -0700
Message-ID: <830178CE7378FC40BC6F1DDADCFDD1D185181F@RED-MSG-31.redmond.corp.microsoft.com>
To: <xmlschema-dev@w3.org>

Is there any text in the W3C XML Schema recommendation that makes the
following instance invalid according to the schema below. 

<s xmlns="b64" xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:hexBinary">1234</s>


<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="b64" 
xmlns:b64="b64"> 
        <xs:element name="s" type="b64:myType2"/> 

        <xs:simpleType name="myType"> 
                <xs:union memberTypes="xs:base64Binary xs:hexBinary
xs:NOTATION"/> 
        </xs:simpleType> 

        <xs:simpleType name="myType2"> 
                <xs:restriction base="b64:myType"> 
                        <xs:pattern value="abcd"/> 
                </xs:restriction> 
        </xs:simpleType> 
</xs:schema>

-- 
PITHY WORDS OF WISDOM 
To succeed in politics, it is often necessary to rise above your
principles.                                                         

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

 
Received on Tuesday, 26 August 2003 18:02:40 GMT

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