Re: Pointless use of simpleType

James Clark <jjc@jclark.com> writes:

> Why does XML Schema Part 2 require me to write for example
> 
> <xsd:simpleType>
>    <xsd:list>
>       <xsd:simpleType>
> 	 <xsd:union memberTypes="xsd:NCName">
>             <xsd:simpleType>
>                <xsd:restriction base="xsd:token">
>                   <xsd:enumeration value="#default"/>
>                </xsd:restriction>
>             </xsd:simpleType>
> 	 </xsd:union>
>       </xsd:simpleType>    
>    </xsd:list>
> </xsd:simpleType>
> 
> instead of simply:
> 
> <xsd:list>
>    <xsd:union memberTypes="xsd:NCName">
>       <xsd:restriction base="xsd:token">
>          <xsd:enumeration value="#default"/>
>       </xsd:restriction>
>    </xsd:union>    
> </xsd:list>
> 
> ?
> 
> The extra simpleType elements are completely unnecessary, as far as I
> can see, and serve only to obfuscate the meaning of the Schema.

Not obfuscate, rather make explicit.  A union is a union of simple
types: you can either refer to them or provide them.  Similarly for
lists.  We choose the more verbose syntax intentionally because it was
clearer.

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 Monday, 12 February 2001 05:15:54 UTC