Abstract
Add a non-normative section recommending a safe technique for embedding entries from other feeds.
Status
Draft - DavidPowell
Rationale
Embedding entries from other feeds in an Atom feed is more complicated than it appears. This is because inherited xml:lang and xml:base attributes hide metadata that needs to be preserved. This is further complicated because the atom:source element requires the feed metadata (from atom:feed), to be moved from being a parent of entry, to being a child (as atom:source). This disrupts the inheritance implied by xml:base and xml:lang.
Proposal
Add this paragraph to Section 4.2.11:
The interactions between atom:source, language tagging, and relative IRI references, mean that care must be taken when creating entries containing atom:source. Processors that create entries containing the atom:source element are RECOMMENDED to follow the process outlined in Section X.X.
Add Section X.X:
X.X Embedding entries from other feeds This section is informative. When an entry is included from another feed, in order to ensure that relative IRI references are represented correctly the following steps are suggested. Note that attempting to remove xml:base attributes by resolving links against their IRI base is not a reliable alternative solution, because it will not be able to distinguish between IRI references and text encountered in Structured Extension elements. 1) Calculate the language of the atom:feed element in the source feed. Set the xml:lang attribute on the atom:source element to this value; if no language is in scope, then set the xml:lang attribute to an empty string to prevent languages from being inherited. 2) Calculate the language of the atom:entry element in the source feed. Set the xml:lang attribute on the atom:entry element to this value; if no language is in scope, then set the xml:lang attribute to an empty string to prevent languages from being inherited. 3) Calculate the Base IRI of the atom:feed element in the source feed. Set the xml:base attribute on the atom:source element to this value. 4) Calculate the Base IRI of the atom:entry element in the source feed. Set the xml:base attribute on the atom:entry element to this value. Language values should be calculated, according to the rules of [W3C.REC-xml-20040204], by processing the xml:lang values of the element in question and its ancestors. Base IRIs should be calculated according to the rules of [rfc3986] and [W3C.REC-xmlbase-20010627], by processing the xml:base values of the element in question and its ancestors, together with other variables such as the document location.
Impacts
This proposal adds an informative section, without changing any of the existing requirements of the specification.