Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries [Thread Prev] >Thread Next - Fixed values with element-only content Lexial and value space in context of pattern, enum and whitespaceTo: <xmlschema-dev@--.---> Date: 4/20/2004 2:45:00 PM Hello, I have a question concerning the XSD simple types. Consider the following simple type definition <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="test"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:whiteSpace value="collapse"/> <xsd:pattern value="a"/> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:schema> I expect the content <test> a </test> to be *invalid* with respect to the above definition, because according to the schema spec: a) whiteSpace constrains the *value space*, and b) pattern is a constraint on the *value space* of a datatype which is achieved by constraining the *lexical space* to literals which match a specific pattern On the other hand I expect the content <test> a </test> to be *valid* with respect to the following schema <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="test"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:whiteSpace value="collapse"/> <xsd:enumeration value="a"/> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:schema> because according to the schema spec an c) enumeration constrains the *value space* to a specified set of values Can anyone help me clarify this - or even better - point me to a formal semantic of the datatype definition? Best regards, Florian From priscilla@w... Tue Apr 20 07:09:40 2004 Return-Path: <priscilla | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
