|
Home >> FAQs/Tutorials >> RSS Tutorials >> Index
RSS FAQs - Atom Syndiation Format RFC4287 Reference Document
By: M. Nottingham, Ed. & R. Sayre, Ed.
Part:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(Continued from previous part...)
atomInlineOtherContent =
element atom:content {
atomCommonAttributes,
attribute type { atomMediaType }?,
(text|anyElement)*
}
atomOutOfLineContent =
element atom:content {
atomCommonAttributes,
attribute type { atomMediaType }?,
attribute src { atomUri },
empty
}
atomContent = atomInlineTextContent
| atomInlineXHTMLContent
| atomInlineOtherContent
| atomOutOfLineContent
4.1.3.1. The "type" Attribute
On the atom:content element, the value of the "type" attribute MAY be
one of "text", "html", or "xhtml". Failing that, it MUST conform to
the syntax of a MIME media type, but MUST NOT be a composite type
(see Section 4.2.6 of [MIMEREG]). If neither the type attribute nor
the src attribute is provided, Atom Processors MUST behave as though
the type attribute were present with a value of "text".
4.1.3.2. The "src" Attribute
atom:content MAY have a "src" attribute, whose value MUST be an IRI
reference [RFC3987]. If the "src" attribute is present, atom:content
MUST be empty. Atom Processors MAY use the IRI to retrieve the
content and MAY choose to ignore remote content or to present it in a
different manner than local content.
If the "src" attribute is present, the "type" attribute SHOULD be
provided and MUST be a MIME media type [MIMEREG], rather than "text",
"html", or "xhtml". The value is advisory; that is to say, when the
corresponding URI (mapped from an IRI, if necessary) is dereferenced,
if the server providing that content also provides a media type, the
server-provided media type is authoritative.
[Page 15]
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 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 that display the content MAY use the
markup to aid in displaying it.
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 that display the
content MAY use the markup to aid in displaying it. The escaped
versions of characters such as "&" and ">" represent those
characters, not markup.
4. If the value of "type" is an XML media type [RFC3023] or 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 that 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, as described in [RFC3548], section 3.
When decoded, it 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.
[Page 16]
(Continued on next part...)
Part:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|