W3C home > Mailing lists > Public > public-ldp@w3.org > March 2014

Re: Practical issues arising from the "null relative URIs"-hack

From: <henry.story@bblfish.net>
Date: Thu, 27 Mar 2014 08:20:09 +0100
Cc: Reto Gmür <reto@apache.org>, "public-ldp@w3.org" <public-ldp@w3.org>
Message-Id: <BB625FFE-9DF5-49E0-8656-9662044D0821@bblfish.net>
To: Pierre-Antoine Champin <pierre-antoine.champin@liris.cnrs.fr>

On 26 Mar 2014, at 12:53, Pierre-Antoine Champin <pierre-antoine.champin@liris.cnrs.fr> wrote:

> Henry, all,
> for the record, I have accepted the fact that the majority in the WG disagrees with me on that point,
> and although I haven't changed my mind about it, I am not suggesting to make such an important change at this point of the process.
> Still,
> On Wed, Mar 26, 2014 at 12:23 PM, henry.story@bblfish.net <henry.story@bblfish.net> wrote:
> On 26 Mar 2014, at 10:29, Reto Gmür <reto@apache.org> wrote:
>> You realize you're forcing developers of clients and servers to operate at a much lower level of abstraction than if LDP would be designed in term of exchanging RDF?
> You need to work at the appropriate level of abstraction.
> Indeed, and the RDF *abstract* syntax seems more appropriate to me (and apparently to Reto) than some of its concrete syntaxes.
> (remember that N-Triple does not allow relative URIs)
> I have implemented this, and so have others.
> Nobody argued that it was impossible...
> There are really a whole number of ways to get this done. 
>> The client cannot use a turtle serializer to create the request body. The client must generate the body by other means or modify the turtle created by a turtle serializer.
> Jena, Sesame and most other serialisers I have seen allow you to take a graph, and serialise it to a relative graph, by specifying a base URL.
> Of course they do, but you can not rely on that.
> Consider the following graph :
> <http://example.org/a> a <http://example.org/B> ;
>     <http://example.org/b> <http://example.org/c>.
> When I serialize it in XML with RDFLib, specifying "http://example.org/" as the base URI, I get
> <?xml version="1.0" encoding="utf-8"?>
> <rdf:RDF
>   xmlns:ns1="http://example.org/"
>   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> >
>   <ns1:D rdf:about="a">
>     <ns1:b rdf:resource="c"/>
>   </ns1:D>
> </rdf:RDF>

That is a bit odd. It has not relativized all the URIs. If I move that to my hard drive and use cwm to
translate that back I get 

$ cwm eg.rdf --ntriples
    <file:///Users/hjs/Documents/card/a>     <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/D> .
    <file:///Users/hjs/Documents/card/a>     <http://example.org/b> <file:///Users/hjs/Documents/card/c> .

Instead of having all the URIs referring to my file system, half of them still refer to the example.org domain. So there seems to be a bug at least at that level.

> You can see that the base URI still appears in the result (as a namespace declaration).
> In my opinion this is not a bug. The base URI you provide to the serializer is just a hint, it does not mandate that this URI is completely absent from the resulting serialization.

A namespace that is not used has no impact on the graph created.  You may think of it as a hint, especially if you know that the transform was done with your version
of redland. But I don't think you can go very far otherwise.

> So I concur with Reto ; LDP as it is specifies prevent the client to rely on standard serializers, which is a pain in the arm.

You seem to have a problem with a specific version of redland. The serialisers I use ( Jena and Sesame ) don't have this problem.


Social Web Architect

Received on Thursday, 27 March 2014 07:20:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:16:37 UTC