Contents of this message:
* Background
* Proposal
* Example
* Summary
* Attachments: oldmodel.png, newmodel.png
BACKGROUND
The current logical model of the RSS 1.0 proposal has some deficiencies,
which others have discussed in this group, and I would like to propose a
way around them.
The problem centers around the relationship between a channel and items.
Although most items in use today belong explicitly to one and only one
channel, this is not the general case.
For instance, from XMLhack I could produce 30 channels--a general one,
and then one for each of the specialized categories that we report on.
Clearly the items would be shared among several channels.
The current 'inchannel' and 'position' properties do not permit this.
Consider the aggregated case where all the channels and items escape out
of their host files. It is not by any means inconceivable that more than
one channel contains an item with an identical URI (example: a channel
which publishes commentary). Difficulties could well arise here.
It's easiest to see with a diagram, and I attach two to this message.
The file 'oldmodel.png' shows how things are now. There are two
channels, and they share itemC--this is not possible in the current
model, and the conflict is shown as a dashed line in the relationship.
Also note the direction of the arrows in the oldmodel diagram.
PROPOSAL
I propose that the list of items in a channel should instead be a
property of the channel itself, along with their position in a channel's
line-up. This allows the explicit reuse of items independently of the
channel (which my.userland, Moreover and Meerkat all do already--there's
your use-case!)
This alternative model is shown in the file 'newmodel.png'. Note that
the rdf:_1 ... properties are created implicitly from the ordering of
item references in a channel list, not by the explicit method used by
the current 'position' property (note for language lawyers: I have also
omitted the illustration of the rdf:type property being Seq, it being
not strictly necessary in considering this model.)
(This, incidentally, would also allow the creation of a channel
description independently of the item description, allowing the use of
RSS to describe your personal "hotlist" of news stories, a bit like
Meerkat's 'mob' system.)
So, what does it look like in the syntax?
Add the list of channel items to the channel as a property, thus:
<items>
<rdf:Seq>
<rdf:li resource="
http://xmlhack.com/read.php?item=500" />
<rdf:li resource="
http://xmlhack.com/read.php?item=499" />
<rdf:li resource="
http://xmlhack.com/read.php?item=498" />
<rdf:li resource="
http://xmlhack.com/read.php?item=497" />
<rdf:li resource="
http://xmlhack.com/read.php?item=496" />
<rdf:li resource="
http://xmlhack.com/read.php?item=495" />
</rdf:Seq>
</items>
The ordering is also then implicit, and no 'position' property is
required.
I would then advise the removal of 'inchannel' and 'position' from the
<item> node.
(I've had it pointed out to me that they could actually stay in, and be
overridden by the items property of a channel. I tend to feel this is
a poor compromise at what is still an early stage.)
There's also a knock-on of this, for images and textinputs (much as I'd
like to hurl textinputs out of the window!). I propose the following
notations for those:
<images>
<rdf:Seq>
<rdf:li resource="
http://xmlhack.com/images/mynetscape88.gif" />
</rdf:Seq>
</images>
<actions>
<rdf:Seq>
<rdf:li resource="
http://xmlhack.com/search.php" />
</rdf:Seq>
</actions>
(For textinput, I prefer the more generic term 'action', as I would like
to see a future RSS module be developed to describe richer URL query
functionality than just the plain old textinput).
EXAMPLE
Here's a complete example (although it doesn't exercise 'textinput' it's
enough to get the idea!)
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF
xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="
http://purl.org/rss/1.0/"
xmlns:rss091="
http://purl.org/rss/1.0/modules/rss091/"
xmlns:dc="
http://purl.org/dc/elements/1.1/"
>
<channel rdf:about="
http://xmlhack.com/rss10.php">
<title>XMLhack</title>
<link>
http://xmlhack.com/</link>
<dc:source resource="
http://xmlhack.com/" />
<description>
Developer news from the XML community
</description>
<rss091:language>en-us</rss091:language>
<dc:publisher>Edd Dumbill (mailto:
webmaster@...)</dc:publisher>
<dc:creator>Edd Dumbill (mailto:
editor@...)</dc:creator>
<dc:rights>Copyright 1999-2000, xmlhack team.</dc:rights>
<images>
<rdf:Seq>
<rdf:li resource="
http://xmlhack.com/images/mynetscape88.gif" />
</rdf:Seq>
</images>
<items>
<rdf:Seq>
<rdf:li resource="
http://xmlhack.com/read.php?item=731" />
<rdf:li resource="
http://xmlhack.com/read.php?item=730" />
<rdf:li resource="
http://xmlhack.com/read.php?item=729" />
<rdf:li resource="
http://xmlhack.com/read.php?item=728" />
<rdf:li resource="
http://xmlhack.com/read.php?item=727" />
<rdf:li resource="
http://xmlhack.com/read.php?item=726" />
</rdf:Seq>
</items>
</channel>
<image rdf:about="
http://xmlhack.com/images/mynetscape88.gif">
<title>xmlhack</title>
<url>
http://xmlhack.com/images/mynetscape88.gif</url>
<link>
http://xmlhack.com</link>
<rss091:width>88</rss091:width>
<rss091:height>31</rss091:height>
<rss091:description>News, opinions, tips and issues concerning XML
development</rss091:description>
</image>
<item rdf:about="
http://xmlhack.com/read.php?item=731">
<title>Open Digital Rights Language</title>
<link>
http://xmlhack.com/read.php?item=731</link>
<dc:description>Renato Iannella of IPR Systems has announced version 0.5
of the "Open Digital Rights Language" (ODRL), an XML encoding for expressing
rights over
digital assets.</dc:description>
<dc:subject>XML</dc:subject>
<dc:subject>W3C</dc:subject>
</item>
<item rdf:about="
http://xmlhack.com/read.php?item=730">
<title>New release of XML-RPC for PHP</title>
<link>
http://xmlhack.com/read.php?item=730</link>
<dc:description>A new version of XML-RPC for PHP has been released,
incorporating new helper functions in addition to bug fixes.</dc:description>
<dc:subject>Protocols</dc:subject>
<dc:subject>Tools</dc:subject>
</item>
<item rdf:about="
http://xmlhack.com/read.php?item=729">
<title>DocBook XML v4.1.1 released</title>
<link>
http://xmlhack.com/read.php?item=729</link>
<dc:description>A new version of DocBook XML, the XML version of the
popular technical documentation DTD, has been released by Norm Walsh.
</dc:description>
<dc:subject>SGML/XML</dc:subject>
<dc:subject>OASIS</dc:subject>
</item>
<item rdf:about="
http://xmlhack.com/read.php?item=728">
<title>Help wanted: XML for the visually impaired</title>
<link>
http://xmlhack.com/read.php?item=728</link>
<dc:description>JP Schnapper-Casteras has posted to XML-DEV asking for
volunteer developers to work Project Ocularis, a Linux distribution geared to
the needs of the visually impaired.</dc:description>
<dc:subject>Community</dc:subject>
</item>
<item rdf:about="
http://xmlhack.com/read.php?item=727">
<title>RDF-based tool for managing photographs</title>
<link>
http://xmlhack.com/read.php?item=727</link>
<dc:description>Bert Bos has announced the availablility of rdfpic, a
tool for managing photos using the PhotoRDF work described earlier this
year.</dc:description>
<dc:subject>RDF</dc:subject>
</item>
<item rdf:about="
http://xmlhack.com/read.php?item=726">
<title>COM SOAP services</title>
<link>
http://xmlhack.com/read.php?item=726</link>
<dc:description>Simon Fell has released version 1.2 of 4S4C,
a SOAP to COM integration layer.</dc:description>
<dc:subject>Protocols</dc:subject>
<dc:subject>Tools</dc:subject>
</item>
</rdf:RDF>
SUMMARY
The current model (which Ian Graham rightly urges us to focus on, not
the syntax) places the channel-item relationship wrongly in the item.
This is true of images and textinputs too. My proposal fixes the model
to properly represent this relationship. It doesn't affect the RSS 0.9
compatibility of RSS 1.0 processors any more than the existing syntax.
-- Edd