- From: Florian Reuter <flr@informatik.uni-kiel.de>
- Date: Tue, 20 Apr 2004 12:44:36 +0200
- To: <xmlschema-dev@w3.org>
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
Received on Tuesday, 20 April 2004 06:44:53 UTC