W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2002

RE: [Moderator Action] ambigous string

From: Priscilla Walmsley <priscilla@walmsley.com>
Date: Thu, 25 Apr 2002 17:12:22 -0500
To: "'Henry S. Thompson'" <ht@cogsci.ed.ac.uk>, "'Tianzhi Yang'" <tyang@firstrain.com>
Cc: <xmlschema-dev@w3.org>
Message-ID: <002b01c1eca6$46433360$339afea9@WALMSLEYPH>
Hi,

I agree with Henry that the first example is a list of two strings.
But:

> > <list>
> > 	<union memberTypes="int">
> > 		<simpleType>
> > 			<list itemType="string"/>
> > 		</simpleType>
> > 	</union>
> > </list>

This amounts to a list of a list, which is disallowed by the rec [1]
(clause 2.1).    

Priscilla

-----------------------------------------------------
Priscilla Walmsley             priscilla@walmsley.com
Author, Definitive XML Schema     (Prentice Hall PTR)
----------------------------------------------------- 

[1] http://www.w3.org/TR/xmlschema-1#cos-st-restricts


> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Henry S. Thompson
> Sent: Thursday, April 25, 2002 3:37 PM
> To: Tianzhi Yang
> Cc: xmlschema-dev@w3.org
> Subject: Re: [Moderator Action] ambigous string
> 
> 
> "Tianzhi Yang" <tyang@firstrain.com> writes:
> 
> > Hi,
> > Can anybody help?
> > 1.
> > Suppose there is a list of union. The only member of union 
> is "string".
> > .....
> > <list>
> > 	<simpleType>
> > 		<union memberTypes="string"/>
> > 	</simpleType>
> > </list>
> > .....
> > No I get the following value:
> > 	abc def
> > Now should I look on it as a list consists of one string in 
> which there
> > is a space character or a list consists of two strings?
> 
> My reading is that lists _always_ break at whitespace, regardless of
> their itemType.
> 
> > 2.
> > What make it more complex is the following case:
> > <list>
> > 	<union memberTypes="int">
> > 		<simpleType>
> > 			<list itemType="string"/>
> > 		</simpleType>
> > 	</union>
> > </list>
> > 
> > and the value:
> > 	11 ab 22 33
> > No doubt I match 11 against int, ab against string. Now 
> should I regard
> > "22" as part of the string started with "ab" or a seperate "int"?
> 
> See above, so 'no', that's a 4 item list.
> 
> ht
> -- 
>   Henry S. Thompson, HCRC Language Technology Group, 
> University of Edinburgh
>           W3C Fellow 1999--2002, 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/
>  [mail really from me _always_ has this .sig -- mail without 
> it is forged spam]
> 
> 
Received on Thursday, 25 April 2002 17:13:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:30 GMT