Re: text "MUST replace in the graph"

Sandro Hawke wrote:

> Yeah, I'm concerned about the case of people making an "RDF Syntax" that
> you might not consider an "RDF Syntax" since it doesn't support plain
> literals.  I think the important thing is to say that every RDF graph
> serialization format should mandate using EITHER a special syntax for
> plain literals OR rdf:text, but not both.

Sorry, I can't follow this.

An RDF serialization needs to have some way to represent 
lang-tagged-plain-literals period. I don't see this as an either/or 
situation.

The thing is that any alternative serialization has to preserve the RDF 
data model and in that model lang-tagged-plain-literals do not have a 
datatype and cannot be queried for one in SPARQL.

If some future serialization of RDF used rdf:text in its serialization 
of plain literals but preserved the RDF model then so be it but unless 
it's going to change RDF then it wouldn't be serializing a typed literal 
in that case which would seem distinctly odd.  I guess I don't see the 
value of keeping that option open.

> And since all existing
> formats don't give their answer to this choice (and some future ones
> wont either), we just declare that if the format provides plain literals
> and/or doesn't say you have to use rdf:text, then you shouldn't use
> rdf:text in it.
> 
> How's this:
> 
>       Despite the semantic equivalence between typed rdf:text RDF
>       literals and plain RDF literals, the presence of rdf:text literals
>       in an RDF graph might cause interoperability problems.  For
>       example, if an RDF graph containing rdf:text literals is
>       serialized in RDF/XML, a system may receive it which does not
>       implement rdf:text handling.  Such a system will typically treat
>       these literals opaquely, storing them without processing and not
>       matching them to plain literals.

It's not just "not matching them" it is (a) required by the RDF spec to 
issue a warning and (b) would treat them as typed literals and thus be 
queriable as such in SPARQL.

>       To avoid this problematic behavior, tools which support rdf:text
>       MUST replace in the graph each rdf:text literal with the
>       correspinding plain RDF literal before transmitting the graph to
>       any system which is not required to implement rdf:text handling.
>       In practice this means the replacement SHOULD be done before
>       serializing in any RDF format which supports plain literals, since
>       systems reading such a format will typically omit rdf:text
>       handling.  In contrast, some formats for RDF may provide only
>       typed literals and thus require that each plain literal be
>       replaced by the corresponding rdf:text typed literal before
>       transmission.

That seems to fudge the existing distinction between plain and typed 
literals. No case has been made for changing the RDF model to only have 
typed literals. I personally wouldn't object but only if done in the 
context of a more extensive, community supported, RDF overhaul. 
Improving the serialization of lang-tagged-literals is certainly a long 
way down my own list of pieces of RDF that need working on.

Dave

>>> -----Original Message-----
>>> From: public-rdf-text-request@w3.org [mailto:public-rdf-text-request@w3.org
>> ]
>>> On Behalf Of Sandro Hawke
>>> Sent: 06 April 2009 18:02
>>> To: public-rdf-text@w3.org
>>> Subject: rdf:text "MUST replace in the graph"
>>>
>>>
>>> (This is my second substantive comment in my rdf:text review; so far all
>>> my other comments are editorial, and I'll send them along separately.)
>>>
>>> I don't think the text at the end of section 4 is quite right.  It
>>> currently says:
>>>
>>>      Despite the semantic equivalence between typed rdf:text RDF
>>>      literals and plain RDF literals, the presence of typed rdf:text RDF
>>>      literals in an RDF graph might cause interoperability problems
>>>      between RDF tools, as not all RDF tools will support
>>>      rdf:text. Therefore, before exchanging an RDF graph with other RDF
>>>      tools, an RDF tool that suports rdf:text MUST replace in the graph
>>>      each typed rdf:text RDF literal with the corresponding plain RDF
>>>      literal. The notion of graph exchange includes, but is not limited
>>>      to, the process of serializing an RDF graph using any (normative or
>>>      nonnormative) RDF syntax.
>>>
>>> The problem with this is that it forbids use of rdf:text in interchange
>>> in the future.  In fact, RIF can be used to interchange RDF Graphs (by
>>> stating ground frame facts,), but it's forbidden by this text from
>>> including internationalized strings!  More seriously, I expect new
>>> machine formats for RDF would use rdf:text, but this forbids it.
>>>
>>> I think this can be fixed by adding a little phrase, which I've put in
>>> all-caps below, just to show the change:
>>>
>>>      Despite the semantic equivalence between typed rdf:text RDF
>>>      literals and plain RDF literals, the presence of typed rdf:text RDF
>>>      literals in an RDF graph might cause interoperability problems
>>>      between RDF tools, as not all RDF tools will support
>>>      rdf:text. Therefore, before exchanging an RDF graph with other RDF
>>>      tools, an RDF tool that suports rdf:text MUST replace in the graph
>>>      each typed rdf:text RDF literal with the corresponding plain RDF
>>> ->   literal, UNLESS THE EXCHANGE FORMAT BEING USED MANDATES THAT
>>> ->   RECIEVERS SUPPORT RDF:TEXT.  The notion of graph exchange includes,
>>>      but is not limited to, the process of serializing an RDF graph
>>>      using any (normative or nonnormative) RDF syntax.
>>>
>>> The paragraph could be re-written to be smoother, but I think that's the
>>> minimal change we need here.
>>>
>>>     -- Sandro
>>>
>>>
> 

Received on Monday, 6 April 2009 21:27:59 UTC