RFC 6573
The Item and Collection Link Relations
RFC 6573: The Item and Collection Link Relations π
okay bestie, RFC 6573 π was written by Mike Amundsen and published in April 2012. It's Informational, so it's just here to share info, not a Standards Track thing πΈ It's also ISSN 2070-1721. The header doesn't list anything it obsoletes or updates, so it's doing its own thing β¨
Abstract
RFC 5988 gave us a way to say how resources on the Web relate to each other π¦ This doc adds a pair of reciprocal link relation types that can describe the relationship between a collection and its members π«Ά
Status of This Memo
This doc is not an Internet Standards Track spec. It's published for info purposes π
It's a product of the IETF, which means it has the consensus of the IETF community, got public review, and was approved for publication by the Internet Engineering Steering Group (IESG). Not every IESG-approved doc is a candidate for any level of Internet Standard, though. See Section 2 of RFC 5741 π
For the current status, errata, and how to give feedback, check http://www.rfc-editor.org/info/rfc6573 π
Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the document authors. All rights reserved. Β©οΈ
This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as in effect on the date of publication. Please read them carefully, because they spell out your rights and restrictions for this doc π Code Components extracted from this doc must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License π«Ά
1. Introduction β¨
RFC 5988 gave us a way to say how resources on the Web relate to each other. This doc 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 used in a wide range of use cases across multiple media types. For example, the 'collection' and 'item' link relation types show up in these media types:
- OpenSearch 1.1: see Section 4.5.4.1 of [OpenSearch]
- Maze+XML: see [Maze]
- Collection+JSON: see [CollectionJSON]
2. Link Relations π¦
The following link relations are defined, bestie π
2.1. 'item'
When it's included in a resource that represents a collection, the 'item' link relation identifies a target resource that represents a member of that collection. It's giving organized π¦
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"
2.2. 'collection'
When it's included in a resource that represents a member of a collection, the 'collection' link relation identifies a target resource that represents a collection that the context resource is a member of. Main character energy π
For example, if a resource represents a single product in a catalog, that same representation may include a link to a resource that represents the product group this single product belongs to π§
<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 a resource could be a member of multiple collections, multiple 'collection' link relations may appear in the same representation π
<a href="..." rel="collection">View other widgets</a>
<a href="..." rel="collection">View all discontinued items</a>
The target resource representation doesn't need to be restricted to representing a list. It may simply be a document that gives details on the collection the context resource is a member of π
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"
3. IANA Considerations π
IANA has registered the 'collection' and 'item' link relations below, as per [RFC5988].
3.1. 'item' Link Relation Registration
- Relation Name:
item - Description: The target IRI points to a resource that is a member of the collection represented by the context IRI.
- Reference: See Section 2
3.2. 'collection' Link Relation Registration
- Relation Name:
collection - Description: The target IRI points to a resource that represents the collection resource for the context IRI.
- Reference: See Section 2
4. Security Considerations π
The two link relation types defined in this doc don't introduce any new security issues beyond the ones discussed in Section 7 of RFC5988 [RFC5988]. Still, go check that section, it's serious business π
5. Internationalisation Considerations π
The 'item' and 'collection' link relation types don't have any internationalization considerations other than the ones discussed in Section 8 of RFC5988 [RFC5988] π«Ά
6. References π
6.1. Normative References
6.2. Informative References
- [CollectionJSON] Amundsen, M., "Collection+JSON - Document Format", Web Page, July 2011,
http://www.iana.org/assignments/media-types. - [Maze] Amundsen, M., "Maze+XML - Format", Web Page, December 2010,
http://www.iana.org/assignments/media-types. - [OpenSearch] Clinton, D., "Open Search 1.1", Work in Progress, March 2011,
http://www.opensearch.org/Specifications/OpenSearch/1.1/.
Appendix A. Acknowledgements π
The author gratefully acknowledges the contributions of Julian Reschke and Mykyta Yevstifeyev. Iconic team effort π«Ά
Author's Address π¦
Mike Amundsen
- EMail:
mca@amundsen.com - URI:
http://amundsen.com
π¦ where this page comes from
- ietf: rfc6573 2012-04
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms