Re: {item type description} of lists derived by restriction

Helena Cavanagh <helena.cavanagh@usa.net> writes:

> If I have the following simple type definitions:
> 
> <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
> elementFormDefault="qualified">
> 
> 	<xsd:simpleType name="myList">
> 		<xsd:list itemType="xsd:integer"/>
> 	</xsd:simpleType>                             
> 	
> 	<xsd:simpleType name="myOtherList">
> 		<xsd:restriction base="myList">
> 			<xsd:maxLength value="10"/>
> 		</xsd:restriction>
> 	</xsd:simpleType> 
> 
> </xsd:schema>
> 
> the {variety} of myList and myOtherList is list, since the correspondence
> between {variety} and the properties of the simpleType element information
> item is:
> 
> "{variety}
> If there is a list among the [children], then list, otherwise if there is a
> union among the [children], then union, otherwise (there is a restriction
> among the [children]), then the {variety} of the {base type definition}"
> 
> (the {base type definition} of myOtherList is myList, whose {variety} is
> list)
> 
> In the tableau for List Simple Type Definition Schema Component it says that:
> 
> "if the {variety} is list (...)
> 
> {item type definition}:
>                       
> Starting from the list among the [children] of simpleType or the list among
> the [children] of restriction, whichever is present, the type definition
> resolved to by the normalized value of the itemType [attribute], if present,
> otherwise the type definition corresponding
> to the simpleType among the [children]."
> 
> This assumes that either:
> * there is a list among the [children] of simpleType, or
> * there is a list among the [children] of restriction ([*] see below)
> 
> However, in the definition of myOtherList there is neither. Then, what is the
> {item type description} for myOtherList?

You're right, this is broken -- thanks.  Should just be the itemType
attribute of the <list> or the <simpleType> within it.  We'll fix it.

> [*] Is this possible? Mustn't [children] be _immediately_ within the
> <restriction> element information item? There can't be a <list> immediately
> under <restriction>, right?

Right.

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 Tuesday, 16 January 2001 11:14:51 UTC