Re: A question for RDF parser implementers - whitespace

Hi Jos,

Allowing for some email-inserted newlines, I agree with all of your results 
(good of me, eh ;-).

Just in case it wasn't clear, my specific point of disagreement with Damian 
was concerning two strings which had different amounts of surrounding 
whitespace:

[[
<dc:title> The trouble with spaces </dc:title>
]]

and

[[
   <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >   The trouble with spaces   </dc:title>
]]

(dropping the language tag:  I think a plain string with language tag can 
never be the same as an xsd:string value under the defined regime.)

#g
--

At 13:27 11/07/04 +0200, Jos De_Roo wrote:
>Graham,
>
>I ran those test cases and found that
>
>[[
>@prefix dc:      <http://purl.org/dc/elements/1.1/> .
>@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>@prefix :        <#> .
>
><http://www.example.org/>
>       dc:title "  The trouble with spaces   " .
>]]
>
>entails
>
>[[
>@prefix dc:      <http://purl.org/dc/elements/1.1/> .
>@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>@prefix :        <#> .
>
><http://www.example.org/>
>       dc:title "  The trouble with spaces
>"^^<http://www.w3.org/2001/XMLSchema#string> .
>]]
>
>but that
>
>[[
>@prefix dc:      <http://purl.org/dc/elements/1.1/> .
>@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>@prefix :        <#> .
>
><http://www.example.org/>
>       dc:title "  The trouble with spaces   "@en .
>]]
>
>does *not* entail
>
>[[
>@prefix dc:      <http://purl.org/dc/elements/1.1/> .
>@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>@prefix :        <#> .
>
><http://www.example.org/>
>       dc:title "  The trouble with spaces
>"^^<http://www.w3.org/2001/XMLSchema#string> .
>]]
>
>and that
>
>[[
>@prefix dc:      <http://purl.org/dc/elements/1.1/> .
>@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>@prefix :        <#> .
>
><http://www.example.org/>
>       dc:title "  The trouble with spaces   "@en-US .
>]]
>
>does *not* entail
>
>[[
>@prefix dc:      <http://purl.org/dc/elements/1.1/> .
>@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>@prefix :        <#> .
>
><http://www.example.org/>
>       dc:title "  The trouble with spaces   "@en-GB .
>]]
>
>and that
>
>[[
>@prefix dc:      <http://purl.org/dc/elements/1.1/> .
>@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>@prefix :        <#> .
>
><http://www.example.org/>
>       dc:title "  The trouble with spaces   "@en-GB .
>]]
>
>does *not* entail
>
>[[
>@prefix dc:      <http://purl.org/dc/elements/1.1/> .
>@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>@prefix :        <#> .
>
><http://www.example.org/>
>       dc:title "  The trouble with spaces   " .
>]]
>
>:)
>
>--
>Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/
>
>
>
>
>Graham Klyne <gk@ninebynine.org>
>Sent by: www-rdf-interest-request@w3.org
>11/07/2004 12:39
>
>
>         To:     Damian Steer <damian.steer@hp.com>
>         cc:     www-rdf-interest@w3.org
>         Subject:        Re: A question for RDF parser implementers - 
> whitespace
>
>
>
>At 10:10 11/07/04 +0100, Damian Steer wrote:
>
> >On 9 Jul 2004, at 14:09, Graham Klyne wrote:
> >
> >>
> >>Hmmm.  Let's try a test case.
> >>
> >>Does this:
> >>
> >>      <dc:title>  The trouble with spaces   </dc:title>
> >
> >...
> >
> >>
> >>RDF-entail this:
> >>
> >>      <dc:title
> >> rdf:datatype="http://www.w3.org/2001/XMLSchema#string">  The trouble
> >> with spaces   </dc:title>
> >
> >...
> >
> >>I think it should, but under your suggested regime I think it would not.
> >
> >I think the specs support Norm's regime here. Try this:
> >
> ><dc:title xml:lang="en"> The trouble with spaces </dc:title>
> >
> >A reasonable extension of your inference would give:
> >
> ><dc:title xml:lang="en"
> >rdf:datatype="http://www.w3.org/2001/XMLSchema#string">  The trouble with
> >spaces   </dc:title>
>
>(Ignoring the language tags) I would not accept that as an expected
>entailment.  They are different string values.
>
> >But (strangely, I confess) the latter is invalid rdf: only plain literals
>
> >can have langs.
> >
> >So you either maintain the orthogonality of plain- and
>datatyped-literals,
> >or you get a weird restriction on rdf entailments ("...except for
> >lang-tagged literals").
>
>I would also say that the entailment does not hold for the same string
>with
>different language tags, or with- and without- a language tag.
>
>#g
>
>
>------------
>Graham Klyne
>For email:
>http://www.ninebynine.org/#Contact

------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact

Received on Monday, 12 July 2004 04:02:24 UTC