Abstract
This proposal creates an additional namespace in which attributes are defined which can be used to identify various types of constructs in both the Atom core and extensions.
Status
Open
Author: AntoneRoundy
Related and Conflicting Proposals
Numerous, including:
Key Questions
Rationale
A number of extensibility issues have been raised, primarily in connection with the discussion of Link Constructs and the link element:
-
The current extension model for the Link Construct, adding to the list of values for the link element's rel attribute, cannot not accomodate third-party extensions without introducing qnames in the rel attribute--an idea that has been strongly opposed by many.
-
Some have recognized benefits to a third-party extensible Link Construct allowing default processing of unknown Link Constructs.
-
The link element, as it now stands and as proposed by various proposals, is overloaded with a variety of different purposes: specifying hyperlinks (user-activatable links), pointing to API endpoints, pointed to content to be embedded, etc. Each of these classes of link could be grouped into a Construct which could benefit from extensibility.
Proposal
All changes are stated in relation to this draft of the Atom Syndication Format
Insert the following before section 3.1:
3.1. Extension Namespace
The Atom Extension Namespace defines a number of attributes by which common constructs may be recognized. The extension namespace URI for this specification is:
The attributes defined by the extension namespace may be recognized in this specification by the namespace "atomex". Attributes from the extension namespace MUST be explicitly namespace qualified, meaning that the extension namespace MUST NOT be the default namespace. Elements, whether defined in this specification or by an extension, which use these attributes MUST conform the to requirements for that construct defined in the following sections. Additionally, such elements MUST NOT require understanding of any additional attributes or element children.
Replace section 3.4 with the following (section numbers below have NOT been adjusted to reflect the insertion or deletion of other sections):
3.4 Link Constructs
-
A link construct specifies a hyperlink primarily intended to be activated through explicit user interactions such as clicking, selecting a menu item, drag and drop, etc. The resource pointed to MUST be accessible using only the indicated URI, wiht no additional XML or other content. When accessing the resource pointed to by the href attribute using HTTP, the GET method MUST be used.
It MUST NOT have any child content. A link construct has the following attributes:
Remove section 3.4.1 ("rel" Attribute)
Replace section 3.4.3 ("href" Attribute) with:
3.4.3 "atomex:link-href" Attribute
-
The "atomex:link-href" attribute contains the link's URI. Link constructs MUST have an atomex:link-href attribute, whose value MUST be a URI [RFC2396].
xml:base [W3C.REC-xmlbase-20010627] processing MUST be applied to the atomex:link-href attribute's content.
Insert the following after section 3.4:
3.5 Service Constructs
-
A service construct specifies a link to an endpoint for the Atom API or an extension thereto. It MUST NOT have any child content. A service construct has the following attributes:
3.5.1 "atomex:service-href" Attribute
-
The "atomex:service-href" attribute specifies the URI of an Atom API endpoint. Service constructs MUST have an atomex:service-href attribute, which MUST be a URI [RFC2396].
xml:base [W3C.REC-xmlbase-20010627] processing MUST be applied to the atomex:service-href attribute's content.
3.5.2 "methods" Attribute
-
The methods attribute specifies which HTTP methods can be used with the API endpoint. Service constucts MUST have a methods attribute. The value of this attribute is a space separated list of methods, which MUST only include methods supported for the API endpoint to which the service construct points, as specified by the controlling specification.
3.6 Embed Constructs
-
An embed constrct specifies a link to external data intended to be automatically loaded asynchronously with and embedded in a feed or entry.
3.6.1 "atomex:embed-src" Attribute
-
The "atomex:embed-src" attribute specifies the URI of the resource to be embedded. Embed constructs MUST have an "atomex:embed-src" attribute, which MUST be a URI [RFC2396].
xml:base [W3C.REC-xmlbase-20010627] processing MUST be applied to the atomex:service-href attribute's content.
3.6.2 "type" Attribute
-
The "type" attribute indicates an advisory media type; it MAY be used as a hint to determine the type of the representation which should be returned when the URI in the href attribute is dereferenced. Note that the type attribute does not override the actual media type returned with the representation.
Embed constructs MAY have a type attribute, whose value MUST be a registered media type [RFC2045].
Replace section 4.2.2 with the following:
4.2.2 Link Construct Elements
-
The following elements are link constructs.
4.2.2.1 "atom:alternate" Element
-
The "atom:alternate" element specifies a link to an alternate representation of the feed. atom:head MUST contain at least one atom:alternate element. atom:head MUST NOT contain more than one atom:alternate element with the same type attribute value.
4.2.2.2 "atom:start" Element
-
[[[Specification text be written]]]
4.2.2.3 "atom:prev" Element
-
[[[Specification text be written]]]
4.2.2.4 "atom:next" Element
-
[[[Specification text be written]]]
Insert section 4.2.3 as follows:
4.2.3 Service Construct Elements
-
The following elements are service constructs.
4.2.3.1 "atom:edit" Element
-
[[[Specification text be written]]]
4.2.3.2 "atom:post" Element
-
[[[Specification text be written]]]
4.2.3.3 "atom:delete" Element
-
[[[Specification text be written]]]
4.2.3.4 "atom:feed" Element
-
[[[Specification text be written]]]
4.2.3.5 "atom:introspection" Element
-
[[[Specification text be written]]]
Insert section 4.2.4 as follows:
4.2.4 Embed Construct Elements
-
The following elements are embed constructs.
4.2.4.1 "atom:favicon" Element
-
[[[Specification text be written]]]
Replace section 5.2 with the following:
5.2 Link Construct Elements
-
The following elements are link constructs.
5.2.1 "atom:alternate" Element
-
The "atom:alternate" element specifies a link to an alternate representation of the entry. atom:entry MUST contain at least one atom:alternate element. atom:entry MUST NOT contain more than one atom:alternate element with the same type attribute value.
Insert section 5.3 as follows:
5.3 Service Construct Elements
-
The following elements are service constructs.
5.3.1 "atom:edit" Element
-
[[[Specification text be written]]]
5.3.3 "atom:delete" Element
-
[[[Specification text be written]]]
Insert section 5.4 as follows:
5.4 Embed Construct Elements
-
The following elements are embed constructs.
5.4.1 "atom:image" Element
-
[[[Specification text be written]]]
5.4.2 "atom:sound" Element
-
[[[Specification text be written]]]
5.4.3 "atom:movie" Element
-
[[[Specification text be written]]]
Impacts
The link element would be replaced by a number of different elements. Atom software could add functionality to enable generic processing of some unknown elements if their types are recognized by the presence of attributes from the extension namespace.
Notes
It has been pointed out that the attributes used to identify the various constructs do not need to be in a separate namespace. They could be part of the Atom core namespace, and still be identifiable by requiring that they always be explicitly namespace qualified. However, it may be advantageous to use a separate namespace to avoid potential confusion over why these particular attributes are namespace qualified, and to avoid the risk of people thinking they can omit the namespace identifier.