- From: Elena Litani <hlitani@jtcsv.com>
- Date: Wed, 07 Feb 2001 08:15:28 -0500
- 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