1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
|
<pre>Internet Engineering Task Force (IETF) M. Amundsen
Request for Comments: 6573 April 2012
Category: Informational
ISSN: 2070-1721
<span class="h1">The Item and Collection Link Relations</span>
Abstract
<a href="./rfc5988">RFC 5988</a> standardized a means of indicating the relationships between
resources on the Web. This specification defines a pair of reciprocal
link relation types that may be used to express the relationship
between a collection and its members.
Status of This Memo
This document is not an Internet Standards Track specification; it is
published for informational purposes.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Not all documents
approved by the IESG are a candidate for any level of Internet
Standard; see <a href="./rfc5741#section-2">Section 2 of RFC 5741</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="http://www.rfc-editor.org/info/rfc6573">http://www.rfc-editor.org/info/rfc6573</a>.
Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
<span class="grey">Amundsen Informational [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc6573">RFC 6573</a> The Item and Collection Link Relations April 2012</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
<a href="./rfc5988">RFC 5988</a> standardized a means of indicating the relationships between
resources on the Web. This specification defines a pair of reciprocal
link relation types that may be used to express the relationship
between a collection and its members.
These link relation types can be applied to a wide range of use cases
across multiple media types. For example, the 'collection' and
'item' link relation types are used in these media types:
1. OpenSearch 1.1: see Section 4.5.4.1 of [<a href="#ref-OpenSearch" title=""Open Search 1.1"">OpenSearch</a>]
2. Maze+XML: see [<a href="#ref-Maze" title=""Maze+XML - Format"">Maze</a>]
3. Collection+JSON: see [<a href="#ref-CollectionJSON" title=""Collection+JSON - Document Format"">CollectionJSON</a>]
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Link Relations</span>
The following link relations are defined.
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. 'item'</span>
When included in a resource that represents a collection, the 'item'
link relation identifies a target resource that represents a member
of that collection.
For example, if a resource represents a catalog of products, that
same representation may include one or more links to resources that
represent members of that catalog.
<html>
...
<h1>Product Group X Listing</h1>
...
<a href="..." rel="item">View Product X001</a>
<a href="..." rel="item">View Product X002</a>
...
</html>
or, in the case of a Link Header field
Link: <...>; rel="item"; title="View Product X001"
Link: <...>; rel="item"; title="View Product X002"
<span class="grey">Amundsen Informational [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc6573">RFC 6573</a> The Item and Collection Link Relations April 2012</span>
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. 'collection'</span>
When included in a resource that represents a member of a collection,
the 'collection' link relation identifies a target resource that
represents a collection of which the context resource is a member.
For example, if a resource represents a single product in a catalog,
that same representation may include a link to a resource that
represents a product group to which this single product belongs:
<a href="..." rel="collection">Return to Product Group X</a>
or, in the case of a Link Header field
Link: <...>; rel="collection"; title="Return to Product Group X"
Since it is possible that a resource could be a member of multiple
collections, multiple 'collection' link relations may appear within
the same representation:
<a href="..." rel="collection">View other widgets</a>
<a href="..." rel="collection">View all discontinued items</a>
The target resource representation need not be restricted to
representing a list. It may simply be a document that provides
details on the collection of which the context resource is a member:
Link: <...>; rel="collection";
title="Shakespeare's Collected Works - A History"
It should also be noted that the same link might represent an 'item'
in one collection as well as a 'collection' itself. In this case,
both link relation values can be applied to the same link:
Link: <...>; rel="collection item";
title="A Review of Issac Asimov's Collected Works - Vol. I"
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. IANA Considerations</span>
IANA has registered the 'collection' and 'item' link relations below
as per [<a href="./rfc5988" title=""Web Linking"">RFC5988</a>].
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. 'item' Link Relation Registration</span>
Relation Name:
item
<span class="grey">Amundsen Informational [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc6573">RFC 6573</a> The Item and Collection Link Relations April 2012</span>
Description:
The target IRI points to a resource that is a member of the
collection represented by the context IRI.
Reference:
See <a href="#section-2">Section 2</a>
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. 'collection' Link Relation Registration</span>
Relation Name:
collection
Description:
The target IRI points to a resource that represents the collection
resource for the context IRI.
Reference:
See <a href="#section-2">Section 2</a>
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Security Considerations</span>
The two link relation types defined in this document do not introduce
any new security issues to those which are discussed in <a href="./rfc5988#section-7">Section 7 of
RFC5988</a> [<a href="./rfc5988" title=""Web Linking"">RFC5988</a>].
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Internationalisation Considerations</span>
The 'item' and 'collection' link relation types do not have any
internationalization considerations other than those which are
discussed in <a href="./rfc5988#section-8">Section 8 of RFC5988</a> [<a href="./rfc5988" title=""Web Linking"">RFC5988</a>].
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. References</span>
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. Normative References</span>
[<a id="ref-RFC5988">RFC5988</a>] Nottingham, M., "Web Linking", <a href="./rfc5988">RFC 5988</a>,
October 2010.
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. Informative References</span>
[<a id="ref-CollectionJSON">CollectionJSON</a>] Amundsen, M., "Collection+JSON - Document Format",
Web Page , July 2011,
<<a href="http://www.iana.org/assignments/media-types">http://www.iana.org/assignments/media-types</a>>.
<span class="grey">Amundsen Informational [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc6573">RFC 6573</a> The Item and Collection Link Relations April 2012</span>
[<a id="ref-Maze">Maze</a>] Amundsen, M., "Maze+XML - Format", Web Page ,
December 2010,
<<a href="http://www.iana.org/assignments/media-types">http://www.iana.org/assignments/media-types</a>>.
[<a id="ref-OpenSearch">OpenSearch</a>] Clinton, D., <a style="text-decoration: none" href='https://www.google.com/search?sitesearch=datatracker.ietf.org%2Fdoc%2Fhtml%2F&q=inurl:draft-+%22Open+Search+1.1%22'>"Open Search 1.1"</a>, Work in Progress ,
March 2011, <<a href="http://www.opensearch.org/Specifications/OpenSearch/1.1/">http://www.opensearch.org/</a>
<a href="http://www.opensearch.org/Specifications/OpenSearch/1.1/">Specifications/OpenSearch/1.1/</a>>.
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Acknowledgements</span>
The author gratefully acknowledges the contributions of Julian
Reschke and Mykyta Yevstifeyev.
Author's Address
Mike Amundsen
EMail: mca@amundsen.com
URI: <a href="http://amundsen.com">http://amundsen.com</a>
Amundsen Informational [Page 5]
</pre>
|