- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 15 Oct 2001 14:50:35 +0100
- To: Eric van der Vlist <vdv@dyomedea.com>
- Cc: xmlschema-dev@w3.org
Eric van der Vlist <vdv@dyomedea.com> writes:
> 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)?
Well, I agree it's not crystal clear, but the alternative is worse, I
think. All the 'fixed' facets of builtin derived types are listed in
a similar way, e.g. fractionDigits for integer. The point is I think
that the semantics is relevant, it's part of what you need to know
about such a type. Perhaps once 'fixed' facets should move to the
Fundamental Facets category, but as it stands they apply to _all_
types.
> Is-it only to let schema author to repeat that whiteSpace is
> collapse in their derivations?
It does have that effect, but that's not the motivation, I don't think.
> If yes, isn't it more confusing since they may think that this facet
> hasn't been fixed?
The alternative would be worse -- to be told it was an error to
provide a redundant setting -- in my opinion.
> 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 ?
Redundant documentation.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
W3C Fellow 1999--2001, part-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
W3C Fellow 1999--2001, part-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
Received on Monday, 15 October 2001 09:49:53 UTC