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

creating list types from multiple atomic string types???

From: Morten M. Christensen <mmc@mortench.net>
Date: Tue, 26 Sep 2000 17:24:11 +0200
Message-ID: <39D0BF9B.F929966B@mortench.net>
To: www-xml-schema-comments@w3.org
Hi all,

I am looking for a effective way to express lists of different string
compounds - i.e. list of names defined by a number of different
enumeration types. To be precise, I would like to express a list of
string names : String name list = [Name1 | Name2 | Name3 ...]+

The result should be ONE string which can be validated.

Imaginary example:
 Using the two names:

 <xsd:simpleType name="Name1" base="xsd:string">
  <xsd:enumeration value="RED"/>
  <xsd:enumeration value="BLUE"/>
  <xsd:enumeration value="GREEN"/>
 </xsd:simpleType>

<xsd:simpleType name="Name2" base="xsd:string">
  <xsd:enumeration value="BIG"/>
  <xsd:enumeration value="SMALL"/>
 </xsd:simpleType>

 I would like to construct a single string which is a list of intermixed
names Name1 and Name (syntax made up):

<xsd:simpleType name="NameList" base="Name1 | Name2"
derivedBy="xsd:list"/>

To allow a nameList element of type NameList to contain:

<nameList>BIG BLUE</nameList>
<nameList>SMALL GREEN RED</nameList>

etc.... but NOT

<nameList>BGI BUE</nameList>

I would find such a thing quite useful when dealing with strings and
arrays which are compounds.

-----
Morten Christensen,
AArhus, Denmark
Received on Tuesday, 26 September 2000 11:22:37 UTC

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