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

Re: lists

From: <petsa@us.ibm.com>
Date: Tue, 15 Aug 2000 14:56:52 -0400
To: lcastro@cookwood.com
cc: www-xml-schema-comments@w3.org
Message-ID: <8525693C.0068126F.00@D51MTA03.pok.ibm.com>
You have specified two constraints:
1. The values must be from the enumerated list
2. The length of the list must be 6
The schema processor will check for these but there
is no way to specify constraints on the values i.e.
they may not be repeated or, more generally, if a certain
value occurs it constrains what other values may occur.
Many have asked for these, so called, co-occurence
constraints but they will not be in Schema 1.0.
Perhaps 2.0.

All the best, Ashok

Liz Castro <lcastro@cookwood.com>@w3.org on 08/15/2000 02:10:44 PM

Please respond to lcastro@cookwood.com

Sent by:  www-xml-schema-comments-request@w3.org

To:   www-xml-schema-comments@w3.org
Subject:  lists

A question about derived lists. Suppose I have a simpleType named
"US-State" (lifted from the Primer) that looks like this:

<xsd:simpleType name="US-State" base="xsd:string">
    <xsd:enumeration value="AK"/>
    <xsd:enumeration value="AL"/>
    <xsd:enumeration value="AR"/>
    <!-- and so on -->

And then wanted to create an element to contain a list of exactly six
states (also from the Primer):

<xsd:simpleType name="SixUS-States" base="US-State"
    <xsd:length value="6"/>

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?

Received on Tuesday, 15 August 2000 14:58:00 UTC

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