- From: Ashok Malhotra <ashokma@microsoft.com>
- Date: Mon, 8 Oct 2001 05:23:00 -0700
- To: "Eric van der Vlist" <vdv@dyomedea.com>, <xmlschema-dev@w3.org>
The whitespace facet is visible even though it cannot be changed so users can query what its value is. All the best, Ashok =========================================================== -----Original Message----- From: Eric van der Vlist [mailto:vdv@dyomedea.com] Sent: Monday, October 08, 2001 12:31 AM To: xmlschema-dev@w3.org Subject: xs:whiteSpace weirdness I find Part 2 sometimes confusing about the whiteSpace facet... The schema for schema says: <xs:simpleType name="double" id="double"> <xs:annotation> <xs:appinfo> <hfp:hasFacet name="pattern"/> <hfp:hasFacet name="enumeration"/> <hfp:hasFacet name="whiteSpace"/> <hfp:hasFacet name="maxInclusive"/> <hfp:hasFacet name="maxExclusive"/> <hfp:hasFacet name="minInclusive"/> <hfp:hasFacet name="minExclusive"/> <hfp:hasProperty name="ordered" value="total"/> <hfp:hasProperty name="bounded" value="true"/> <hfp:hasProperty name="cardinality" value="finite"/> <hfp:hasProperty name="numeric" value="true"/> </xs:appinfo> <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#double"/> </xs:annotation> <xs:restriction base="xs:anySimpleType"> <xs:whiteSpace value="collapse" fixed="true" id="double.whiteSpace"/> </xs:restriction> </xs:simpleType> And the text of the rec says: "whiteSpace is applicable to all ·atomic· and ·list· datatypes. For all ·atomic· datatypes other than string (and types ·derived· by ·restriction· from it) the value of whiteSpace is collapse and cannot be changed by a schema author;" And also: "double has the following ·constraining facets·: * pattern * enumeration * whiteSpace * maxInclusive * maxExclusive * minInclusive * minExclusive" My question is: why do we consider whiteSpace to be a facet of double (and many other datatypes) if the schema author cannot change it (which is confirmed by the fixed attribute in whiteSpace facet of the double type definition)? Is-it only to let schema author to repeat that whiteSpace is collapse in their derivations? If yes, isn't it more confusing since they may think that this facet hasn't been fixed? BTW, why has it been fixed in the schema for schema since when whiteSpace is collapse this value cannot be changed in further restrictions anyway ? Thanks Eric -- Rendez-vous ą Paris pour une visite guidee de la nebuleuse XML. http://dyomedea.com/formation/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com http://xsltunit.org http://4xt.org http://examplotron.org ------------------------------------------------------------------------
Received on Monday, 8 October 2001 08:23:33 UTC