W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2001

Re: Normalization (whiteSpace)

From: Elena Litani <hlitani@jtcsv.com>
Date: Wed, 07 Feb 2001 08:15:28 -0500
Message-ID: <3A814A70.29B0D2F@jtcsv.com>
To: xmlschema-dev@w3.org
Hi, Mick - Thank you for your reply :).
> 
> The schema for Datatypes agree with you Elena with the facet <whitespace
> value="replace"/>, but does not agree with you in respect to fixed="true".
> Same goes for TOKEN.  But now that you mention it, why is it "replace" for
> CDATA!  Doesn't XML expect all characters to be preserved! Ie shouldn't it
> be:
> <whitespace value="preserve" fixed="true"/>
Yes and no. For elements it is true. However, for attributes XML specs
says 'replace' for CDATA and 'collapse' for all others possible
datatypes.
 

> It does.  "for any type derived by restriction from string the value of
> whiteSpace can be any of the three legal values".  Both TOKEN and CDATA are
> derived by restriction from string and indeed do have one of the three
> legal values.
My point is that by Definition CDATA value space MUST be 'replace'.
So why whould we define CDATA as:
simpleType name="CDATA" id="CDATA">
    <restriction base="string">
      <whiteSpace value="replace"/>
    </restriction>
  </simpleType>

instead of <whiteSpace value="replace" fixed="true"/>

> There are many derived atomic datatypes that are derived by restriction
> from string, I'm curious why you've singled out TOKEN and CDATA only?
Cause Token and CDATA are 'base' types for many derived types and
because those are the datatypes that were used in DTDs.

Elena.
Received on Wednesday, 7 February 2001 08:13:59 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:50 UTC