W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2003

restriction query - XML Schema

From: <max.a.chappell@britishairways.com>
Date: Fri, 4 Apr 2003 11:39:51 +0100
To: xmlschema-dev@w3.org
Message-ID: <OF3BAB09CF.70360D98-ON80256CFE.0039CD7B@baplc.com>

Hi,

I'm looking for a definitive answer to the following question :

Are the following restrictions equally valid using XML Schema ?

Restriction 1:
<restriction base="xsd:string">
      <pattern value="[A-Z]{1,9}"/>
</restriction>


Restriction 2:
<restriction base="xsd:string">
      <pattern value="[A-Z]"/>
      <minLength value="1"/>
      <maxLength value="9"/>
</restriction>

We often have non-technical people looking at our restrictions - for them
Restriction 2 is easier to decipher, but is it 'legal' ?

regards

Max

-------------------------------------------------------------------------------------------------

Get the best from British Airways at ba.com
http://www.ba.com
Received on Friday, 4 April 2003 06:06:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:36 GMT