RE: Lexical space Vs Value space

> -----Original Message-----
> From:	Pranav Kandula [SMTP:kpranav@microsoft.com]
> Sent:	Friday, March 30, 2001 6:18 PM
> To:	www-xml-schema-comments@w3.org
> Subject:	Lexical space Vs Value space
> 
> Hello,
> 
> I am looking at this document located at
> http://www.w3.org/TR/2001/PR-xmlschema-2-20010330/datatypes.html#token
> and I basically don't see the difference between the definitions on
> Lexical space and Value space. Both have the same
> definitions. Am I missing something here ? What is the actual difference
> between the two terms ?
> 
> The value space of token is the set of strings that do not contain the
> line feed (#xA) nor tab (#x9) characters, that have no leading or
> trailing spaces (#x20) and that have no internal sequences of two or
> more spaces. 
> The lexical space of token is the set of strings that do not contain the
> line feed (#xA) nor tab (#x9) characters, that have no leading or
> trailing spaces (#x20) and that have no internal sequences of two or
> more spaces
> 
In general, a value space is the set of "abstract values" for a datatype,
while the lexical space is a set of one or more "concrete literals" for the
datatype (one way to think of the lexical space is as the serialization of
the abstract values).

In some datatypes (such as string and types derived by restriction from it,
e.g. token) the lexical space *happens* to be identical to the value space.
In other types (such as base64Binary) the two are clearly distinct.  In
general, processing should happen at the value space level.

I hope this helps.

pvb

Received on Thursday, 5 April 2001 18:44:06 UTC