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: Henry Story <henry.story@bblfish.net>
Date: Thu, 11 Oct 2012 14:36:40 +0200
Cc: Henry Story <henry.story@bblfish.net>, public-ldp-wg <public-ldp-wg@w3.org>
Message-Id: <17F3AEFF-E2EB-41BF-9A32-C9B365FF1EB0@bblfish.net>
To: Andy Seaborne <andy.seaborne@epimorphics.com>

On 11 Oct 2012, at 14:15, Andy Seaborne <andy.seaborne@epimorphics.com> 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

yes, those are evident problems with those specs, which is part of the reasons
why RDF has had a lot of trouble catching on. Later specs one can see trying
to find space for these evidently important concepts, eg:

http://www.w3.org/TR/rdf11-concepts/
[[ 
Some concrete syntaxes permit relative IRIs as a shorthand for absolute IRIs, and define how to resolve the relative IRIs against a base IRI.
]]

I mean even RDF/XML has space for relative URLs! Every web designer knows about
these. 

> 
> The complete solution is POST to container, get back a Location:, maybe a 301 (Moved Permanently), and PUT or POST to the location.

One can do a LOT better. Just follow RFC5995

  http://tools.ietf.org/html/rfc5995#section-3.4

>>Request

   POST /collection;add-member/ HTTP/1.1
   Host: example.com
   Content-Type: text/plain
   Slug: Sample Title
   Content-Length: 67

   @prefix foaf: <http://xmlns.com/foaf/0.1/>
   <> a foaf:Document .


>>Response

   HTTP/1.1 201 Created
   Location: http://example.com/collection/sample%20title


>  But it's a round trip and (arguably) an impractical nuisance.
> 
> 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.
> 
> 	Andy
> 

Social Web Architect
http://bblfish.net/


Received on Thursday, 11 October 2012 12:37:14 UTC

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