http://www.intertwingly.net/wiki/pie/PaceXhtmlNamespaceDiv

Abstract

When a Text construct or atom:content's type is "XHTML", require it to have a single xhtml:div as a child, and require that div to declare the XHTML namespace.

Status

Open

Rationale

1. Given that even we often forget when writing examples to declare the XHTML namespace for XHTML text constructs and content elements, it seems likely that people producing actual feeds will forget to do so unless the requirement to do so is stated prominently and unambiguously.
2. Mandating a specific method of declaring the XHTML namespace will ensure uniformity between feeds.


Proposal

Replace the paragraph on XHTML in section 3.1.1 of draft-ietf-atompub-format-04.txt with the following:

If the value of "type" is "XHTML", the content of the Text construct MUST be a single xhtml:div element which MUST declare the XHTML namespace. The xhtml:div MAY contain XHTML text and markup that could validly appear directly within an xhtml:div element. Receiving software which displays the content MAY use the markup to aid in displaying it. Escaped markup is interpreted as a text representation of markup, and MUST NOT be interpreted as markup itself.

Examples:

<summary type="XHTML"><div xmlns="http://www.w3.org/1999/xhtml"; style="color:#03c;">This is <b>XHTML</b> content.</div></summary>

<summary type="XHTML"><div xmlns:xhtml="http://www.w3.org/1999/xhtml";>This is <xhtml:b>XHTML</xhtml:b> content.</div></summary>

Replace the text of item 3 in section 5.12.3 with the same paragraph, and put the examples (and examples of the other types) after the list, with "summary" changed to "content".

Impacts

This is the common method of including XHTML content in existing Atom feeds, so the impact on existing implementations should be minimal to nil.



Reply via email to