W3C home > Mailing lists > Public > public-ldp-wg@w3.org > October 2012

Re: Linked Data Platform ISSUE-20: What is the base URI of a POSTed document?

From: Alexandre Bertails <bertails@w3.org>
Date: Thu, 11 Oct 2012 10:08:39 -0400
Message-ID: <5076D2E7.2040906@w3.org>
To: Andy Seaborne <andy.seaborne@epimorphics.com>
CC: Henry Story <henry.story@bblfish.net>, public-ldp-wg <public-ldp-wg@w3.org>
On 10/11/2012 09:54 AM, Andy Seaborne wrote:
> On 11/10/12 13:57, Alexandre Bertails wrote:
>> On 10/11/2012 08:15 AM, Andy Seaborne wrote:
>>> On 11/10/12 12:56, Henry Story wrote:
>>>> What are these violations of the URI spec?
>>>> RFC3986 permits relative URLs ( in section 42 no less;-)
>>> Section 5.1.3 defines how the base URI is determined - it's not an
>>> arbitrary choice.  RDF does not allow relative URIs.
>>> http://www.w3.org/TR/rdf-concepts/#section-Graph-URIref
>>> The complete solution is POST to container, get back a Location:, maybe
>>> a 301 (Moved Permanently), and PUT or POST to the location.  But it's a
>>> round trip and (arguably) an impractical nuisance.
>> This is pretty far from what people do out there with Web APIs...
> Agreed - it's just an example that works without the base URI problem -
> so does SteveB's use of a bNode (except it describes "one of more" but
> that is minor).
>> I believe that it's easy to solve: don't say that you POST an RDF
>> graph, just call it *relative* RDF Graph. In practice, the Container
>> knows what will be the final URL for the document, so it will be able
>> to resolve the URIs.
> Agree and disagree.  There is no such thing as a "relative RDF Graph"
> and you can't now take an off-the-shelf triple store as backing the LDP.
>   I think it is a serious limitation if you can't take
> off-the-shelf-software, as it serious hinders take-up.  Others may
> prefer to have customized software specific to the purpose, based on
> efficiency and convenience.

Sooo, because tools got it wrong for so long, then we should continue
in the same direction?

Also, I've been able to find workarounds in both Jena and Sesame. It's
not theory, it's in banana-rdf.

>>> If you want to use N-triples (no base URI), and the subject is the BPR,
>>> then you have to know the BPR URI before creating the N-Triples.
>> No, this is just wrong: you want to be able to define the graph
>> without knowing where it will live beforehand.
> Yes - you want to  define the graph without knowing where it will live
> beforehand. - in N-Triples, how would you do that?
> A BPR is statements about a subject and (4.1.2) the subject of the
> statements is typically the BPR itself.

My experience proves that this is actually an anti-pattern. We should
encourage people to use hash tags as relative URIs.

<> should be used for the document itself, not for the data that it

It's also fine to use ".." to denote things that are not in the same

> So if you want to POST to a container to create a new BPR with certain
> statements (one or more), you need to know the URI of the BPR to create
> the statements before you POST.
> We have discussed the trick of using <> in Turtle.
> In N-Triples, there is no such trick.  All syntax URIs are absolute.

If you can't define a relative graph in N-Triples but you need to do
it, then don't use N-Triples... It's not like we don't have

> Therefore to send to an unknown place you must have the URI to construct
> the N-Triples.  But you don't know the URI.  oops!
> (and Slug: is suggested, not required, and of course there are clashes
> and auto-increment to be considered).

Not sure I understand this comment. I may have missed something in a
previous conversation.


>      Andy
>> Alexandre.
>>>      Andy
Received on Thursday, 11 October 2012 14:08:51 UTC

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