Subject: RE: [Geopriv] Civic data types and whitespace

From: "Martin Thomson" <[email-masked]>
Date: Thu, 11 Aug 2005 13:38:19 +1000

Andy,

The value space of token is no different to that of string, so token isn't
really more restrictive.  The difference is that token normalizes white
space in a manner that I believe to be more suitable:

http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#rf-whiteSp
ace
http://www.w3.org/TR/REC-xml/#AVNormalize

whiteSpace="collapse" is the only difference between string and token.  The
following result in identical data being passed to an application:

<element xsi:type="xs:string"> a  b </element>
<element xsi:type="xs:token">&#x20;a &#x20;b&#x20;</element>

My suggestion is that the first of the above is more often assumed to result
in a value of "a b" than " a  b ".  The token type enables this, but does
not prevent the other.

Cheers,
Martin

-----Original Message-----
From: Andrew Newton [mailto:[email-masked]] 
Sent: Thursday, 11 August 2005 11:31 AM
To: Thomson, Martin [WOLL:5500:EXCH]
Cc: GEOPRIV
Subject: Re: [Geopriv] Civic data types and whitespace

Martin,

What obvious thing am I missing?

string is less restrictive than token, isn't it?

http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#string
http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#token

Or is it that you want more restriction?
In that case, I think that token may not be what you are after either.

http://www.w3.org/TR/xmlschema-0/#CreatDt

-andy
_______________________________________________
Geopriv mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/geopriv

---

From: Andrew Newton <[email-masked]>
Date: Thu, 11 Aug 2005 06:58:38 -0400

On Aug 10, 2005, at 11:38 PM, Martin Thomson wrote:
> My suggestion is that the first of the above is more often assumed  
> to result in a value of "a b" than " a  b ".  The token type  
> enables this, but does not prevent the other.
Martin,

In other words, you want more restriction, right?  And this is so you  
do not have to do whitespace processing post xml validation, correct?

I'm asking because your original statement regarding equivalence by  
an xml processor seemed confusing to me.

-andy