UserPreferences

ContentTemp


This is a temporary page that "includes" the wiki page 'content' because it can't be reached at the moment.

Content

Edit

<content>

    Definition: Content is the body of an entry.

    Comments: Content may be empty. Content can be of any media type, including multipart content. Content may be empty when other metadata elements provide the definition of the entry.

    Examples:

<content type="application/xhtml+xml" xml:lang="en-us" rel="fragment"> 
  <p xmlns="...">Hello, <em>weblog</em> world! 2 &lt; 4!</p> 
</content>
<content type="audio/mpeg" src="http://example.org/blog/commentary.mp3" />
<content type="multipart/alternative">
  <content type="image/jpeg" encoding="base64">
    xo+Hello0AFWeblogh5FWorldh1mImagedsTbrVbF3
  </content>
  <content type="text/html" xml:lang="en-us" mode="escaped" rel="fragment">
    <![CDATA[<p>Hello, <em>weblog</em> world! 2 &lt; 4!</p>]]>
  </content>
  <content type="application/xhtml+xml" xml:lang="en-us" rel="fragment">
    <p xmlns="http://www.w3.org/1999/xhtml">
      Hello, <em>weblog</em> world! 2 &lt; 4!</p>
  </content>
</content>

content, ContentDiscussion, ContentAndPermalink, MultipleContentDiscussion, MimeContent, EscapedHtmlDiscussion, ContentProblems, ComponentBlog, AdaptiveBlogosphere


CategoryMetadata, CategoryElementSpec


In a syndicated feed, "content" is the body of an entry a publisher chooses to share, for readers and aggregators to present to the user within the reader/aggregator. In a PieApi, "content" is the body being posted or retrieved. An entry may contain all sorts of content: text, images, audio, video, etc. [WWW]Media types (ne้ MIME types) can be used to distinguish between these various types of content.

Some content types are XML fragments from other XML formats, some developed for weblogging, groupware, or social software, some developed for other purposes. XML fragments are placed in <content>.


'content' has the following attributes:

type

language

mode

rel

KevinMarks - there is a key distinction missing here that needs specifying. A machine generated excerpt is very different from a human summary or abstract. A parser should be able to know the difference - this is a key flaw in current RSS. Similarly, knowing whether the content is an abstract or the full post is very important for human readers (who can usually tell machine truncated pieces). See ContentMustHaveRel for more.

value

src

length


The default mode of encoding is parsed-XML content and may consist of arbitrary XML elements and character data. escaped means the value consists of only XML character data, no special processing beyond that expected from that the content type, using either entity escaping or CDATA sections. base64 indicates that the value is encoded using Base64, [WWW]RFC2045, section 6.8.

'src' is a URI location reference to the content of this entry; it is not a reference to another resource that is the subject of or related to this entry. A reader may retrieve the value of the reference and later pass it embedded to another reader.

There is only one <content> element in an entry. Multipart media types ([WWW]RFC2046 section 5.1) can be used to represent alternatives (pick the best, with the publisher's best at the end), related (one or more are primary, the rest are used by reference), mixed (don't know which is primary or the publisher's best), and parallel (try to present all simultaneously, like an image and audio). Unknown multipart media types should be treated as mixed.

Entry <content> elements do not contain other feeds, entries, or comments. See Related for creating relationships between entries and other resources.

Content always refers to complete resource entities unless a 'rel' attribute is provided to indicate otherwise. It is common in syndicated feeds to only include an (X)HTML fragment as the content that forms the body of an entry. In that case, feed providers should use rel="fragment".

Examples

This is an example of using XHTML as a content value, parsed as XML (no 'mode' attribute).

<content type="application/xhtml+xml" xml:lang="en-us" rel="fragment">
  <p xmlns="...">Hello, <em>weblog</em> world! 2 &lt; 4!</p>
</content>

In the following, the content is escaped. The value is a sequence of characters that the reader processes according to it's type.

<content type="text/html" xml:lang="en-us" mode="escaped" rel="fragment">
  <![CDATA[<p>Hello, <em>weblog</em> world! 2 &lt; 4!</p>]]>
</content> 

And is equivalent to:

<content type="text/html" xml:lang="en-us" mode="escaped" rel="fragment">
  &lt;p&gt;Hello, &lt;em&gt;weblog&lt/em&gt; world! 2 &amp;lt; 4!&lt;/p&gt;
</content> 

What a reader does with "HTML in content" is based on the content type of the entry, there is no concept of "embedded markup". The value of content is a sequence of characters that the reader chooses to display according to the content type. See EscapedHtmlDiscussion.

A text/plain content:

<content type="text/plain" xml:lang="en-us">
  <![CDATA[ Hello, _weblog_ world! 2 < 4! ]]>
</content>

A image/jpeg content (not real data):

<content type="image/jpeg" encoding="base64">
  xo+0AFh5Fh1mdsTbTRt781hrVbF3
</content>

An MPEG video included by reference:

<content type="video/mpeg" src="http://example.com/funny.mpeg" />

multipart/alternative

<content type="multipart/alternative">
  <content type="image/jpeg" encoding="base64">
    xo+Hello0AFWeblogh5FWorldh1mImagedsTbrVbF3
  </content>
  <content type="text/html" xml:lang="en-us" mode="escaped" rel="fragment">
    <![CDATA[<p>Hello, <em>weblog</em> world! 2 &lt; 4!</p>]]>
  </content>
  <content type="application/xhtml+xml" xml:lang="en-us" rel="fragment">
    <p xmlns="http://www.w3.org/1999/xhtml">
      Hello, <em>weblog</em> world! 2 &lt; 4!</p>
  </content>
</content>

CategoryModel, CategoryRss