UserPreferences

PaceReformedContentRedux


Abstract

It appears that PaceContentAsTextOrHtml, PaceContentSrc, PaceNukeMultipart, PaceSimpleContentType are all related, and that discussion on the WG up to September 3 suggests consensus is achievable on the related issues.

This slight revision to the original PaceReformedContent merely removes the notion of default values for the type attribute and provides rules for the case where the attribute is absent. Also accepts the suggestion that type= SHOULD be provided when src= is.

The comment from Ulsberg/McLeod calling for media-type parameters has been preserved to avoid losing it; someone needs to write a Pace on this subject.

Status

Open

Rationale

The number and type of values for the @type attribute, the kludginess of the @mode attribute, and the handling of accessibility issues are all strongly related. This proposal gives us a single <atom:content> element, provides a simple set of rules for dispatching on @type values without excessively limiting the repertoire of types, and provides a good accessibility baseline.

Proposal

Replace section 3.1 with a new section:

3.1 Text Constructs

A Text Construct contains human readable text, usually in fairly small quantities.

Text Constructs MAY have a "type" attribute, whose value indicates the media type of the content. When present, the value MUST be one of "text/html" or "application/xhtml+xml".

If the value is "text/html" the content MUST be markup-free text (the same as what XML 1.0 calls "#PCDATA"), containing no child elements. Thus, the HTML markup must be escaped; for example, "<br>" as "&lt;br>". If the value is "application/xhtml+xml" the content MUST be well-formed.

If the value is "text/html" or "application/xhtml", the content SHOULD be HTML or XHTML text and markup that could validly appear directly within an HTML or XHTML "body" element. Receiving software MAY use this HTML or XHTML markup to aid in displaying the content.

If the "type" attribute is not provided, the content MUST be markup-free text containing no 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.

---

Change the definitions of "atom:title", "atom:tagline", "atom:copyright", "atom:info", and "atom:summary" to define them as "Text Constructs" rather than "Content Constructs"

---

Add the following paragraph to 5.9 "atom:summary" Element

atom:entry elements MUST contain an atom:summary element in any of the following cases:

---

Replace 5.10 "atom:content" element as follows

5.10 "atom:content" Element

The "atom:content" element either contains or links to the content of the entry. atom:entry elements MUST contain zero or one atom:content elements.

atom:content MAY have a "type" attribute, whose value gives the internet media type of the content. Any registered internet media type is allowed except for those which begin with "multipart/".

atom:content MAY have a "src" attribute, whose value MUST be a URI. If the "src" attribute is present, software MAY use to retrieve the content. If the "src" attribute is present, atom:content MUST be empty. If the "src" attribute is present, the "type" attribute's value is advisory; that is to say, upon derferencing the URI to retrieve the content, if the server providing that content also provides a media type, the server-provided media type is authoritative. If the "src" attribute is present, the "type" attribute SHOULD be provided.

If the value of type begins with "text/" or ends with "+XML", the content SHOULD be local; that is to say, no "src" attribute should be provided.

Software MUST apply the following rules in succession in the order below to ascertain the method in which the content of atom:content is encoded.

  1. If the "type" attribute is not provided, the content MUST be markup-free text containing no child elements (what XML 1.0 calls "#PCDATA"). Such text is intended to be presented to humans in a readable fashion. Thus, software MAY display it using normal rendering techniques such as proportional fonts, white-space collapsing, and justification.

  2. If the value of "type" is "text/html", the content of atom:content MUST be markup-free text containing no child elements, which SHOULD be suitable for handling by software that knows HTML. Thus, the HTML must be encoded; for example, "<br>" as "&lt;br>".

  3. If the value of "type" begins with "text/" the content of atom:content MUST be markup-free text containing no child elements.

  4. If the value of "type" ends with "+xml", the content of atom:content MUST be well-formed XML, which SHOULD be suitable for handling by software that knows the indicated media type.

  5. For all other values of type, the content of atom:content MUST be a valid base64 encoding, which when decoded SHOULD be suitable for handling by software that knows the indicated media type.

If the value of "type" is "text/html" or "application/xhtml+xml", the content (however encoded) SHOULD be HTML or XHTML text and markup that could validly appear directly within an HTML or XHTML "body" element. Receiving software which displays such content SHOULD use this markup to aid in displaying it.

Example

   <feed version="draft-ietf-atompub-format-01: do not deploy"
    xmlns="http://purl.org/atom/ns#draft-ietf-atompub-format-01">
     <head>
       <title type="text/html">Example Feed</title>
       <link rel="alternate" type="text/html"
        href="http://example.org/index.atom"/>
       <modified>2003-12-13T18:30:02Z</modified>
       <author>
         <name>John Doe</name>
       </author>
     </head>
     <entry>
       <title>How to use &lt;style></title>
       <id>tag:example.org,2003:3.2397</id>
       <updated>2003-12-13T18:30:02Z</updated>
       <summary type="text/html">A lengthy discourse on do&amp;rsquo;s and
       don&amp;rsquo;ts for the HTML &amp;lt;style> element</summary>
       <content src="http://example.com/htmlessons/style" />
     </entry>
     <entry>
       <title>How to use &lt;BLINK></title>
       <id>tag:example.org,2003:3.2398</id>
       <updated>2003-12-13T18:30:02Z</updated>
       <summary type="application/xhtml+xml">Don&#x2019;t!</summary>
       <!-- note no content -->
     </entry>
     <entry>
       <title type="application/xhtml+xml">How to use &lt;hr /></title>
       <id>tag:example.org,2003:3.2399</id>
       <updated>2003-12-13T18:30:02Z</updated>
       <!-- no summary; OK because content is here -->
       <content>&lt;hr /> is a strictly graphical element 
       which draws a horizontal line. &lt;hr />, &lt;hr/>, and &lt;hr>&lt/hr> 
       are all equivalent strictly speaking, but the first form is the most
       common.</content>
     </entry>
     <entry>
       <title>Friday cat-blogging!</title>
       <id>tag:example.org,2003:3.2400</id>
       <updated>2003-12-13T18:30:02Z</updated>
       <summary>Fluffy ripping a gerbil's liver out!  Look at the vivid
       reproduction of the many shades of red.</summary>
       <content type="image/jpeg" src="http://example.com/pix/fluffy27.jpg" />
     </entry>
     <entry>
       <title>Small Red Dot</title>
       <id>tag:example.org,2003:3.2401</id>
       <updated>2003-12-13T18:30:02Z</updated>
       <summmary>One red pixel in a 5x5 grid.</summary>
       <content type="image/gif">
       R0lGODlhBQAFAJEAAAAAAP////8AAAAAACwAAAAABQAFAAACBYyPJslRADs=
       </content>
     </entry>
   </feed>

Impacts

Notes

CategoryProposals