[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|