- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: Wed, 27 Aug 2003 14:05:11 +0100
- To: "Dare Obasanjo" <dareo@microsoft.com>
- Cc: <xmlschema-dev@w3.org>
"Dare Obasanjo" <dareo@microsoft.com> writes:
> 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>
I don't think so. That is, the REC says xsi:type can name a member
type of a declared union [1], clause 2.2.4. No mention of facets on
the base. Other related issues have been raised, but this one
probably merits adding to the issues list -- please mail to
www-xml-schema-comments.
What's your opinion as to the correct answer, and why?
ht
[1] http://www.w3.org/TR/xmlschema-1/#cos-st-derived-ok
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Wednesday, 27 August 2003 09:06:02 UTC