Re: Regular Expressions

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 UTC