--- a/ldp.html Mon Jun 16 10:43:42 2014 +0200
+++ b/ldp.html Mon Jun 16 08:31:26 2014 -0400
@@ -1006,14 +1006,25 @@
container with only three members and some information about the
container (the fact that it is a container and a brief title):</p>
-<pre class="example" id="ldpc-ex-simple"># The following is the representation of
-# http://example.org/c1/
-<!-- @base is here only so it's easier to paste into validators for checking -->
-# @base <http://example.org/c1/>
+<em>Request</em> to <code>http://example.org/c1/</code>:
+<pre class="example" id="ldpc-ex-simple-req">GET /c1/ HTTP/1.1
+Host: example.org
+Accept: text/turtle</pre>
+
+<em>Response:</em>
+<pre class="example" id="ldpc-ex-simple">HTTP/1.1 200 OK
+Content-Type: text/turtle
+Date: Thu, 12 Jun 2014 18:26:59 GMT
+ETag: 2014-06-12T18:25:43.46Z
+Accept-Post: text/turtle, application/ld+json
+Allow: POST,GET,OPTIONS,HEAD,PUT
+Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel="type",
+ <http://www.w3.org/ns/ldp#Resource>; rel="type"
+<!-- @base <http://example.org/c1/>. -->
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
-<>
+<http://example.org/c1/>
a ldp:BasicContainer;
dcterms:title "A very simple container";
ldp:contains <r1>, <r2>, <r3>.</pre>
@@ -1044,13 +1055,24 @@
a predicate from an application's domain model as the membership predicate. Let's
start with a pre-existing domain resource for a person's net worth, as illustrated below:</p>
-<pre class="example" id="ldpc-ex-membership-partial"># The following is a representation of
-# http://example.org/netWorth/nw1
-<!-- @base is here only so it's easier to paste into validators for checking -->
-# @base <http://example.org/netWorth/nw1/>
+<em>Request</em> to <code>http://example.org/netWorth/nw1</code>:
+<pre class="example" id="ldpc-ex-membership-partial-req">GET /netWorth/nw1 HTTP/1.1
+Host: example.org
+Accept: text/turtle</pre>
+
+<em>Response:</em>
+<pre class="example" id="ldpc-ex-membership-partial">HTTP/1.1 200 OK
+Content-Type: text/turtle
+Date: Thu, 12 Jun 2014 18:26:59 GMT
+ETag: 2014-06-12T18:25:43.46Z
+Link: <http://www.w3.org/ns/ldp#RDFSource>; rel="type",
+ <http://www.w3.org/ns/ldp#Resource>; rel="type"
+Allow: GET,OPTIONS,HEAD,PUT,DELETE
+<!-- @base <http://example.org/netWorth/nw1>. -->
@prefix ldp: <http://www.w3.org/ns/ldp#>.
-@prefix o: <http://example.org/ontology/>.
-<>
+@prefix o: <http://example.org/ontology#>.
+
+<http://example.org/netWorth/nw1>
a o:NetWorth;
o:netWorthOf <http://example.org/users/JohnZSmith>;
o:asset
@@ -1082,17 +1104,28 @@
as separate HTTP resources. Existing clients have no need to interact with those containers,
whereas LDP-enabled clients now have container URLs that they can interact with. The existing
resource remains unchanged so that existing clients continue to function normally.
- This is illustrated in the set of related examples (one example per HTTP resource) below:
+ This is illustrated in the set of related examples, one example per HTTP resource, starting with
+ the LDP-RS example from before:
</p>
+
+<em>Request</em> to <code>http://example.org/netWorth/nw1</code>:
+<pre class="example" id="ldpc-ex-membership-full-req">GET /netWorth/nw1 HTTP/1.1
+Host: example.org
+Accept: text/turtle</pre>
-<pre class="example" id="ldpc-ex-membership-full"># The following is a representation of the unchanged net worth LDPR
-# http://example.org/netWorth/nw1
-<!-- @base is here only so it's easier to paste into validators for checking -->
-# @base <http://example.org/netWorth/nw1/>.
+<em>Response:</em>
+<pre class="example" id="ldpc-ex-membership-full">HTTP/1.1 200 OK
+Content-Type: text/turtle
+Date: Thu, 12 Jun 2014 18:26:59 GMT
+ETag: 2014-06-12T18:25:43.46Z
+Link: <http://www.w3.org/ns/ldp#RDFSource>; rel="type",
+ <http://www.w3.org/ns/ldp#Resource>; rel="type"
+Allow: GET,OPTIONS,HEAD,PUT,DELETE
+<!-- @base <http://example.org/netWorth/nw1>. -->
@prefix ldp: <http://www.w3.org/ns/ldp#>.
-@prefix dcterms: <http://purl.org/dc/terms/>.
-@prefix o: <http://example.org/ontology/>.
-<>
+@prefix o: <http://example.org/ontology#>.
+
+<http://example.org/netWorth/nw1>
a o:NetWorth;
o:netWorthOf <http://example.org/users/JohnZSmith>;
o:asset
@@ -1116,17 +1149,29 @@
and flexibility on how to specify the <a title="Membership triples">membership triples</a>.
</p>
-<pre class="example" id="ldpc-ex-membership-subj"># The following is a representation of the asset container
-# http://example.org/netWorth/nw1/assets/
-<!-- @base is here only so it's easier to paste into validators for checking -->
-# @base <http://example.org/netWorth/nw1/assets/>.
+<em>Request</em> to <code>http://example.org/netWorth/nw1/assets/</code>:
+<pre class="example" id="ldpc-ex-membership-subj-req">GET /netWorth/nw1/assets/ HTTP/1.1
+Host: example.org
+Accept: text/turtle</pre>
+
+<em>Response:</em>
+<pre class="example" id="ldpc-ex-membership-subj">HTTP/1.1 200 OK
+Content-Type: text/turtle
+Date: Thu, 12 Jun 2014 18:26:59 GMT
+ETag: 2014-06-12T18:25:43.46Z
+Accept-Post: text/turtle, application/ld+json
+Allow: POST,GET,OPTIONS,HEAD
+Link: <http://www.w3.org/ns/ldp#DirectContainer>; rel="type",
+ <http://www.w3.org/ns/ldp#Resource>; rel="type"
+<!-- @base <http://example.org/netWorth/nw1/assets/>. -->
@prefix ldp: <http://www.w3.org/ns/ldp#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
-@prefix o: <http://example.org/ontology/>.
-<>
+@prefix o: <http://example.org/ontology#>.
+
+<http://example.org/netWorth/nw1/assets/>
a ldp:DirectContainer;
dcterms:title "The assets of JohnZSmith";
- ldp:membershipResource <http://example.org/netWorth/nw1/>;
+ ldp:membershipResource <http://example.org/netWorth/nw1>;
ldp:hasMemberRelation o:asset;
ldp:contains <a1>, <a2>.
</pre>
@@ -1143,18 +1188,29 @@
<p>The second container is a <a title="Linked Data Platform Direct Container">LDP Direct Container</a> to manage liabilities.
</p>
+<em>Request</em> to <code>http://example.org/netWorth/nw1/liabilities/</code>:
+<pre class="example" id="ldpc-ex-membership-full-liabcont-req">GET /netWorth/nw1/liabilities/ HTTP/1.1
+Host: example.org
+Accept: text/turtle</pre>
-<pre class="example" id="ldpc-ex-membership-full-liabcont"># The following is a representation of the liability container
-# http://example.org/netWorth/nw1/liabilities/
-<!-- @base is here only so it's easier to paste into validators for checking -->
-# @base <http://example.org/netWorth/nw1/liabilities/>.
+<em>Response:</em>
+<pre class="example" id="ldpc-ex-membership-full-liabcont">HTTP/1.1 200 OK
+Content-Type: text/turtle
+Date: Thu, 12 Jun 2014 18:26:59 GMT
+ETag: 2014-06-12T18:25:43.46Z
+Link: <http://www.w3.org/ns/ldp#DirectContainer>; rel="type",
+ <http://www.w3.org/ns/ldp#Resource>; rel="type"
+Accept-Post: text/turtle, application/ld+json
+Allow: POST,GET,OPTIONS,HEAD
+<!-- @base <http://example.org/netWorth/nw1/liabilities/>. -->
@prefix ldp: <http://www.w3.org/ns/ldp#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
-@prefix o: <http://example.org/ontology/>.
-<>
+@prefix o: <http://example.org/ontology#>.
+
+<http://example.org/netWorth/nw1/liabilities/>
a ldp:DirectContainer;
dcterms:title "The liabilities of JohnZSmith";
- ldp:membershipResource <http://example.org/netWorth/nw1/>;
+ ldp:membershipResource <http://example.org/netWorth/nw1>;
ldp:hasMemberRelation o:liability;
ldp:contains <l1>, <l2>, <l3>.
</pre>
@@ -1167,24 +1223,36 @@
To add a another liability, a client would POST something like this to the liability container:
</p>
-<pre class="example" id="ldpc-ex-membership-add-new-liability"># The following is a representation of the liability to be added
-# http://example.org/netWorth/nw1/liabilities/new
+<em>Request</em> to <code>http://example.org/netWorth/nw1/liabilities/</code>:
+<pre class="example" id="ldpc-ex-membership-add-new-liability-req">POST /netWorth/nw1/liabilities/ HTTP/1.1
+Host: example.org
+Accept: text/turtle
+Content-Type: text/turtle
+Content-Length: 63
<!-- @base is here only so it's easier to paste into validators for checking -->
-# @base <http://example.org/netWorth/nw1/liabilities/new>.
-@prefix o: <http://example.org/ontology/>.
+@prefix o: <http://example.org/ontology#>.
+
<>
a o:Liability.
# plus any other properties that the domain says liabilities have
</pre>
+<em>Response:</em>
+<pre class="example" id="ldpc-ex-membership-add-new-liability">HTTP/1.1 201 Created
+Location: http://example.org/netWorth/nw1/liabilities/l4
+Date: Thu, 12 Jun 2014 19:56:13 GMT
+Link: <http://www.w3.org/ns/ldp#DirectContainer>; rel="type",
+ <http://www.w3.org/ns/ldp#Resource>; rel="type"
+</pre>
+
<p>
Assuming the server successfully processes this request and assigns the URI
<code><http://example.org/netWorth/nw1/liabilities/l4></code> to the
newly created liability resource, at least two new triples would be added.
</p>
<ol>
- <li>In the net worth resource, <code>o:liability <l4></code></li>
- <li>In the liability container, <code>ldp:contains <l4></code>.</li>
+ <li>In the net worth resource, <code><http://example.org/netWorth/nw1> o:liability <liabilities/l4></code></li>
+ <li>In the liability container, <code><http://example.org/netWorth/nw1/liabilities/> ldp:contains <l4></code>.</li>
</ol>
<p>
@@ -1206,17 +1274,27 @@
advisors (people) that have managed the assets and liabilities. We have decided
to identify these advisors with URLs that contain a fragment (hash) to represent
these real-world resources, not the documents that describe them.</p>
-
-<pre class="example" id="ldpc-ex-membership-full-elab"># The following is an elaborated representation of
-# http://example.org/netWorth/nw1
-# Adding o:advisor but eaving off o:asset and o:liability for brevity.
-<!-- @base is here only so it's easier to paste into validators for checking -->
-# @base <http://example.org/netWorth/nw1/>
+
+<em>Request</em> to <code>http://example.org/netWorth/nw1</code>:
+<pre class="example" id="ldpc-ex-membership-full-elab-req">GET /netWorth/nw1 HTTP/1.1
+Host: example.org
+Accept: text/turtle</pre>
+
+<em>Response:</em>
+<pre class="example" id="ldpc-ex-membership-full-elab">HTTP/1.1 200 OK
+Content-Type: text/turtle
+Date: Thu, 12 Jun 2014 18:26:59 GMT
+ETag: 2014-06-12T18:25:43.46Z
+Link: <http://www.w3.org/ns/ldp#DirectContainer>; rel="type",
+ <http://www.w3.org/ns/ldp#Resource>; rel="type"
+Allow: GET,OPTIONS,HEAD,PUT,DELETE
+<!-- @base <http://example.org/netWorth/nw1>. -->
@prefix ldp: <http://www.w3.org/ns/ldp#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
-@prefix o: <http://example.org/ontology/>.
-<>
+@prefix o: <http://example.org/ontology#>.
+
+<http://example.org/netWorth/nw1>
a o:NetWorth;
o:netWorthOf <http://example.org/users/JohnZSmith>;
o:advisor
@@ -1250,27 +1328,38 @@
<p>
To add a another advisor, a client would POST something like this to the advisors container:
</p>
-
-<pre class="example" id="ldpc-ex-membership-add-new-advisor"># The following is a representation of the advisor to be added
-# http://example.org/netWorth/nw1/advisors/new
-<!-- @base is here only so it's easier to paste into validators for checking -->
-# @base <http://example.org/netWorth/nw1/advisors/new>.
+<em>Request</em> to <code>http://example.org/netWorth/nw1/advisors/</code>:
+<pre class="example" id="ldpc-ex-membership-add-new-advisor">POST /netWorth/nw1/advisors/ HTTP/1.1
+Host: example.org
+Accept: text/turtle
+Content-Type: text/turtle
+Slug: george
+Content-Length: 72
+<!-- @base <http://example.org/netWorth/nw1/advisors/george>. -->
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
-@prefix o: <http://example.org/ontology/>.
+@prefix o: <http://example.org/ontology#>.
<>
a o:Advisor;
foaf:primaryTopic <#me>.
# plus any other properties that the domain says advisors have
</pre>
+<em>Response:</em>
+<pre class="example" id="ldpc-ex-membership-add-new-advisor">HTTP/1.1 201 Created
+Location: http://example.org/netWorth/nw1/advisors/george
+Date: Thu, 12 Jun 2014 19:56:13 GMT
+Link: <http://www.w3.org/ns/ldp#RDFSource>; rel="type",
+ <http://www.w3.org/ns/ldp#Resource>; rel="type"
+</pre>
+
<p>
Assuming the server successfully processes this request and assigns the URI
<code><http://example.org/netWorth/nw1/advisors/george></code> to the
newly created advisor resource, at least two new triples would be added.
</p>
<ol>
- <li>In the net worth resource, <code>o:advisor <advisors/george#me></code></li>
- <li>In the advisors container, <code>ldp:contains <george></code></li>
+ <li>In the net worth resource, <code><http://example.org/netWorth/nw1> o:advisor <advisors/george#me></code></li>
+ <li>In the advisors container, <code><http://example.org/netWorth/nw1/advisors/> ldp:contains <george></code></li>
</ol>
<p>In summary, <a href="#fig-ldpc-types"></a> illustrates the LDP-defined container types: Basic, Direct, and Indirect, along
@@ -1326,18 +1415,21 @@
Here is an example requesting the minimal-container triples of a
container identified by the URL <code>http://example.org/container1/</code>.
</p>
-<p id="ldpc-ex-minimal-container">Request:</p>
-<pre class="example">GET /container1 HTTP/1.1
+<p id="ldpc-ex-minimal-container"><em>Request</em> to <code>http://example.org/container1/</code>:</p>
+<pre class="example">GET /container1/ HTTP/1.1
Host: example.org
Accept: text/turtle; charset=UTF-8
Prefer: return=representation; include="http://www.w3.org/ns/ldp#PreferMinimalContainer"
</pre>
-<p>Response:</p>
+<p><em>Response:</em></p>
<pre class="example">HTTP/1.1 200 OK
Content-Type: text/turtle; charset=UTF-8
ETag: "_87e52ce291112"
Content-Length: 325
-Link: <http://www.w3.org/ns/ldp#DirectContainer>; rel="type"
+Link: <http://www.w3.org/ns/ldp#DirectContainer>; rel="type",
+ <http://www.w3.org/ns/ldp#Resource>; rel="type"
+Accept-Post: text/turtle, application/ld+json
+Allow: POST,GET,OPTIONS,HEAD
Preference-Applied: return=representation
@prefix dcterms: <http://purl.org/dc/terms/>.
@@ -2148,7 +2240,7 @@
# @base <http://example.org/netWorth/nw1/assets/>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
- @prefix o: <http://example.org/ontology/>.
+ @prefix o: <http://example.org/ontology#>.
<>
a ldp:DirectContainer;
@@ -2190,7 +2282,7 @@
# @base <http://example.org/netWorth/nw1/assets/>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
- @prefix o: <http://example.org/ontology/>.
+ @prefix o: <http://example.org/ontology#>.
<>
a ldp:DirectContainer;
@@ -2221,7 +2313,7 @@
# @base <http://example.org/netWorth/nw1/assets/>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
- @prefix o: <http://example.org/ontology/>.
+ @prefix o: <http://example.org/ontology#>.
<>
a ldp:DirectContainer;
@@ -2257,7 +2349,7 @@
# @base <http://example.org/netWorth/nw1/assets/>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
- @prefix o: <http://example.org/ontology/>.
+ @prefix o: <http://example.org/ontology#>.
<>
a ldp:DirectContainer;
@@ -2431,6 +2523,7 @@
<h2>Detailed history</h2>
<!-- <blockquote><em><a href="http://www.w3.org/TR/2013/WD-ldp-20130930/">Candidate Recommendation Draft</a></em></blockquote> -->
<ul>
+ <li>2014-06-16 - Updated examples in container sections to be in request/response format (SS) </li>
<li>2014-06-10 - Use http-bis and Prefer RFC numbers, adjust BNF to match bis changes (JA) </li>
<li>2014-06-05 - Fixed LC1 date in change history pseudo-heading, was 2014 (JA) </li>
<li>2014-05-19 - Revert membership definition to be about LDPCs, not LDP-RS's (JA) </li>