← Prev in month ← Prev in thread

patterns and restrictions

From
Max Chappell <>
To
"''" <>
Date
2003-12-17T15:29:23Z
ID
<>
Thread
patterns and restrictions
Hi,

Does the following allow 'abc' as a valid value?

<xs:simpleType name="MyDouble">
        <xs:restriction base="xs:double">
            <xs:pattern value="[^N].*"/>
        </xs:restriction>
</xs:simpleType>

We had been working under the belief that, via restriction - patterns 
from both the new datatype and the original one are 'And'ed together. 
i.e - the above datatype would only allow values valid for a double - 
with the exception of NaN.

However, we've read somewhere today that whenever a pattern facet is 
evaluated - it is evaluated against a string.  Though XMLSpy and Xerces 
both reject 'abc', is this an added bonus? Should we rely on this, or 
should we define patterns in these instances to be tighter?

My suspiscion is that our original belief was correct, patterns are 
inherited also, but we would appreciate some confirmation of this.

thanks

Max
← Prev in month ← Prev in thread