W3C home > Mailing lists > Public > public-ldp-wg@w3.org > January 2013

containers examples should end in /

From: Henry Story <henry.story@bblfish.net>
Date: Mon, 14 Jan 2013 14:54:03 +0100
Message-Id: <68BFBD61-B626-4154-8F83-E98BA88D9678@bblfish.net>
To: public-ldp-wg@w3.org
The argument is that instead of having containers
with URLs such as 

  http://example.org/container1 

they should be

  http://example.org/container1/

The argument for this is as follows:

Consider the example 1 as it is currently written:

[[
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.

<http://example.org/container1>
   a ldp:Container;
   dcterms:title "A very simple container";
   rdfs:member
      <http://example.org/container1/member1>,
      <http://example.org/container1/member2>,
      <http://example.org/container1/member3>.
]]

Let us say we make these now into relative URIs, 
as required by ISSUE-29  and ACTION-30. Consider
the difference between the way the two containers
are written:

1. Container URI is  http://example.org/container1/
---------------------------------------------------

Then the relative version of example 1 can be the very 
elegant:

@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.

<> a ldp:Container;
 dcterms:title "A very simple container";
 rdfs:member <member1>, <member2>, <member3> .


2. Container URI is  http://example.org/container1
--------------------------------------------------

If a GET on this container were to return the above 
representation then that would produce a graph isomorphic 
to:

[[
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.

<http://example.org/container1>
   a ldp:Container;
   dcterms:title "A very simple container";
   rdfs:member
      <http://example.org/member1>,
      <http://example.org/member2>,
      <http://example.org/member3>.
]]

That is not what was intended. Therefore the returned document would
have to be the much less elegant:

[[
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.

<> a ldp:Container;
 dcterms:title "A very simple container";
 rdfs:member <container1/member1>, <container1/member2>, <container1/member3> .
]]

So clearly the better solution is to have containers be entities ending
in a "/" .

Henry

A short message from my sponsors: Vive la France!
Social Web Architect
http://bblfish.net/


Received on Monday, 14 January 2013 13:54:38 UTC

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