Abstract
type='TEXT' is only a degenerate case of type='XHTML' (type='XHTML' with only text content). Therefore, this Pace proposes that type='TEXT' be removed and type='XHTML' be used instead.
Status
Withdrawn by author
Rationale
Whenever type='TEXT' could be used, type='XHTML' could be used instead making type='TEXT' redundant.
Proposal
--- draft-ietf-atompub-format-04.txt Tue Jan 11 17:41:12 2005 +++ draft-ietf-atompub-format-04-PaceTypeTextRedundant.txt Thu Jan 27 14:56:15 2005 @@ -411,19 +411,13 @@ 3.1.1 "type" Attribute Text constructs MAY have a "type" attribute. When present, the value - MUST be one of "TEXT", "HTML" or "XHTML". If the "type" attribute is + MUST be either "HTML" or "XHTML". If the "type" attribute is not provided, software MUST behave as though it were present with a - value of "TEXT". + value of "XHTML". Note that MIME media types [RFC2045] are not acceptable values for the "type" attribute. - 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, software MAY display it using - normal text rendering techniques such as proportional fonts, - white-space collapsing, and justification. - If the value of "type" is "HTML", the content of the Text construct MUST NOT contain child elements, and SHOULD be suitable for handling by software that knows HTML. The HTML markup must be escaped; for @@ -433,12 +427,14 @@ aid in displaying it. If the value of "type" is "XHTML", the content of the Text construct - MAY contain child elements. The content SHOULD be 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. + MAY contain child elements. The content SHOULD be character data and + elements from the XHTML namespace which could validly appear directly + within an xhtml:div element. Receiving software which displays the + content MAY use the elements to aid in displaying it. Receiving + software that opts not to use the elements when displaying the + content MUST use the white-space-normalized concatenation of + character data descendants of the Text construct. Escaped markup is + interpreted as a text, and MUST NOT be interpreted as markup. @@ -1108,11 +1104,11 @@ 5.12.1 "type" attribute atom:content MAY have a "type" attribute, When present, the value MAY - be one of "TEXT", "HTML", or "XHTML". Failing that, it MUST be a + be either "HTML", or "XHTML". Failing that, it MUST be a MIME media type [RFC2045] in which, to use the terminology of Section 5 of [RFC2045], the top level is a discrete type. If the type attribute is not provided, software MUST behave as though it were - present with a value of "TEXT". + present with a value of "XHTML". @@ -1131,7 +1127,7 @@ atom:content, but not both. If the "src" attribute is present, the "type" attribute SHOULD be - provided and MUST be a MIME media type [RFC2045], rather than "TEXT", + provided and MUST be a MIME media type [RFC2045], rather than "HTML", or "XHTML". The value is advisory; that is to say, upon dereferencing the URI to retrieve the content, if the server providing that content also provides a media type, the @@ -1146,26 +1142,24 @@ Software MUST apply the following rules in succession in the order below to ascertain the rules governing the content of "atom:content". - 1. If the value 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, software MAY display it - using normal text rendering techniques such as proportional - fonts, white-space collapsing, and justification. - 2. If the value of "type" is "HTML", the content of atom:content + 1. If the value of "type" is "HTML", the content of atom:content MUST NOT contain child elements, and SHOULD be suitable for handling by software that knows 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. Receiving software which displays the content SHOULD use the markup to aid in displaying it. - 3. If the value of "type" is "XHTML", the content of atom:content - MAY contain child elements. The content SHOULD be XHTML text and - markup that could validly appear directly within an xhtml:div - element. Receiving software which displays the content SHOULD - 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. - 4. If the value of "type" ends with "+xml" or "/xml", the content of + 2. If the value of "type" is "XHTML", the content of atom:content + MAY contain child elements. The content SHOULD be character + data and elements which could validly appear directly within + an xhtml:div element. Receiving software which displays the + content SHOULD use the elements to aid in displaying it. + Receiving software that opts not to use the elements when + displaying the content MUST use the white-space-normalized + concatenation of character data descendants of the Text + construct. Escaped markup is interpreted as a text, and MUST NOT + be interpreted as markup. + 3. If the value of "type" ends with "+xml" or "/xml", the content of atom:content may include child elements, and SHOULD be suitable for handling by software that knows the indicated media type. If the "src" attribute is not provided, this would normally mean @@ -1180,9 +1174,8 @@ 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/" the content of - atom:content MUST NOT contain child elements. - 6. For all other values of "type", the content of atom:content MUST + 4. If the value of "type" begins with "text/" the content of + 5. 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 by software that knows the indicated media type. In this case, the characters in the Base64 encoding
Impacts
Consumers do not need to check for TEXT. All processors should assume the default to be XHTML. Producers need to use type='XHTML' instead of type='TEXT'. Quality assurance tools could not detect cases where the author has included child elements in a well-formed way accidentally.