W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2002

WhiteSpace

From: Gregory Khanlarov <gregory@creativescience.com>
Date: Thu, 10 Jan 2002 15:15:47 -0800
Message-ID: <006f01c19a2c$bc670070$410a0a0a@JMachine>
To: <xmlschema-dev@w3.org>
Dear XML Schema gurus,

Can anyone explain me in detail how to deal with whitespace facet.

Let's consider 'hexBinary' type.
For 'hexBinary' type the spec says the following:

<simpleType name="binary" id="hexBinary">
  <restriction base="anySimpleType">
    <whiteSpace value="collapse"/>
  </restriction>
</simpleType>

Suppose, I have the following two XML fragments (the schema for element 'data' defines that it is of type 'hexBinary').

Example 1:
<data>FF0099</data>

Example 2:
<data>
     FF0099
</data>

The first XML snippet is definitely valid. How about the second one ?
The definition of the 'hexBinary' type states that the whitespace value is collapse. Does it mean that the second XML snippet is invalid (since it has CR characters) or the XML validator must perform value normalization ('collapse') of the 'data' element before validation ?

Regards,
Greg
Received on Thursday, 10 January 2002 18:12:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:26 GMT