W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2002

Re: A list restriction with more than one type (position dependent) in the list

From: Jeni Tennison <jeni@jenitennison.com>
Date: Mon, 13 May 2002 21:21:34 +0100
Message-ID: <761855818796.20020513212134@jenitennison.com>
To: Chuck Paussa <cpaussa@myrealbox.com>
CC: xmlschema-dev <xmlschema-dev@w3.org>
Hi Chuck,

> Is it possible to define a list which contains more than one type in
> sequence?

No. You can define a list type whose item type is a union type -- so
you could define that the space_Type was a list of five values, which
could be a length, a precedence or a cardinality. But you can't say
that the list has to contain three lengths, then a precedence, then a

By the way, I think your regular expressions could be simplified a

<simpleType name="space_Type">
  <restriction base="string">
    <pattern value="(\+?\d+\.?\d*[pmice][xtmn] ){1,3}(\+?\d+|force)
                    (retain|discard)" />

Let us know if you want to see the details about how to define the
list of the union type; I think that the regular expression is
probably more restrictive, though.



Jeni Tennison
Received on Monday, 13 May 2002 16:21:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:01 UTC