OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   patterns and restrictions

[ Lists Home | Date Index | Thread Index ]

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







 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS