Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Lexial and value space in context of pattern, enum and whitespace

From: "Florian Reuter" <flr@----------.--------.-->
To: <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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent