RE: A question for RDF parser implementers - whitespace

Manuel,

While "A" and "A"^^xsd:string are clearly distinct symbols in the abstract 
syntax, the definition of interpretation for RDF plain and datatyped 
literals, taken together with the XML schema datatype definition of the 
string datatype mean that they both denote the same thing, namely a 
sequence of just the Unicode character "A", without any further annotation 
or adornment.

Since they denote the same thing, then the suggested entailments do indeed 
hold, but only in datatyped interpretations which include xsd:string.

You wouldn't be able to make an RDF rule to state this unless you have a 
rule language that allows you access to the parts of datatyped 
values.  (This is something I've yet to add to the datatyped inference 
elements of my Swish software.)

(BTW, although my original question was about whitespace handling, the use 
of an entailment test case was important to demonstrate that this was more 
than a local implementation issue, so I think the entailment question is 
relevant to discuss.)

#g
--

At 14:45 28/07/04 -0400, Manuel Vázquez Acosta wrote:

>Hello all:
>
>I've been reading the whole thread and I came up with a few questions (I
>will use QNames in the sake of brevity):
>
>1. Does rdfIL("A") = rdfIL("A"^^ex:aDataType), for any rfd-interpretation
>rdfI and any datatype ex:aDataType?
>
>I think I read somewhere on the RDF specs this doesn't hold - plain literals
>are a of different order than typed literal, in fact, a typed literal's
>value is given by the datatype lexical-value mapping.
>This must be applied to xds:string as well; and stated that, I don't see how
><ex:subj> <ex:prop> "A" . RDF-entails <ex:subj> <ex:prop> "A"^^xds:string .
>Neither I can make any RDF rule to state this.
>
>I'm aware that the original question was not about RDF-entailment, but
>referred to a parsing problem: Should I keep the whitespaces? Nevertheless,
>since some questions arisen involving RDF-entailment I started to ask myself
>the question above.
>
>Regards,
>Manuel.
>
>Lic. Manuel Vázquez Acosta.
>Chasqui(r)
>
>
>-----Original Message-----
>From: www-rdf-interest-request@w3.org
>[mailto:www-rdf-interest-request@w3.org] On Behalf Of Jos De_Roo
>Sent: Sunday, July 11, 2004 7:27 AM
>To: Graham Klyne <gk
>Cc: Damian Steer; www-rdf-interest@w3.org
>Subject: Re: A question for RDF parser implementers - whitespace
>
>
>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 Thursday, 29 July 2004 04:05:31 UTC