W3C home > Mailing lists > Public > www-rdf-interest@w3.org > July 2004

Re: A question for RDF parser implementers - whitespace

From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Mon, 12 Jul 2004 09:43:00 -0400
To: www-rdf-interest@w3.org
Message-id: <87iscte3yz.fsf@nwalsh.com>
/ Graham Klyne <GK@ninebynine.org> was heard to say:
[...]
|>Leading and trailing whitespace is significant in strings. The more
|>interesting test would be one that includes
|>
|>      <geo:lat>  42.4   </geo:lat>
|>
|>Where the datatype of geo:lat is float or double or something like
|>that.
|
| Did you mean that to be datatyped?  If not then the literal graph node

I did.

| denotes a string, not a number.  (The <geo:lat> property may define a
| relation that involves interpreting the string as a number, but such
| an interpretation depends on (extra-RDF) knowledge of the property
| used.  As far as RDF is concerned, it's no different from
|
|     <dc:title>  42.4   </dc:title>
|
| If you *did* mean that to be datatyped, as in:
|
|     <geo:lat rdf:datatype="http://www.w3.org/2001/XMLSchema#double"
|      >  42.4   </geo:lat>
|
| then this goes to the heart of my question.  I'd expect that to
| treated the same as:
|
|     <geo:lat rdf:datatype="http://www.w3.org/2001/XMLSchema#double"
|      >42.4</geo:lat>

So would I.

| But I think the mere fact of being datatyped is insufficient to
| determine the correct whitespace handling, as the xsd:string case
| shows.

Correct. In order to get the whitespace handling right you need to
understand the datatype specified.

Which is impossible, in the general case, I suppose:

     <foo:bar rdf:datatype="http://example.org/XMLSchema#myFooType"
      > 42.4 </geo:lat>

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@Sun.COM / XML Standards Architect / Sun Microsystems, Inc.
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

Received on Monday, 12 July 2004 09:44:29 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:58 UTC