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

Re: Regular Expressions

From: Jeni Tennison <jeni@jenitennison.com>
Date: Tue, 13 Aug 2002 17:37:49 +0100
Message-ID: <8597708497.20020813173749@jenitennison.com>
To: "Nell Golding" <nell_golding@hotmail.com>
CC: xmlschema-dev@w3.org

Hi Nell,

> Are this Regular Expressions equal?
> Is it possible just to use SPACEs in the pattern definition?
>
> <xs:simpleType>
>      <xs:restriction base="xs:string">
>           <xs:pattern value="\d{6} \d{6} \d{6}"/>
>      </xs:restriction>
> </xs:simpleType>
>
> <xs:simpleType>
>      <xs:restriction base="xs:string">
>           <xs:pattern value="\d{6}&#x0020;\d{6}&#x0020;\d{6}"/>
>      </xs:restriction>
> </xs:simpleType>

Should be. By the time the validator sees the value of the 'value'
attribute, the character references should have been resolved and
spaces inserted instead. So as far as the validator is concerned, I
think these two should be precisely equal.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Tuesday, 13 August 2002 12:37:51 GMT

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