W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2000

Re: Implementation Experience: INCORRECT usage of xsi:type in Union Types

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>
Message-ID: <f5bitq5f1hr.fsf@cogsci.ed.ac.uk>
"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 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:union memberTypes='xsd:integer xsd:string'/>
   <xsd:pattern value='1'/>
   <xsd:pattern value='(1|2)'/>
   <xsd:pattern value='(small|medium|large)'/>

  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

This archive was generated by hypermail 2.3.1 : Friday, 13 July 2018 09:02:52 UTC