RDF Site Summary 1.0 Modules: Content

Authors

Gabe Beged-Dov, JFinity Systems LLC
Aaron Swartz, AaronSw.com
Eric van der Vlist, Dyomedea

Version

Latest Version: http://purl.org/rss/1.0/modules/content/

DRAFT 2.01 2002-10-04 (Renamed headings - thanks, Bijan!) - ASw
DRAFT 2.0 2002-08-06 (Added content:encoded -- not yet approved; changed affiliation) - AS
1.02 2001-04-05 (Tweaked the copyright) as
1.01 2001-3-8 (Made content:encoding more clear) as
1.0 2001-3-8 (Approved by the WG and moved to standard)
DRAFT 0.4 2001-2-6 (Cleaned up syntax and added encoding) as
DRAFT 0.31 2000-12-26 (Updated stylesheet) as
DRAFT 0.3 2000-12-13 (Removed content:stylesheet attribute; changed content:format to an rdf:resource) as
DRAFT 0.2 2000-08-17 (Added content:stylesheet attribute) as
DRAFT 0.1 2000-08-16

Status

Section one is official, approved 2001-3-1.
Section two is a draft, please send feedback to Aaron or the list.

Rights

Copyright © 2000-2002 by the Authors.

Permission to use, copy, modify and distribute the RDF Site Summary 1.0 Content Module Specification and its accompanying documentation for any purpose and without fee is hereby granted in perpetuity, provided that the above copyright notice and this paragraph appear in all copies. The copyright holders make no representation about the suitability of the specification for any purpose. It is provided "as is" without expressed or implied warranty.

This copyright applies to the RDF Site Summary 1.0 Content Module Specification and accompanying documentation and does not extend to the RSS Module's format itself.

Description

A module for the actual content of websites, in multiple formats.

Namespace Declarations

Updated Syntax

This section is a draft and has not yet been approved by the WG.

content:encoded

An element whose contents are the entity-encoded or CDATA-escaped version of the content of the item. Example:

<content:encoded><![CDATA[<p>What a <em>beautiful</em> day!</p>]]></content:encoded>

Example

<?xml version="1.0" encoding="utf-8"?> 

<rdf:RDF 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns="http://purl.org/rss/1.0/"
> 

  <channel rdf:about="http://example.org/rss.rdf">
    <title>Example Feed</title>
    <link>http://www.example.org</link>
    <description>Simply for the purpose of demonstration.</description>

    <items>
      <rdf:Seq>
        <rdf:li resource="http://example.org/item/" />
      </rdf:Seq>
    </items>
    
  </channel>

  <item rdf:about="http://example.org/item/">
    <title>The Example Item</title> 
    <link>http://example.org/item/</link>
    <content:encoded><![CDATA[<p>What a <em>beautiful</em> day!</p>]]></content:encoded>
  </item> 
</rdf:RDF>

Original Syntax

content:items

content:items is a sub-element of an RSS item or channel. It is used as follows:

<content:items>
  <rdf:Bag>
    <rdf:li>
      <content:item>
        <!-- Use content:item as described below -->
      </content:item>
    </rdf:li>
    <!-- Optionally, include as many more content:item elements as needed. -->
  </rdf:Bag>
</content:items>

content:item

A content:item describes a single version of the content for its parent item. If the content is available on the Web at a specific address, content:item has an rdf:about attribute containg the URI of the content.

<!-- Without a URI: -->
<content:item>
  <!-- information about the item goes here -->
</content:item>

<!-- With a URI: -->
<content:item rdf:about="http://example.org/item/content.png">
  <!-- information about the item goes here -->
</content:item>

A content:item can include the following sub-elements:

content:format

Required. An empty element with an rdf:resource attribute that points to a URI representing the format of the content:item. Suggested best practice is to use the list of RDDL natures.

<content:format rdf:resource="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict" />

rdf:value

Required if no URI is defined for the content:item. Includes the content of the content:item. This is encoded as specified by content:encoding. If the content is included as unencoded XML, then the attribute rdf:parseType="Literal" should be used as to not confuse RDF parsers.

content:encoding

Optional. An empty element with an rdf:resource attribute that points to a URI representing the encoding of the content:item. An encoding is a reversable method of including content within the RSS file.

If no encoding is specified, it should be assumed that the content is included as character data, like so:

<rdf:value>This is &lt;em&gt;very&lt;/em&gt; cool.</rdf:value>

or

<rdf:value><![CDATA[This is <em>very</em> cool.]]!></rdf:value>

If the document is encoded as well-formed XML, the URI http://www.w3.org/TR/REC-xml#dt-wellformed should be used. An example of well-formed XML is:

<rdf:value>This is <em>very</em> cool.</rdf:value>

An example of a content:encoding exlement is:

<content:encoding rdf:resource="http://www.w3.org/TR/REC-xml#dt-wellformed" />

Example

<?xml version="1.0" encoding="utf-8"?> 

<rdf:RDF 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns="http://purl.org/rss/1.0/"
> 

  <channel rdf:about="http://example.org/rss.rdf">
    <title>Example Feed</title>
    <link>http://www.example.org</link>
    <description>Simply for the purpose of demonstration.</description>

    <items>
      <rdf:Seq>
        <rdf:li resource="http://example.org/item/" />
      </rdf:Seq>
    </items>
    
  </channel>

  <item rdf:about="http://example.org/item/">
    <title>The Example Item</title> 
    <link>http://example.org/item/</link>
    <content:items><rdf:Bag>
      <rdf:li><content:item>
        <content:format rdf:resource="http://www.w3.org/1999/xhtml" />
        <content:encoding rdf:resource="http://www.w3.org/TR/REC-xml#dt-wellformed" />
        <rdf:value rdf:parseType="Literal" xmlns="http://www.w3.org/1999/xhtml">
          <em>This is <strong>very</strong></em> <strong>cool</strong>.
        </rdf:value>
      </content:item></rdf:li><rdf:li><content:item>
        <content:format rdf:resource="http://www.w3.org/TR/html4/" />
        <rdf:value><![CDATA[<em>This is<strong>very</em> cool</strong>.]]></rdf:value>
      </content:item></rdf:li><rdf:li><content:item rdf:about="http://example.org/item/content-here.txt">
        <content:format rdf:resource="http://www.isi.edu/in-notes/iana/assignments/media-types/text/plain" />
        <rdf:value>This is &gt;very cool&lt;.</rdf:value>
      </content:item></rdf:li><rdf:li><content:item rdf:about="http://example.org/item/content.svg">
        <content:format rdf:resource="http://www.w3.org/2000/svg" />
      </content:item></rdf:li>
    </rdf:Bag></content:items>

  </item> 

</rdf:RDF>