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

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
cardinality.

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

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

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.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

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