Abstract
Define the term 'Atom Processor', which is undefined in format-08.
Status
Open
Rationale
Clearly separate format processing from application semantics.
e.g.
Atom Processors that display the content MAY use the markup to aid in displaying it.
becomes
Atom Processors MAY provide some or all of that markup to the application.
Proposal
1.2 Notational Conventions This specification describes conformance in terms of two artifacts; Atom Feed Documents and Atom Entry Documents. Additionally, it places some requirements on Atom Processors. An Atom Processor is a software module used to read Atom Documents and provide access to their content and structure. It is assumed that an Atom Processor is doing its work on behalf of another module, called the application.
3.1.1.1 Text
Example atom:title with text content:
...
<title type="text">
Less: <
</title>
...
If the value is "text", the content of the Text construct MUST NOT
contain child elements. Such text is intended to be presented to
humans in a readable fashion. Thus, Atom Processors MAY collapse
white-space (including line-breaks), and applications might display
the text using typographic techniques such as justification and
proportional fonts.
3.1.1.2 HTML
Example atom:title with HTML content:
...
<title type="html">
Less: <em> &lt; </em>
</title>
...
If the value of "type" is "html", the content of the Text construct
MUST NOT contain child elements, and SHOULD be suitable for handling
as HTML [HTML]. Any markup within MUST be escaped; for example,
"<br>" as "<br>". HTML markup within SHOULD be such that it could
validly appear directly within an HTML <DIV> element, after
unescaping. Atom Processors MAY provide some or all of that markup
to the application.
3.1.1.3 XHTML
Example atom:title with XHTML content:
...
<title type="xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xhtml:div>
Less: <xhtml:em> < </xhtml:em>
</xhtml:div>
</title>
...
If the value of "type" is "xhtml", the content of the Text construct
MUST be a single XHTML div element [XHTML]. The XHTML div MUST
contain XHTML text and markup that could validly appear within an
XHTML div element. The XHTML div element itself MUST NOT be
considered part of the content. Atom Processors MAY provide some
or all of that markup to the application. Escaped characters, such as
"&" and ">", represent those characters, not markup.
4.1.3.3 Processing Model
Atom Documents MUST conform to the following rules. Atom Processors
MUST interpret atom:content according to the first applicable rule.
1. If the value of "type" is "text", the content of atom:content
MUST NOT contain child elements. Such text is intended to be
presented to humans in a readable fashion. Thus, Atom Processors
MAY collapse white-space (including line-breaks), and applications
might display the text using typographic techniques such as
justification and proportional fonts.
2. If the value of "type" is "html", the content of atom:content
MUST NOT contain child elements, and SHOULD be suitable for
handling as HTML [HTML]. The HTML markup must be escaped; for
example, "<br>" as "<br>". The HTML markup SHOULD be such
that it could validly appear directly within an HTML <DIV>
element. Atom Processors MAY provide some or all of that markup
to the application.
3. If the value of "type" is "xhtml", the content of atom:content
MUST be a single XHTML div element [XHTML], and SHOULD be
suitable for handling as XHTML. The XHTML div element itself
MUST NOT be considered part of the content. Atom Processors
MAY provide some or all of that markup to the application.
Escaped characters, such as "&" and ">", represent those
characters, not markup.
4. If the value of "type" ends with "+xml" or "/xml"
(case-insensitive), the content of atom:content MAY include child
elements, and SHOULD be suitable for handling as the indicated
media type. If the "src" attribute is not provided, this would
normally mean that the "atom:content" element would contain a
single child element which would serve as the root element of the
XML document of the indicated type.
5. If the value of "type" begins with "text/" (case-insensitive),
the content of atom:content MUST NOT contain child elements.
6. For all other values of "type", the content of atom:content MUST
be a valid Base64 encoding [RFC3548], which when decoded SHOULD
be suitable for handling as the indicated media type. In this
case, the characters in the Base64 encoding MAY be preceded and
followed in the atom:content element by white-space, and lines
are separated by a single newline (U+000A) character.
