W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2001

Re: semantics of whitespace facet

From: K.Kawaguchi <k-kawa@bigfoot.com>
Date: Wed, 31 Jan 2001 17:26:42 -0800
To: ht@cogsci.ed.ac.uk (Henry S. Thompson)
Cc: www-xml-schema-comments@w3.org
Message-Id: <20010131171739.688E.K-KAWA@bigfoot.com>

In section 5.2.6 of part 2, the spec says

> The following example is the datatype definition for the token built-in
> derived datatype.
> 
> <simpleType name='token'>
>     <restriction base='CDATA'>
>       <whiteSpace value='collapse'/>
>     </restriction>  
> </simpleType>

But it doesn't make sense for me.
How can it be the definition of 'token' type?


Consider "a  b" as an lexical value:

* validator saw "a  b"
* validator checks its conformance with 'token' type.
  * it collapses white space, as specified by whiteSpace facet.
    In previous post, you admit that whiteSpace facet acts as a
    pre-processor.
  * the result is "a b".
  * validator checks "a b" with 'CDATA' type, because
    it's the base type of 'token' type.
  * "a b" is accepted by 'CDATA'
* "a  b" is accepted by 'token'

???


regards,
----------------------
K.Kawaguchi
E-Mail: k-kawa@bigfoot.com
Received on Wednesday, 31 January 2001 20:26:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:49 GMT