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

RE: String Lists

From: Biron,Paul V <Paul.V.Biron@kp.org>
Date: Fri, 1 Dec 2000 14:20:15 -0800
Message-Id: <376E771642C1D2118DC300805FEAAF43014BA80F@pars-exch-1.ca.kp.org>
To: "'Kollu, Kishore'" <kishore_kollu@mentorg.com>, "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
> -----Original Message-----
> From:	Kollu, Kishore [SMTP:kishore_kollu@mentorg.com]
> Sent:	Friday, December 01, 2000 2:01 PM
> To:	'www-xml-schema-comments@w3.org'
> Subject:	String Lists
> Hi,
>  I am trying to use list of strings in schema. I set the value of facet
> length to 5.
> In the instance document if I have a list 
> <MyList>a b c d e</MyList>, the IDE (XML Spy 3.5 beta 2) complains
> that the value does not match the facet length = 5.
> But if the same list is <MyList>abcde</MyList> then it does not complain.
First, I have to ask, what does your schema fragment look like?  In other
words, it all hinges on HOW you've defined "a list of strings with length
facet = 5".  You may not have defined the type you thought you did.

Is your schema fragment something like the following:

<element name='MyList'>
				<list itemType='string'/>
			<length value='5'/>

If so, then the instance fragment:

	<MyList>a b c d e</MyList>

should validate properly and


is schema invalid, and hence, the error would appear to be in XML Spy's

If however, your schema fragment looks something like:

<element name='MyList'>
		<restriction base='string'>
			<length value='5'/>

then <MyList>a b c d e</MyList> should be invalid, but
<MyList>abcde</MyList> should validate just fine and XML Spy's behavior
would be correct.

If your schema fragment looks different than either of the above I'd like to

Received on Friday, 1 December 2000 17:34:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:49 UTC