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

RE: lists

From: Biron,Paul V <Paul.V.Biron@kp.org>
Date: Tue, 15 Aug 2000 12:05:59 -0700
Message-Id: <376E771642C1D2118DC300805FEAAF4386DDAC@pars-exch-1.ca.kp.org>
To: "'lcastro@cookwood.com'" <lcastro@cookwood.com>, www-xml-schema-comments@w3.org
> -----Original Message-----
> From:	Liz Castro [SMTP:lcastro@cookwood.com]
> Sent:	Tuesday, August 15, 2000 11:11 AM
> To:	www-xml-schema-comments@w3.org
> Subject:	lists
> Is there anything that keeps the content of the SixUS-States element
> from being, say "AK AK AK AK AK AK"? That is, when you derive a list
> from a set of values, can a value be used more than once in the list and
> the element still be valid?
No, there isn't.  Yes, a value can appear more than once in the list.  This
is the basic difference between a list and a set (lists are also ordered,
sets are not).

The WG decided that it didn't want to support sets (or bags) at this time.
However, you could handle set semantics in your application, by changing the
type def to something like:

	<xsd:simpleType name="SixUS-States"
	        base="US-State" derivedBy="xsd:list">
	    <xsd:length value="6"/>
	        <xsd:appinfo xmlns:myApp='http://myco.com/myapp'>

And then, your application could puruse the PSV and gather all list
simpleTypes which have <myApp:set/> as an appinfo annotation and then you'd
be able to which elements/attributes your application needed to enforce
uniqueness constraints on.

Received on Tuesday, 15 August 2000 15:22:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:53 UTC