combining enumeration and pattern

Re: Re-using XSD schema-for-schemasIn simpleType derivation-by restriction,
is it legal to apply both enumeration and pattern constraints in the same
derivation step?  The first rule in
http://www.w3.org/TR/xmlschema-2/#defn-rep-constr appears to allow it, and I
can't find anything that disallows it.

In other words, is this valid?

<simpleType name="DrillCodeType">
    <restriction base="string">
      <enumeration value="RAB"/>
      <enumeration value="RC"/>
      <enumeration value="DD"/>
      <enumeration value="DD-HQ"/>
      <enumeration value="DD-NQ"/>
      <pattern value="other:\w{2,}"/>
    </restriction>
  </simpleType>

If yes, is it still OK if the pattern used for a restiction of simpleContent
in a complexType definition.

Simon Cox

______
Simon.Cox@csiro.au  CSIRO Exploration & Mining
26 Dick Perry Avenue, Kensington WA 6151
PO Box 1130, Bentley WA 6102  AUSTRALIA
T: +61(8) 6436 8639  F: +61(8) 6436 8555  C: +61(4) 0330 2672
http://www.em.csiro.au

Received on Sunday, 29 June 2003 08:33:37 UTC