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

Re: Whitespace as a constraining facet?

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 07 Feb 2001 09:34:11 +0000
To: Michael Anderson <michael@research.canon.com.au>
Cc: xmlschema-dev@w3.org
Message-ID: <f5bae7yu99o.fsf@cogsci.ed.ac.uk>
Michael Anderson <michael@research.canon.com.au> writes:

> The Candidate Recommendation added in a new constraining facet called
> whitespace, but it doesn't appear to be a facet that does any
> constraining.  I'm not even sure if it is a facet (but I'm not an english
> language expert by any means).  The whitespace functionality is a lot more
> like a processing instruction than a constraining facet.
> 
> Having it as a facet introduces problems such as when do you apply it?

Before validation.

> Ie, I have a string " dog" (with a leading space).  Is this valid against
> the following facets (constraining a string) appearing in this order?
> <length value="3"/>
> <whitespace value="collapse"/>

Yes.

> What if we now have (excusing the improper Namespace handling):
> <simpleType name="B">
>   <restriction base = "string">
>     <length value = "3"/>
>   </restriction>
> </simpleType>
> <simpleType name = "D" >
>   <restriction base = "B">
>     <whitespace value = "collapse"/>
>   </restriction>
> </simpleType>

> A text InfoItem that satisfies D must also satisfy B as D is restricting B,
> but this is not the case with our example of " dog".

There's a difference here between value spaces and lexical spaces --
the value spaces are properly subsetted, only the lexical space shows
the anomaly you identify.

> Other problems could possibly arise with the use of the value constraint.
> The specs sometimes specify the un-normalized value should be used and at
> other times the normalized value.

I hope not -- please point out any places using the un-normalized
value, they should probably be fixed.

> My main problem is that facets change the _value_space_ that defines valid
> values, while a whitespace facet changes the _value_ to test in the value
> space.

Not public discussions, sorry.

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 Wednesday, 7 February 2001 04:34:14 UTC

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