- 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
Liz: 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 cc: 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 --> </xsd:simpleType> 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" derivedBy="xsd:list"> <xsd:length value="6"/> </xsd:simpleType> 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? Thanks, Liz
Received on Tuesday, 15 August 2000 14:58:00 UTC