RSS
Fixing RSS 1.0
An attempt to fix RSS 1.0 maintaining a high level of compatibility to previous versions.
Issues
This tries to address following problems of RSS 1.0 version 1.3
- image as hybrid property/class
- items-Seq makes it unsuitable to merge the triples of different versions of the same channel
- missing upper-casing of class-names
Furthermore it makes the following changes to reflect current usage priorities and for simplification
- deprecates textinput
- introduces enclosures as more generic replacement for image
- introduces the icon-property as an easy way to add icons to channels and items
- the link property id deprecated in favour of specifying that the Channel and Item classes must be named resources and dereferenceable to the representation previously linked by the link-property
Schema
<!-- RDF Schema declaration for Rich Site Summary (RSS) 1.0 <http://purl.org/rss/1.0/> --> <!-- Uses term_status to say whether the term, is 'stable','unstable','testing' or 'deprecated' Note that 'deprecated' isn't listed in danbri's schema--> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:vs="http://www.w3.org/2003/06/sw-vocab-status/ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:wot="http://xmlns.com/wot/0.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:base="http://purl.org/rss/1.0"> <rdf:Description rdf:about=""> <dc:title>The RSS 1.0v1.4 Voabulary</dc:title> <rdfs:comment>A vocabulary for describing syndicated news items and news channels</rdfs:comment> </rdf:Description> <rdfs:Class rdf:about="http://purl.org/rss/1.0/channel" rdfs:label="channel" rdfs:comment="An RSS information channel."> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> <vs:term_status>deprecated</vs:term_status> <rdfs:subClassOf rdf:resource="http://purl.org/rss/1.0/Channel"/> </rdfs:Class> <rdfs:Class rdf:about="http://purl.org/rss/1.0/Channel" rdfs:label="Channel" rdfs:comment="An RSS information channel."> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> </rdfs:Class> <rdfs:Class rdf:about="http://purl.org/rss/1.0/image" rdfs:label="Image" rdfs:comment="An RSS image. DEPRECATED: use icon or enclosure properties instead"> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property" /> <vs:term_status>deprecated</vs:term_status> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> </rdfs:Class> <rdfs:Class rdf:about="http://purl.org/rss/1.0/item" rdfs:label="Item" rdfs:comment="An RSS item."> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> <vs:term_status>deprecated</vs:term_status> <rdfs:subClassOf rdf:resource="http://purl.org/rss/1.0/Item"/> </rdfs:Class> <rdfs:Class rdf:about="http://purl.org/rss/1.0/Item" rdfs:label="Item" rdfs:comment="An (news) item that can be contained in a channel."> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> </rdfs:Class> <rdfs:Class rdf:about="http://purl.org/rss/1.0/Enclosure" rdfs:label="Enclosure" rdfs:comment="Represent an enclosure of an (multimedia) resource in a channel or item. Typical properties include title, format, enclosed."> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> </rdfs:Class> <rdfs:Class rdf:about="http://purl.org/rss/1.0/textinput" rdfs:label="Text Input" rdfs:comment="An RSS text input."> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> <vs:term_status>deprecated</vs:term_status> </rdfs:Class> <rdf:Property rdf:about="http://purl.org/rss/1.0/items" rdfs:label="Items" rdfs:comment="Points to a list of rss:item elements that are members of the subject channel. DEPRECATED: the items are associated to a channel with the inChannel property. Usually they are sorted by date."> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> <vs:term_status>deprecated</vs:term_status> </rdf:Property> <rdf:Property rdf:about="http://purl.org/rss/1.0/title" rdfs:label="title" rdfs:comment="A descriptive title for the channel."> <rdfs:subPropertyOf rdf:resource="http://purl.org/dc/elements/1.1/title"/> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> </rdf:Property> <rdf:Property rdf:about="http://purl.org/rss/1.0/link" rdfs:label="link" rdfs:comment="The URL to which an HTML rendering of the subject will link. DEPRECATED: Items and Channel can be dereferenced to a suitable representation, additionally rdfs:seeAlso may be used to point to further resources"> <rdfs:subPropertyOf rdf:resource="http://purl.org/dc/elements/1.1/identifier"/> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> <vs:term_status>deprecated</vs:term_status> </rdf:Property> <rdf:Property rdf:about="http://purl.org/rss/1.0/url" rdfs:label="URL" rdfs:comment="The URL of the image to used in the 'src' attribute of the channel's image tag when rendered as HTML."> <rdfs:subPropertyOf rdf:resource="http://purl.org/dc/elements/1.1/identifier"/> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> <vs:term_status>deprecated</vs:term_status> </rdf:Property> <rdf:Property rdf:about="http://purl.org/rss/1.0/description" rdfs:label="Description" rdfs:comment="A short text description of the subject."> <rdfs:subPropertyOf rdf:resource="http://purl.org/dc/elements/1.1/description"/> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> </rdf:Property> <rdf:Property rdf:about="http://purl.org/rss/1.0/releaseDate" rdfs:label="releaseDate" rdfs:comment="The date the subject was release. By default this is the primary Sorting criterium for the items"> <rdfs:subPropertyOf rdf:resource="http://purl.org/dc/elements/1.1/date"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#date"/> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> </rdf:Property> <rdf:Property rdf:about="http://purl.org/rss/1.0/inChannel" rdfs:label="inChannel" rdfs:comment="Indicates a channel witch features the subject."> <rdfs:domain rdf:resource="http://purl.org/dc/elements/1.1/Item"/> <rdfs:range rdf:resource="http://purl.org/dc/elements/1.1/Channel"/> <rdfs:subPropertyOf rdf:resource="http://purl.org/dc/elements/1.1/description"/> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> </rdf:Property> <rdf:Property rdf:about="http://purl.org/rss/1.0/enclosure" rdfs:label="enclosure" rdfs:comment="Indicates ecnlosed content of the subject (image, sound, etc)"> <rdfs:domain rdf:resource="http://purl.org/dc/elements/1.1/Item"/> <rdfs:range rdf:resource="http://purl.org/dc/elements/1.1/Enclosure"/> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> </rdf:Property> <rdf:Property rdf:about="http://purl.org/rss/1.0/icon" rdfs:label="icon" rdfs:comment="Indicates a primary icon of the subject, the object is a named resource which is dereferenceable as an icon."> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> </rdf:Property> <rdf:Property rdf:about="http://purl.org/rss/1.0/format" rdfs:label="format" rdfs:comment="the mymetype of the subject"> <rdfs:domain rdf:resource="http://purl.org/dc/elements/1.1/Enclosure"/> <rdfs:subPropertyOf rdf:resource="http://purl.org/dc/elements/1.1/description"/> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> </rdf:Property> <rdf:Property rdf:about="http://purl.org/rss/1.0/enclosed" rdfs:label="enclosed" rdfs:comment="The Document encloused with an enclosure"> <rdfs:domain rdf:resource="http://purl.org/dc/elements/1.1/Enclosure"/> <rdfs:range rdf:resource="http://xmlns.com/foaf/0.1/Document" /> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> </rdf:Property> <rdf:Property rdf:about="http://purl.org/rss/1.0/name" rdfs:label="Name" rdfs:comment="The text input field's (variable) name."> <rdfs:isDefinedBy rdf:resource="http://purl.org/rss/1.0/"/> <vs:term_status>deprecated</vs:term_status> </rdf:Property> </rdf:RDF>
Examples
Compact
This examples does not use any deprecated features, at the price that old aggregators may not be able to parse it correctly:
<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/"> <Channel rdf:about="http://www.xml.com/xml/news"> <title>XML.com</title> <description> XML.com features a rich mix of information and services for the XML community. </description> <icon rdf:resource="http://xml.com/universal/images/xml_tiny" /> </Channel> <Item rdf:about="http://xml.com/pub/2000/08/09/xslt/xslt.html"> <title>Processing Inclusions with XSLT</title> <description> Processing document inclusions with general XML tools can be problematic. This article proposes a way of preserving inclusion information through SAX-based processing. </description> <enclosure rdf:parseType="Resource"> <title>The speech</title> <enclosed rdf:resource="http://http://xml.com/pub/2000/08/09/speech.ogg" /> <format>audio/ogg</format> </enclosure> <releaseDate rdf:datatype="http://www.w3.org/2001/XMLSchema#date">1999-08-16</releaseDate> <inChannel rdf:resource="" /> </Item> <Item rdf:about="http://xml.com/pub/2000/08/09/rdfdb/index.html"> <title>Putting RDF to Work</title> <link>http://xml.com/pub/2000/08/09/rdfdb/index.html</link> <description> Tool and API support for the Resource Description Framework is slowly coming of age. Edd Dumbill takes a look at RDFDB, one of the most exciting new RDF toolkits. </description> <releaseDate rdf:datatype="http://www.w3.org/2001/XMLSchema#date">1999-08-14</releaseDate> <inChannel rdf:resource="" /> </Item> </rdf:RDF>
Compatible
This examples uses deprecated properties and classes to be more compatible with consumers following a spec previous to 1.4. For old parsers it looks like and old feed containing not-understood (but legal) elements resp. triples. New parsers will identify some types and properties as deprecated an ignore them.
<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/"> <channel rdf:about="http://www.xml.com/xml/news"> <rdf:type rdf:resource="http://purl.org/rss/1.0/Channel"/> <link>http://www.xml.com/xml/news</link> <title>XML.com</title> <description> XML.com features a rich mix of information and services for the XML community. </description> <icon rdf:resource="http://xml.com/universal/images/xml_tiny" /> <items> <rdf:Seq> <rdf:li rdf:resource="http://xml.com/pub/2000/08/09/xslt/xslt.html" /> <rdf:li rdf:resource="http://xml.com/pub/2000/08/09/rdfdb/index.html" /> </rdf:Seq> </items> </channel> <item rdf:about="http://xml.com/pub/2000/08/09/xslt/xslt.html"> <rdf:type rdf:resource="http://purl.org/rss/1.0/Item"/> <link>http://xml.com/pub/2000/08/09/xslt/xslt.html</link> <title>Processing Inclusions with XSLT</title> <description> Processing document inclusions with general XML tools can be problematic. This article proposes a way of preserving inclusion information through SAX-based processing. </description> <enclosure rdf:parseType="Resource"> <title>The speech</title> <enclosed rdf:resource="http://http://xml.com/pub/2000/08/09/speech.ogg" /> <format>audio/ogg</format> </enclosure> <releaseDate rdf:datatype="http://www.w3.org/2001/XMLSchema#date">1999-08-16</releaseDate> <inChannel rdf:resource="" /> </item> <item rdf:about="http://xml.com/pub/2000/08/09/rdfdb/index.html"> <rdf:type rdf:resource="http://purl.org/rss/1.0/Item"/> <link>http://xml.com/pub/2000/08/09/xslt/xslt.html</link> <title>Putting RDF to Work</title> <link>http://xml.com/pub/2000/08/09/rdfdb/index.html</link> <description> Tool and API support for the Resource Description Framework is slowly coming of age. Edd Dumbill takes a look at RDFDB, one of the most exciting new RDF toolkits. </description> <releaseDate rdf:datatype="http://www.w3.org/2001/XMLSchema#date">1999-08-14</releaseDate> <inChannel rdf:resource="" /> </item> </rdf:RDF>