Network Working Group J. Snell Internet-Draft December 8, 2005 Expires: June 11, 2006 Atom Syndication Format Link Extensions draft-snell-atompub-link-extensions-01.txt Status of this Memo By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on June 11, 2006. Copyright Notice Copyright (C) The Internet Society (2005). Abstract This specification defines extensions to the Atom Syndication Format link and content elements that may be used to express additional metadata about linked resources. Snell Expires June 11, 2006 [Page 1] Internet-Draft Atom Link Extensions December 2005 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 3 3. Entity Attributes . . . . . . . . . . . . . . . . . . . . . . 3 3.1. The 'md5' Attribute . . . . . . . . . . . . . . . . . . . 3 3.2. The 'etag' Attribute . . . . . . . . . . . . . . . . . . . 4 3.3. The 'last-modified' Attribute . . . . . . . . . . . . . . 4 3.4. The 'range' Attribute . . . . . . . . . . . . . . . . . . 5 4. Media Descriptors . . . . . . . . . . . . . . . . . . . . . . 6 4.1. The 'media' Attribute . . . . . . . . . . . . . . . . . . 6 5. Link Grouping and Alternates . . . . . . . . . . . . . . . . . 7 5.1. The 'group' Attribute . . . . . . . . . . . . . . . . . . 8 5.2. The 'alternate' Element . . . . . . . . . . . . . . . . . 8 6. Link Decoration . . . . . . . . . . . . . . . . . . . . . . . 9 6.1. The 'description' Element . . . . . . . . . . . . . . . . 9 6.2. The 'icon' Element . . . . . . . . . . . . . . . . . . . . 9 7. Link Relations . . . . . . . . . . . . . . . . . . . . . . . . 10 7.1. Hierarchy Links . . . . . . . . . . . . . . . . . . . . . 10 7.2. Informational Links . . . . . . . . . . . . . . . . . . . 11 8. Security Considerations . . . . . . . . . . . . . . . . . . . 12 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 13 11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 15 Intellectual Property and Copyright Statements . . . . . . . . . . 16 Snell Expires June 11, 2006 [Page 2] Internet-Draft Atom Link Extensions December 2005 1. Introduction This specification defines extensions to the Atom Syndication Format [RFC4287] link and content elements that may be used to express additional metadata about linked resources. 2. Notational Conventions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, [RFC2119] This specification uses XML Namespaces [W3C.REC-xml-names-19990114] to uniquely identify XML element names. It uses the following namespace prefix for the indicated namespace URI; {Ed. Note: this namespace MUST be changed to a proper IETF namespace scheme prior to publication} "le": "http://purl.org/atompub/link-extensions/1.0" 3. Entity Attributes The following link Entity Attributes may be used to specify metadata about the resource referenced by an atom:link element or atom:content element using the 'src' attribute. The attributes are designed to closely correlate with existing HTTP [RFC2616] mechanisms used to perform conditional operations, detecting resource modifications and requesting ranges. 3.1. The 'md5' Attribute The 'md5' Attribute specifies a Base64-encoded MD5 digest [RFC1864] of the resource identified by the atom:link/@href or atom:content/@ src attributes. The value of the digest is calculated as specified in [RFC2616] and [RFC1864]. The 'md5' attribute MAY appear as a child of the atom:link and atom:content (using the 'src' attribute) elements. md5 = attribute le:md5 { md5-digest } md5-digest = While MD5 digests are not a guarantee against malicious modifications of a resource, the digest specified may be used as a simple integrity check to verify whether or not the referenced resource may have been Snell Expires June 11, 2006 [Page 3] Internet-Draft Atom Link Extensions December 2005 modified. An example MD5 digest of an enclosed MP3 file 3.2. The 'etag' Attribute The 'etag' Attribute specifies an Entity Tag [RFC2616] for the resource identified by the atom:link or atom:content element. The 'etag' attribute MAY appear as a child of the atom:link and atom: content (using the 'src' attribute) elements. etag = attribute le:etag { entity-tag } entity-tag = [ weak ] opaque-tag weak = "W/" opaque-tag = quoted-string As specified by [RFC2616], Entity Tags are usable for the purpose of comparing multiple entities served from the same resource URI and are typically used in the context of conditional-retrievals of resource representations. An example Entity Tag for an enclosed MP3 file 3.3. The 'last-modified' Attribute The 'last-modified' Attribute specifies the date and time when the resource identified by the atom:link or atom:content element was last modified as specified by [RFC2616]. The value of the attribute must conform to the HTTP-date construct from [RFC2616]. The 'last- modified' attribute MAY appear as a child of the atom:link and atom: content (using the 'src' attribute) elements. Snell Expires June 11, 2006 [Page 4] Internet-Draft Atom Link Extensions December 2005 last-modified = attribute le:last-modified { HTTP-date } HTTP-date = rfc1123-date | rfc850-date | asctime-date rfc1123-date = wkday "," SP date1 SP time SP "GMT" rfc850-date = weekday "," SP date2 SP time SP "GMT" asctime-date = wkday SP date3 SP time SP 4DIGIT date1 = 2DIGIT SP month SP 4DIGIT ; day month year (e.g., 02 Jun 1982) date2 = 2DIGIT "-" month "-" 2DIGIT ; day-month-year (e.g., 02-Jun-82) date3 = month SP ( 2DIGIT | ( SP 1DIGIT )) ; month day (e.g., Jun 2) time = 2DIGIT ":" 2DIGIT ":" 2DIGIT ; 00:00:00 - 23:59:59 wkday = "Mon" | "Tue" | "Wed" | "Thu" | "Fri" | "Sat" | "Sun" weekday = "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday" month = "Jan" | "Feb" | "Mar" | "Apr" | "May" | "Jun" | "Jul" | "Aug" | "Sep" | "Oct" | "Nov" | "Dec" An example last-modified attribute for an enclosed MP3 file 3.4. The 'range' Attribute The 'range' Attribute specifies a subset of the resource identified by the atom:link or atom:content element as specified by the standard HTTP Range header defined by [RFC2616]. The 'range' attribute MAY appear as a child of the atom:link and atom:content (using the 'src' attribute) elements. range = attribute le:range { ranges-specifier } ranges-specifier = byte-ranges-specifier byte-ranges-specifier = bytes-unit "=" byte-range-set byte-range-set = 1#( byte-range-spec | suffix-byte-range-spec ) byte-range-spec = first-byte-pos "-" [last-byte-pos] first-byte-pos = 1*DIGIT last-byte-pos = 1*DIGIT The only Range Specifier defined by [RFC2616] is the "bytes" range specifier used to request a specific sequence of bytes from a resource. Other range specifiers MAY be used. Unknown range Snell Expires June 11, 2006 [Page 5] Internet-Draft Atom Link Extensions December 2005 specifiers SHOULD be ignored. An example range attribute specifying the first 500 bytes of an enclosed MP3 file 4. Media Descriptors Resources referenced by atom:link and atom:content elements may be optimized for rendering on specific types of devices. 4.1. The 'media' Attribute The 'media' attribute MAY be used to identify the types of devices for which a resource referenced by an atom:link or atom:content (using the src attribute) has been targeted. The definition of the media attribute is the same as the 'media' attribute on HTML [W3C.REC-html401-19991224] and XHTML [W3C.REC-xhtml1-20020801] link elements. The 'media' attribute MAY appear as a child of the atom: link and atom:content elements. media = attribute le:media { media-descriptors } The value of the 'media' attribute is a comma separated list of media-descriptor tokens. If not specified, the value of attribute is assumed to be "all". The following lists the standard media- descriptor definitions as specified by [W3C.REC-html401-19991224]. Snell Expires June 11, 2006 [Page 6] Internet-Draft Atom Link Extensions December 2005 screen intended for non-paged computer screens tty intended for media using a fixed-pitch character grid, such as teletypes, terminals, or portable devices with limited display capabilities. tv intended for television-type devices (low-resolution, color, limited scrollability). projection intended for projectors handheld intended for handheld devices (small screen, monochrome, bitmapped graphics, limited bandwidth). print intended for paged, opaque material and for documents viewed on screen in print preview mode braille intended for braille tactile feedback devices. aural intended for speech synthesizers all suitable for all devices Two alternate atom:link elements respectively targeted at screen and handheld devices 5. Link Grouping and Alternates The Link Grouping and Alternate mechanisms defined below make it possible to group related atom:link elements into logical sets or to identify alternate IRI's (e.g. mirrors) for linked resources. Snell Expires June 11, 2006 [Page 7] Internet-Draft Atom Link Extensions December 2005 5.1. The 'group' Attribute The 'group' Attribute MAY appear as a child of atom:link elements and MAY be used to group associated links together into a logical set of mutually-exclusive options. The value of the attribute is a case- insensitive, opaque text string. Link elements with 'group' attributes specifying the same value are considered to belong to the same logical set. group = attribute le:group { text } The following illustrates an example of how the 'group' attribute may be used to identify alternate encodings of the same enclosed audio content. Comparison operations on the 'group' attribute are performed using a case-insensitive character-by-character examination. Entity encodings MUST be interpreted as the character they represent. For instance, The value "group" is equivalent to "group", "Group", "GROUP", etc. The value " " is equivalent to the character string " " (that is, an ampersand followed by the characters "nbsp;") and MUST NOT be interpreted as markup. 5.2. The 'alternate' Element The 'alternate' Element is used to specify one or more alternative IRI's for the resource identified by an atom:link element. For instance, an enclosure referenced by a link may be downloadable from multiple mirror locations. The 'alternate' Element consists of an IRI and optional language-sensitive text label. Zero or more 'alternate' elements MAY appear as children of the atom:link element. The parent link element's 'type', 'length' and 'hreflang' attributes are considered to apply equally to each of the contained 'alternate' elements. alternate = element le:alternate { atomCommonAttributes, attribute href, attribute title?, (undefinedContent) } Snell Expires June 11, 2006 [Page 8] Internet-Draft Atom Link Extensions December 2005 An example atom:link that specifies two alternate download locations for the enclosed MP3 file 6. Link Decoration 6.1. The 'description' Element The 'description' element is an Atom Text Construct that is used to associate a short, human-readable textual summary with an atom:link element. description = element le:description { atomTextConstruct } An example atom:link element with an associated description. My first podcast. Isn't it great! 6.2. The 'icon' Element The 'icon' element identifies an image that provides an iconic visual identification for an atom:link. Like the standard atom:icon element, which is used to associate an icon image with Atom Feed Documents, images referenced by the 'icon' element SHOULD have a 1-to-1 aspect ratio and be suitable for presentation at a small size. The element MAY contain an optional 'type' attribute whose value specifies the media-type of the referenced icon. icon = element le:icon { atomCommonAttributes, attribute type { media-type }?, (atomURI) } Snell Expires June 11, 2006 [Page 9] Internet-Draft Atom Link Extensions December 2005 An example atom:link element with an associated PNG icon http://example.org/icons/podcast.png 7. Link Relations This specification adds the following values to the IANA Registry of Link Relations as specified by [RFC4287]. 7.1. Hierarchy Links The Hierarchy Link Relations may be used to organize Atom Feed and Entry documents into a hierarchical tree. o link[@rel='origin'] : The 'origin' link refers to the logical root of a hierarchical tree of entities. o link[@rel='parent'] : The 'parent' link refers to the logical parent of the current entity in a hierarchical tree of entities. o link[@rel='child'] : The 'child' link refers to a logical subordinate of the current document in a hierarchical tree of entities. o link[@rel='sibling'] : The 'sibling' link refers to a logical sibling of the current document in a hierarchical tree of entities. Snell Expires June 11, 2006 [Page 10] Internet-Draft Atom Link Extensions December 2005 An example of an Atom document hierarchy ... 7.2. Informational Links The following link relations may be used to reference informational resources about the containing Atom Feed or Entry. o link[@rel='help'] : The 'help' link may be used to reference resources offering help information for the containing Feed or Entry. o link[@rel='about'] : The 'about' link may be used to reference resources offering additional information about the containing Feed or Entry. Snell Expires June 11, 2006 [Page 11] Internet-Draft Atom Link Extensions December 2005 An Atom Feed with help and about links ... ... 8. Security Considerations While the mechanisms defined herein may be used to detect potentially malicious modifications of referenced resources, the mechanisms MUST NOT be considered to provide a guarantee against inappropriate modification. Other mechanisms, such as XML Digital Signatures and XML Encryption should be used to properly secure Atom documents. 9. IANA Considerations This specification adds the following registrations to the IANA Registry of link relations: Attribute Value: origin Description: The 'origin' link refers to the logical root of a hierarchical tree of entities. Expected display characteristics: none Security considerations: As defined in [RFC4287] Attribute Value: parent Description: The 'parent' link refers to the logical parent of the current entity in a hierarchical tree of entities. Expected display characteristics: none Security considerations: As defined in [RFC4287] Attribute Value: child Description: The 'child' link refers to a logical subordinate of the current document in a hierarchical tree of entities. Expected display characteristics: none Security considerations: As defined in [RFC4287] Snell Expires June 11, 2006 [Page 12] Internet-Draft Atom Link Extensions December 2005 Attribute Value: sibling Description: The 'sibling' link refers to a logical sibling of the current document in a hierarchical tree of entities. Expected display characteristics: none Security considerations: As defined in [RFC4287] Attribute Value: help Description: The 'help' link may be used to reference resources offering help information for the containing Feed or Entry. Expected display characteristics: none Security considerations: As defined in [RFC4287] Attribute Value: about Description: The 'about' link may be used to reference resources offering additional information about the containing Feed or Entry. Expected display characteristics: none Security considerations: As defined in [RFC4287] 10. Acknowledgements The author gratefully acknowledges the feedback from the members of the Atom Publishing Format and Protocol working group during the development of this specification. 11. References [RFC1864] Myers, J. and M. Rose, "The Content-MD5 Header Field", RFC 1864, October 1995. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. [RFC4287] Nottingham, M. and R. Sayre, "The Atom Syndication Format", RFC 4287, December 2005. [W3C.REC-html401-19991224] Hors, A., Jacobs, I., and D. Raggett, "HTML 4.01 Specification", W3C REC REC-html401-19991224, Snell Expires June 11, 2006 [Page 13] Internet-Draft Atom Link Extensions December 2005 December 1999. [W3C.REC-xhtml1-20020801] Pemberton, S., "XHTML[TM] 1.0 The Extensible HyperText Markup Language (Second Edition)", W3C REC REC-xhtml1- 20020801, August 2002. [W3C.REC-xml-infoset-20040204] Tobin, R. and J. Cowan, "XML Information Set (Second Edition)", W3C REC REC-xml-infoset-20040204, February 2004. [W3C.REC-xml-names-19990114] Hollander, D., Bray, T., and A. Layman, "Namespaces in XML", W3C REC REC-xml-names-19990114, January 1999. Snell Expires June 11, 2006 [Page 14] Internet-Draft Atom Link Extensions December 2005 Author's Address James M Snell Phone: Email: jasnell@gmail.com URI: http://snellspace.com Snell Expires June 11, 2006 [Page 15] Internet-Draft Atom Link Extensions December 2005 Intellectual Property Statement The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Disclaimer of Validity This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Copyright Statement Copyright (C) The Internet Society (2005). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. Acknowledgment Funding for the RFC Editor function is currently provided by the Internet Society. Snell Expires June 11, 2006 [Page 16]