[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RSS-DEV] Re: [syndication] Time for XHTML-RSS?
WARNING: Long rant on XHTML and RSS and how the two SHOULD be separate....
Now we're getting to the meat of the matter. Basically, my argument goes as follows:
1. RSS is great for syndication.
2. XHTML is great for presentation in the browser.
3. Most RSS feeds only repeat information that is available in a web page
(either on a weblog or the front page of an online publication)
4. There is a demand to embed XHTML component within RSS channels.
5. There is an effort underway to make XHTML modular so it can be embedded in
other XML files.
6. Namespaces are used to refer to multiple named spaces.
Based on those assumptions, I deducted (maybe wrongly) that:
1. RSS and XHTML could be embedded in the same document.
2. In order to handle the embedding, one would call on both namespaces.
3. Once that is done, it would be the responsibility of the software to
establish whether it wants RSS or XHTML to be the primary language.
An example:
RSS channel with XHTML:
<?xml version="1.0" encoding="UTF-8"?>
This defines our XML channel
<rss:rss lang="en" xmlns:rss="Name Space for the RSS feed"
xmlns:html="http://www.w3.org/1999/xhtml">
This gives RSS a priority but also calls on the XHTML namespace
<html:html>
Start of HTML
<rss:channel>
Start of RSS channel
<html:head>
Start of HTML header
<title>TNL.net blogroll</title>
Since this is used in both HTML and RSS, we can keep it here
</html:head>
<html:body>
Start of html body
<html:div style="display:none">
Because this is info for the RSS channel only, we hide it using style.
<rss:link>http://www.tnl.net/blogroll</rss:link>
<description>Sites I visit</description>
<image>
<title>TNL.net</title>
<url>http://www.tnl.net/assets/images/logos/tnldotnetlogo.gif</url>
<link>http://www.tnl.net/blog/</link>
<width>125</width>
<height>44</height>
<description>TNL.net</description>
</image>
</html:div>
Now we stop hiding things
<html:ul>
For semantic use, we will put the items in a list
<item>
<link>
<html:div style="display:none">
http://www.tnl.net/somestory
</html:div>
</link>
Don't want to display this so we hide it from the browser. However, the link is
relevant to an RSS reader so we have to have it.
<html:li>
Our first listed item
<title><html:a href="http://www.tnl.net/somestory" target="sometarget">A story
title</html:a><html:br /></title>
In HTML, we want to show a link on this title so we use a a tag.
<description>Some day, this may work!</description>
Description is used for both so no need to hide it.
</html:li>
</item>
End our item
Loop through through all items
</html:ul>
End your HTML list
</html:body>
Close the HTML body
</rss:channel>
close the RSS channel
</html:html>
Close the HTML document
</rss:rss>
close the RSS file
.....
Technically, the reverse should also be possible:
XHTML page with RSS channel embedded
<?xml version="1.0" encoding="UTF-8"?>
This defines our XML channel
<html:html lang="en" xmlns:rss="Name Space for the RSS feed"
xmlns:html="http://www.w3.org/1999/xhtml">
This gives RSS a priority but also calls on the XHTML namespace
<rss:rss>
Start of HTML
<rss:channel>
Start of RSS channel
<html:head>
Start of HTML header
<title>TNL.net blogroll</title>
Since this is used in both HTML and RSS, we can keep it here
</html:head>
<html:body>
Start of html body
<html:div style="display:none">
Because this is info for the RSS channel only, we hide it using style.
<rss:link>http://www.tnl.net/blogroll</rss:link>
<description>Sites I visit</description>
<image>
<title>TNL.net</title>
<url>http://www.tnl.net/assets/images/logos/tnldotnetlogo.gif</url>
<link>http://www.tnl.net/blog/</link>
<width>125</width>
<height>44</height>
<description>TNL.net</description>
</image>
</html:div>
Now we stop hiding things
<html:ul>
For semantic use, we will put the items in a list
<item>
<link>
<html:div style="display:none">
http://www.tnl.net/somestory
</html:div>
</link>
Don't want to display this so we hide it from the browser. However, the link is
relevant to an RSS reader so we have to have it.
<html:li>
Our first listed item
<title><html:a href="http://www.tnl.net/somestory" target="sometarget">A story
title</html:a><html:br /></title>
In HTML, we want to show a link on this title so we use a a tag.
<description>Some day, this may work!</description>
Description is used for both so no need to hide it.
</html:li>
</item>
End our item
Loop through through all items
</html:ul>
End your HTML list
</html:body>
Close the HTML body
</rss:channel>
close the RSS channel
</rss:rss>
close the RSS file
</html:html>
Close the HTML document
Notice that there is only a relatively small change in that I decided to swith
the RSS statement for an HTML one in this.
The flexibility needed here is to be able to make XHTML truly modular. If you
can do that, then it is up to the person writing the document to decide how they
want to organize their document.
I do agree that RSS is RSS and XHTML is XHTML... Trying to mix the two into a
new language seems to be creating new issues further down the line (how do you
keep extending them in parrallel to the extension made in each of the subsets.
What I think is needed is NOT a new language but a way to attach both. IF XHTML
is truly modular, then treat it as a module. It seems to me that the
fundamentatal assumption of namespaces (and what makes them great) is that a
language can evolve and then be referenced from other document types. The glue
(or integration piece) being the xmlns tag. The point I'm trying to make in
http://www.tnl.net/blog/2003/4/25#ModuleMadnessandSemanticStupidity (obviously,
I'm not making it well enough) is that we are almost there. If the DOCTYPE
requirement is dropped from the XHTML spec (it could be made optional); and if
the root element of the document no longer must be <html> (that too should be
made optional) then XHTML becomes modular enough to be embedded in anything,
including an RSS feed. That solves the first problem of embedding XHTML in RSS.
The next question is to figure out how to embed other elements in XHTML. Right
now, the W3C does NOT offer a way to properly embed other things in XHTML. As a
result, there is no way to add "smarts" to an XHTML document. This is a big flaw
as it essentially says that, if we are to build a smarter web, we will have to
do it in parallel to the existing one. If you look at this long term, it seems
like something that will be very unwieldy and difficult to maintain.
TNL
long winded, maybe, and trying to make sense with a single cup of coffee :)
--
Tristan Louis
http://www.tnl.net