- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 03 Nov 2000 16:45:36 +0000
- To: <asirv@webmethods.com>
- Cc: "Www-Xml-Schema-Comments@W3. Org" <www-xml-schema-comments@w3.org>, "W3c-Xml-Schema-Ig" <w3c-xml-schema-ig@w3.org>, "Ningang chen" <nchen@webmethods.com>
"Asir S Vedamuthu" <asirv@webmethods.com> writes:
> <xsd:element name='size'>
> <xsd:simpleType>
> <xsd:union memberTypes='xsd:integer xsd:string'>
> <xsd:pattern value='1'/>
> <xsd:pattern value='(1|2)'/>
> <xsd:pattern value='(small|medium|large)'/>
> </xsd:union>
> </xsd:simpleType>
> </xsd:element>
>
> <size xsi:type='xsd:string'>small</size>
> NOTE - there are several frustrating errors in prose that keeps me circling
> thru the drafts. Asir, this is NORMAL 'cos of the last minute additions and
> substrations. Of them, here is one. Part 2 - Section 2.5.1.3 does not say
> that Union Datatype Def can use pattern and enumeration facets. Section 4.1
> says that you can use two facets: pattern and enumeration. Production rule
> in section 5.1.3 does not allow pattern or enumeration as immediate children
> of xsd:union.
These are all correct, and _not_ mutually inconsistent. The above
example is invalid. You must say:
<xsd:element name='size'>
<xsd:simpleType>
<xsd:restriction>
<xsd:simpleType>
<xsd:union memberTypes='xsd:integer xsd:string'/>
</xsd:simpleType>
<xsd:pattern value='1'/>
<xsd:pattern value='(1|2)'/>
<xsd:pattern value='(small|medium|large)'/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
W3C Fellow 1999--2001, part-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/
Received on Friday, 3 November 2000 11:46:03 UTC