[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extensibility in Syndication formats




On Wednesday, August 18, 2004, at 03:47 AM, Danny Ayers wrote:
In RSS 2.0 you might have something like:

<item>
<guid>http://example.org</guid>
<title>My Project</title>
<x:Project>
	<x:name>My Project</name>
	<x:homepage>http://example.org/home</x:homepage>
<x:Project>
</item>

In RSS 1.0 it might look like:

<item rdf:about="http://example.org";>
<title>My Project</title>
...
</item>

<doap:Project rdf:about="http://example.org";>
	<doap:name>My Project</name>
	<doap:homepage rdf:resource="http://example.org/home"; />
</doap:Project>

If the  consumer understands the project vocabulary, then full
communication can take place with either version. However, assume the
consumer knows nothing about the project extension.

If the consumer understands RDF/XML syntax, then from the RSS 1.0
version it can determine that:

1. the item resource is an instance of the class doap:Project
...
If the consumer understands RSS 2.0, XML and namespaces, then it still
understands absolutely *nothing* about the project information, not
even that it applies to the same item.

After thinking about this briefly and realizing what it meant (I think), this became the single most interesting point yet to come out of this discussion. Allow me to make another example (with some fanciful elements and structure) to illustrate the point and see if I understand it correctly:


<item>
	<title>My title</title>
	<author>
		<name>Joe</name>
		<url>http://www.joe.com/</url>
	</author>
	<colors>
		<text>blue</text>
		<background>white</text>
	</colors>
</item>

From this, we know that the item has an author and colors, but what do the elements inside <author>...</author> and <colors>...</colors> describe? The author, or the item? The "colors", whatever that is, or the item? We must understand this XML syntax to know.

<item rdf:about="http://abc.com";>
	<title>My title</title>
	<author rdf:about="http://www.joe.com/";>
		<name>Joe</name>
	</author>
</item>

<colors rdf:about="http://abc.com";>
	<text>blue</text>
	<background>white</text>
</colors>

Not being very familiar with RDF/XML, I have a nagging suspicion that I've done something wrong having the author right inside the item, but the point is that now we know that the author's <name> is referring to the author, and not the item, and that the <text> and <background> colors are referring to the item (or, more precisely, to the same thing that the item is referring to), because the rdf:about URI for <item> and <colors> is the same--they're talking about the same thing.

Does that capture a non-trivial part of what RDF gets us? That we can tell exactly what each piece of data is talking about? And as more extensions are added to make places for more types of data within an Atom feed, however they may or may not be nested, we don't end up confused about what thing any particular piece of data is describing?