Updated examples in Prefer section to be in request/response format
authorsspeiche
Mon, 16 Jun 2014 09:45:04 -0400
changeset 646 d97c97e51f86
parent 645 c460e6ff7ed0
child 647 42d375eed6cd
Updated examples in Prefer section to be in request/response format
ldp.html
--- a/ldp.html	Mon Jun 16 15:33:25 2014 +0200
+++ b/ldp.html	Mon Jun 16 09:45:04 2014 -0400
@@ -1020,6 +1020,7 @@
 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"
+Transfer-Encoding: chunked
 <!-- @base <http://example.org/c1/>. -->
 @prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
 @prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
@@ -1068,6 +1069,7 @@
 Link: &lt;http://www.w3.org/ns/ldp#RDFSource&gt;; rel="type",
       &lt;http://www.w3.org/ns/ldp#Resource&gt;; rel="type"
 Allow: GET,OPTIONS,HEAD,PUT,DELETE
+Transfer-Encoding: chunked
 <!-- @base <http://example.org/netWorth/nw1>. -->
 @prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
 @prefix o: &lt;http://example.org/ontology#&gt;.
@@ -1121,6 +1123,7 @@
 Link: &lt;http://www.w3.org/ns/ldp#RDFSource&gt;; rel="type",
       &lt;http://www.w3.org/ns/ldp#Resource&gt;; rel="type"
 Allow: GET,OPTIONS,HEAD,PUT,DELETE
+Transfer-Encoding: chunked
 <!-- @base <http://example.org/netWorth/nw1>. -->
 @prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
 @prefix o: &lt;http://example.org/ontology#&gt;.
@@ -1163,6 +1166,7 @@
 Allow: POST,GET,OPTIONS,HEAD
 Link: &lt;http://www.w3.org/ns/ldp#DirectContainer&gt;; rel="type",
       &lt;http://www.w3.org/ns/ldp#Resource&gt;; rel="type"
+Transfer-Encoding: chunked
 <!-- @base <http://example.org/netWorth/nw1/assets/>. -->      
 @prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
 @prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
@@ -1202,6 +1206,7 @@
       &lt;http://www.w3.org/ns/ldp#Resource&gt;; rel="type"
 Accept-Post: text/turtle, application/ld+json
 Allow: POST,GET,OPTIONS,HEAD
+Transfer-Encoding: chunked
 <!-- @base <http://example.org/netWorth/nw1/liabilities/>. -->
 @prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
 @prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
@@ -1288,6 +1293,7 @@
 Link: &lt;http://www.w3.org/ns/ldp#DirectContainer&gt;; rel="type",
       &lt;http://www.w3.org/ns/ldp#Resource&gt;; rel="type"
 Allow: GET,OPTIONS,HEAD,PUT,DELETE
+Transfer-Encoding: chunked
 <!-- @base <http://example.org/netWorth/nw1>. -->
 @prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
 @prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
@@ -1418,19 +1424,19 @@
 <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
+Accept: text/turtle
 Prefer: return=representation; include="http://www.w3.org/ns/ldp#PreferMinimalContainer"
 </pre>
 <p><em>Response:</em></p>
 <pre class="example">HTTP/1.1 200 OK
-Content-Type: text/turtle; charset=UTF-8
+Content-Type: text/turtle
 ETag: "_87e52ce291112"
-Content-Length: 325
 Link: &lt;http://www.w3.org/ns/ldp#DirectContainer&gt;; rel="type",
       &lt;http://www.w3.org/ns/ldp#Resource&gt;; rel="type"
 Accept-Post: text/turtle, application/ld+json
 Allow: POST,GET,OPTIONS,HEAD
-Preference-Applied: return=representation 
+Preference-Applied: return=representation
+Transfer-Encoding: chunked
 
 @prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
 @prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
@@ -2233,36 +2239,34 @@
 	If we assume a container like
 	the one below:
 	</p>
-	<pre class="example" id="prefer-examples-direct">
-	# The following is the representation of
-	#   http://example.org/netWorth/nw1/assets/
-	<!-- @base is here only so it's easier to paste into validators for checking -->
-	# @base &lt;http://example.org/netWorth/nw1/assets/&gt;.
-	@prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
-	@prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
-	@prefix o: &lt;http://example.org/ontology#&gt;.
+<pre class="example" id="prefer-examples-direct"># The following is the representation of
+#   http://example.org/netWorth/nw1/assets/
+<!-- @base is here only so it's easier to paste into validators for checking -->
+# @base &lt;http://example.org/netWorth/nw1/assets/&gt;.
+@prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
+@prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
+@prefix o: &lt;http://example.org/ontology#&gt;.
 
-	&lt;&gt;
-	   a ldp:DirectContainer;
-	   dcterms:title "The assets of JohnZSmith";
-	   ldp:membershipResource &lt;http://example.org/netWorth/nw1&gt;;
-	   ldp:hasMemberRelation o:asset;
-	   ldp:insertedContentRelation ldp:MemberSubject.
+&lt;&gt;
+   a ldp:DirectContainer;
+   dcterms:title "The assets of JohnZSmith";
+   ldp:membershipResource &lt;http://example.org/netWorth/nw1&gt;;
+   ldp:hasMemberRelation o:asset;
+   ldp:insertedContentRelation ldp:MemberSubject.
 
-	&lt;http://example.org/netWorth/nw1&gt;
-	   a o:NetWorth;
-	   o:asset &lt;a1&gt;, &lt;a3&gt;, &lt;a2&gt;.
+&lt;http://example.org/netWorth/nw1&gt;
+   a o:NetWorth;
+   o:asset &lt;a1&gt;, &lt;a3&gt;, &lt;a2&gt;.
 
-	&lt;a1&gt;
-	   a o:Stock;
-	   o:value 100.00 .
-	&lt;a2&gt;
-	   a o:Cash;
-	   o:value 50.00 .
-	&lt;a3&gt;
-	   a o:RealEstateHolding;
-	   o:value 300000 .
-	</pre>
+&lt;a1&gt;
+   a o:Stock;
+   o:value 100.00 .
+&lt;a2&gt;
+   a o:Cash;
+   o:value 50.00 .
+&lt;a3&gt;
+   a o:RealEstateHolding;
+   o:value 300000 .</pre>
 
 	<p id="prefer-examples-direct-minimal-container-only1">
 	Clients interested only in information about the container 
@@ -2275,22 +2279,33 @@
 	and this representation:
 	</p>
 	
-	<pre class="example">
-	# The following is the representation of
-	#   http://example.org/netWorth/nw1/assets/
-	<!-- @base is here only so it's easier to paste into validators for checking -->
-	# @base &lt;http://example.org/netWorth/nw1/assets/&gt;.
-	@prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
-	@prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
-	@prefix o: &lt;http://example.org/ontology#&gt;.
+<em>Request</em> to <code>http://example.org/netWorth/nw1/assets/</code>:
+<pre class="example">GET /netWorth/nw1/assets/ HTTP/1.1
+Host: example.org
+Accept: text/turtle
+Prefer: return=representation; include="http://www.w3.org/ns/ldp#PreferMinimalContainer"
+</pre>
+<em>Response:</em>
+<pre class="example">HTTP/1.1 200 OK
+Content-Type: text/turtle
+ETag: "_87e52ce291112"
+Link: &lt;http://www.w3.org/ns/ldp#DirectContainer&gt;; rel="type",
+      &lt;http://www.w3.org/ns/ldp#Resource&gt;; rel="type"
+Accept-Post: text/turtle, application/ld+json
+Allow: POST,GET,OPTIONS,HEAD
+Preference-Applied: return=representation
+Transfer-Encoding: chunked
+<!-- @base &lt;http://example.org/netWorth/nw1/assets/&gt;. -->
+@prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
+@prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
+@prefix o: &lt;http://example.org/ontology#&gt;.
 
-	&lt;&gt;
-	   a ldp:DirectContainer;
-	   dcterms:title "The assets of JohnZSmith";
-	   ldp:membershipResource &lt;http://example.org/netWorth/nw1&gt;;
-	   ldp:hasMemberRelation o:asset;
-	   ldp:insertedContentRelation ldp:MemberSubject.
-	</pre>
+&lt;http://example.org/netWorth/nw1/assets/&gt;
+   a ldp:DirectContainer;
+   dcterms:title "The assets of JohnZSmith";
+   ldp:membershipResource &lt;http://example.org/netWorth/nw1&gt;;
+   ldp:hasMemberRelation o:asset;
+   ldp:insertedContentRelation ldp:MemberSubject.</pre>
 
 	<p id="prefer-examples-direct-minimal-container-only2">
 	Clients interested only in information about the container 
@@ -2306,22 +2321,33 @@
 	implementing later versions of LDP might return substantively different responses.
 	</p>
 	
-	<pre class="example">
-	# The following is the representation of
-	#   http://example.org/netWorth/nw1/assets/
-	<!-- @base is here only so it's easier to paste into validators for checking -->
-	# @base &lt;http://example.org/netWorth/nw1/assets/&gt;.
-	@prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
-	@prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
-	@prefix o: &lt;http://example.org/ontology#&gt;.
+<em>Request</em> to <code>http://example.org/netWorth/nw1/assets/</code>:
+<pre class="example">GET /netWorth/nw1/assets/ HTTP/1.1
+Host: example.org
+Accept: text/turtle
+Prefer: return=representation; omit="http://www.w3.org/ns/ldp#PreferMembership http://www.w3.org/ns/ldp#PreferContainment"
+</pre>
+<em>Response:</em>
+<pre class="example">HTTP/1.1 200 OK
+Content-Type: text/turtle
+ETag: "_87e52ce291112"
+Link: &lt;http://www.w3.org/ns/ldp#DirectContainer&gt;; rel="type",
+      &lt;http://www.w3.org/ns/ldp#Resource&gt;; rel="type"
+Accept-Post: text/turtle, application/ld+json
+Allow: POST,GET,OPTIONS,HEAD
+Preference-Applied: return=representation 
+Transfer-Encoding: chunked
+<!-- @base &lt;http://example.org/netWorth/nw1/assets/&gt;. -->
+@prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
+@prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
+@prefix o: &lt;http://example.org/ontology#&gt;.
 
-	&lt;&gt;
-	   a ldp:DirectContainer;
-	   dcterms:title "The assets of JohnZSmith";
-	   ldp:membershipResource &lt;http://example.org/netWorth/nw1&gt;;
-	   ldp:hasMemberRelation o:asset;
-	   ldp:insertedContentRelation ldp:MemberSubject.
-	</pre>
+&lt;http://example.org/netWorth/nw1/assets/&gt;
+   a ldp:DirectContainer;
+   dcterms:title "The assets of JohnZSmith";
+   ldp:membershipResource &lt;http://example.org/netWorth/nw1&gt;;
+   ldp:hasMemberRelation o:asset;
+   ldp:insertedContentRelation ldp:MemberSubject.</pre>
 
 	<p id="prefer-examples-direct-membershiponly">
 	Clients interested only in information about the container 
@@ -2342,26 +2368,37 @@
 	the same URI reference provided in the <code>Location</code> header field [[RFC7231]]).
 	</p>
 	
-	<pre class="example">
-	# The following is the representation of
-	#   http://example.org/netWorth/nw1/assets/
-	<!-- @base is here only so it's easier to paste into validators for checking -->
-	# @base &lt;http://example.org/netWorth/nw1/assets/&gt;.
-	@prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
-	@prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
-	@prefix o: &lt;http://example.org/ontology#&gt;.
+<em>Request</em> to <code>http://example.org/netWorth/nw1/assets/</code>:
+<pre class="example">GET /netWorth/nw1/assets/ HTTP/1.1
+Host: example.org
+Accept: text/turtle
+Prefer: return=representation; include="http://www.w3.org/ns/ldp#PreferMembership http://www.w3.org/ns/ldp#PreferMinimalContainer"
+</pre>
+<em>Response:</em>
+<pre class="example">HTTP/1.1 200 OK
+Content-Type: text/turtle
+ETag: "_87e52ce291112"
+Link: &lt;http://www.w3.org/ns/ldp#DirectContainer&gt;; rel="type",
+      &lt;http://www.w3.org/ns/ldp#Resource&gt;; rel="type"
+Accept-Post: text/turtle, application/ld+json
+Allow: POST,GET,OPTIONS,HEAD
+Preference-Applied: return=representation
+Transfer-Encoding: chunked
+<!-- @base &lt;http://example.org/netWorth/nw1/assets/&gt;. -->
+@prefix dcterms: &lt;http://purl.org/dc/terms/&gt;.
+@prefix ldp: &lt;http://www.w3.org/ns/ldp#&gt;.
+@prefix o: &lt;http://example.org/ontology#&gt;.
 
-	&lt;&gt;
-	   a ldp:DirectContainer;
-	   dcterms:title "The assets of JohnZSmith";
-	   ldp:membershipResource &lt;http://example.org/netWorth/nw1&gt;;
-	   ldp:hasMemberRelation o:asset;
-	   ldp:insertedContentRelation ldp:MemberSubject.
+&lt;http://example.org/netWorth/nw1/assets/&gt;
+   a ldp:DirectContainer;
+   dcterms:title "The assets of JohnZSmith";
+   ldp:membershipResource &lt;http://example.org/netWorth/nw1&gt;;
+   ldp:hasMemberRelation o:asset;
+   ldp:insertedContentRelation ldp:MemberSubject.
 
-	&lt;http://example.org/netWorth/nw1&gt;
-	   a o:NetWorth;
-	   o:asset &lt;a1&gt;, &lt;a3&gt;, &lt;a2&gt;.
-	</pre>
+&lt;http://example.org/netWorth/nw1&gt;
+   a o:NetWorth;
+   o:asset &lt;a1&gt;, &lt;a3&gt;, &lt;a2&gt;.</pre>
 
 	</section> <!-- Prefer examples -->
 
@@ -2523,6 +2560,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 Prefer section to be in request/response format (SS) </li>
 	<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>