Re: A question for RDF parser implementers - whitespace

/ 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