Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conneg self canonical #1166

Merged
merged 3 commits into from
Nov 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 21 additions & 20 deletions connegp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ <h4>list profiles</h4>
# &amp; XML Media Types.
Link:
&lt;http://example.org/resource/a?_profile=profile-x&amp;_mediatype=text/html>;
rel="self"; type="text/html";
rel="canonical"; type="text/html";
profile="http://otherexample.org/profile/x",
&lt;http://example.org/resource/a?_profile=profile-x&amp;_mediatype=text/xml>;
rel="alternate";
Expand Down Expand Up @@ -893,11 +893,12 @@ <h3>Hypertext Transfer Protocol Headers</h3>
<h3>list profiles</h3>
<p>
The preferred way to retrieve a list of profiles the server supports for a specific resource
is to issue a <code>GET</code> or <code>HEAD</code> request for that resource.
In either case, a server implementing
is to issue a <code>GET</code> or <code>HEAD</code> request for that resource.
In either case, a server implementing
content negotiation by profile SHOULD return an HTTP <code>Link</code> header containing information about the
default representation of that resource and information about any alternate representations of that
resource conforming to other profiles. The returned representation will be identified by <code>rel="self"</code>, other representations by
default and any alternate representations of that
resource including profiles they conform to. The default representation &ndash; the one that will be returned when no specific representation is requested &ndash;
will be identified by <code>rel="canonical"</code>, other representations by
<code>rel="alternate"</code>.
</p>
<p>As an example, consider the resource <code>http://example.org/resource/a</code> available
Expand All @@ -924,7 +925,7 @@ <h3>list profiles</h3>
Content-Profile: &lt;urn:example:profile:x&gt;
Link:
&lt;http://example.org/resource/a&gt;;
rel="self";
rel="canonical";
type="text/turtle";
profile="urn:example:profile:x",
&lt;http://example.org/resource/a&gt;;
Expand Down Expand Up @@ -968,7 +969,7 @@ <h3>list profiles</h3>
Content-Profile: &lt;urn:example:profile:x>
Link:
<strong>&lt;http://example.org/resource/a.prof1.ttl&gt;;</strong>
rel="self";
rel="canonical";
type="text/turtle";
profile="urn:example:profile:x",
&lt;http://example.org/resource/a&gt;;
Expand Down Expand Up @@ -1019,7 +1020,7 @@ <h4>HTTP Alternate Representations Data Model Implementation</h4>
</p>
<ul>
<li><em>link target</em> - <code>&lt;http://example.org/resource/a.prof1.ttl&gt;</code></li>
<li><em>relation type</em> - <code>rel="self"</code></li>
<li><em>relation type</em> - <code>rel="canonical"</code></li>
<li><em>target attributes</em> - <code>type="text/turtle"</code> &amp; <code>profile="urn:example:profile:x"</code></li>
</ul>
<p>
Expand Down Expand Up @@ -1054,7 +1055,7 @@ <h4>HTTP Alternate Representations Data Model Implementation</h4>
<td><code>altp:hasRepresentation</code></td><td>the implicit relation between the <em>link context</em> URI and the <em>link target</em> URI where a <em>relation type</em> of <code>alternate</code> is given</td>
</tr>
<tr>
<td><code>altp:hasDefaultRepresentation</code></td><td>the implicit relation between the <em>link context</em> URI and the <em>link target</em> URI where a <em>relation type</em> of <code>self</code> is given</td>
<td><code>altp:hasDefaultRepresentation</code></td><td>the implicit relation between the <em>link context</em> URI and the <em>link target</em> URI where a <em>relation type</em> of <code>canonical</code> is given</td>
</tr>
</table>
<figcaption>
Expand All @@ -1073,7 +1074,7 @@ <h4>HTTP Alternate Representations Data Model Implementation</h4>
# (&lt;http://example.org/resource/a&gt;; &rarr; &lt;http://example.org/resource/different&gt;;)
Link:
&lt;http://example.org/resource/a&gt;;
rel="self";
rel="canonical";
type="text/turtle";
profile="urn:example:profile:x",
&lt;http://example.org/resource/a&gt;;
Expand Down Expand Up @@ -1190,7 +1191,7 @@ <h3>Token mappings</h3>
Link:
&lt;http://www.w3.org/ns/dx/prof/Profile&gt;; rel="type"; token="dnb"; anchor=&lt;urn:example:profile:marc21-dnb&gt;,
&lt;http://www.w3.org/ns/dx/prof/Profile&gt;; rel="type"; token="loc"; anchor=&lt;http://example.org/profiles/marc21-loc&gt;,
&lt;http://example.org/resource/a.profdnb.ttl&gt;; rel="self"; type="text/turtle"; profile="urn:example:profile:marc21-dnb",
&lt;http://example.org/resource/a.profdnb.ttl&gt;; rel="canonical"; type="text/turtle"; profile="urn:example:profile:marc21-dnb",
&lt;http://example.org/resource/a.profloc.ttl&gt;; rel="alternate"; type="text/turtle"; profile="http://example.org/profiles/marc21-loc",
&lt;http://example.org/resource/a.profdnb.xml&gt;; rel="alternate"; type="application/xml"; profile="urn:example:profile:marc21-dnb",
&lt;http://example.org/resource/a.profloc.xml&gt;; rel="alternate"; type="application/xml"; profile="http://example.org/profiles/marc21-loc",
Expand Down Expand Up @@ -1402,7 +1403,7 @@ <h4>list profiles</h4>
Content-Profile: &lt;http://www.w3.org/ns/dx/conneg/profile/qsa>
Link:
&lt;http://example.org/resource/a?_profile=profile-x&amp;_mediatype=application/json>;
rel="self"; type="application/json";
rel="canonical"; type="application/json";
profile="http://otherexample.org/profile/x",
&lt;http://example.org/resource/a?_profile=profile-x&amp;_mediatype=text/xml>;
rel="alternate";
Expand Down Expand Up @@ -1456,7 +1457,7 @@ <h4>QSA Alternate Representations Data Model Implementation</h4>
# (&lt;http://example.org/resource/a&gt;; &rarr; &lt;http://example.org/resource/different&gt;;)
Link:
&lt;http://example.org/resource/a&gt;;
rel="self";
rel="canonical";
type="text/turtle";
profile="urn:example:profile:x",
&lt;http://example.org/resource/a&gt;;
Expand Down Expand Up @@ -1668,11 +1669,11 @@ <h4>QSA key discovery</h4>
HTTP/1.1 200 OK
Link:
&lt;http://example.org/resource/a?view=profile-x&format=text/html>;
rel="self";
rel="canonical";
type="text/html";
profile="http://otherexample.org/profile/x",
&lt;http://example.org/resource/a?view=profile-x&format=text/turtle>;
rel="self";
rel="canonical";
type="text/turtle";
profile="http://otherexample.org/profile/x",
&lt;http://example.org/resource/a?view=profile-y&amp;format=text/xml>;
Expand All @@ -1682,7 +1683,7 @@ <h4>QSA key discovery</h4>

# Note that here the server does not directly indicate the profile served
# (there is no Content-Profile header present) but this can be inferred
# by the link header with rel="self"
# by the link header with rel="canonical"
</pre>
<p>
While the Link header in <a href="#eg-qsa-keydiscovery"></a> above communicates all the information that a <em>list profiles</em> request
Expand All @@ -1709,11 +1710,11 @@ <h4>QSA key discovery</h4>
HTTP/1.1 200 OK
Link:
&lt;http://example.org/resource/a?view=profile-x&format=text/html>;
rel="self";
rel="canonical";
type="text/html";
profile="http://otherexample.org/profile/x",
&lt;http://example.org/resource/a?view=profile-x&format=text/turtle>;
rel="self";
rel="canonical";
type="text/turtle";
profile="http://otherexample.org/profile/x",
&lt;http://example.org/resource/a?view=profile-y&amp;format=text/xml>;
Expand Down Expand Up @@ -2340,7 +2341,7 @@ <h4>Examples of model use</h4>
title="Multiple format implementation of the previous example's content">
# The content of the previous example expressed as in an HTTP Link header
# as per the HTTP Application Profile of this Specification with the
# default Representation indicated by the use of rel="self". Note the
# default Representation indicated by the use of rel="canonical". Note the
# Representations are seen, one per Link result comma-separated, identified
# only by the combination of the Resource URI, the URI of the Standard to
# which they conform and the rel attribute - they do not have individual
Expand All @@ -2353,7 +2354,7 @@ <h4>Examples of model use</h4>
rel="alternate";
profile="http://otherexample.org/profile/y",
&lt;http://example.org/resource/a>;
rel="self";
rel="canonical";
profile="http://otherexample.org/profile/z"

---
Expand Down