Greetings
I'm experimenting with publishing dynamic content in weblogs, and have
run into some interesting questions I want to offer up for
consideration. Apologies, it's a bit lengthy.
myRadio is extensible, and I've previously written modules to display
stock quotes (and other content) along side the rss aggregator. Now,
the authoring software has been scripted (using Radio macros) so that
the myRadio stock quotes can be published, and kept current, in a
weblog entry. The idea is to extend this to different content, like
sports scores, weather, ski reports, etc.
(http://radio.weblogs.com/0100875/2002/11/13.html shows an example)
In order to keep the stock quote data current, and avoid republishing
the weblog, both html and rss, I use the standard trick of a
'javascript include' -- the stock quote is published in a small
javascript file, with just a document.write, and the HTML weblog
imports that file in a script tag. When the quote data changes
(myRadio checks a web service on a 15 minute interval) only the
javascript include is changed.
So this works great for HTML but not for the RSS feed. In Radio, the
javascript tags are 'neutered'. In NewzCrawler, all markup is stripped
completely... And actually, in Amphetadesk, the javascript is
untouched, it works! at least v 0.92. Don't have any others to test
here.
I tried a couple alternatives to javascript, for the RSS file.
I thought I had a clever hack by using CSS 2 Generated Content
(http://www.w3.org/TR/REC-CSS2/generate.html) . The stock quote was
written in a remote stylesheet, like such
SPAN.quote-yhoo:before { content: "15.05" }
which was LINK'd in the rss item description, and also contained a
span element, id 'quote-yhoo'. Radio passed this through untouched,
and it worked! until I checked MSIE, and discovered that browser
doesn't support all of the CSS 2 recommendation. Damn! Anyway, this
method wouldn't work for aggregators that don't display in the
browser.
Using IFRAMEs worked in both MSIE/Moz, but the formatting is terrible,
and again it doesn't work in non-browser aggregators. But without a
workable alternative, this is what I'm going with for now.
Going forward, it would be cool to see aggregators that could handle
this sort of RSS post. One possibility would be to include the stock
ticker in an element under a seperate namespace. The aggregator would
handle this by requesting a current quote, and inserting that into the
displayed text, at an offset indicated by a second element.
For example,
<item>
<title>Testing Microcontent</title>
<link>http://radio.weblogs.com/0100875/2002/11/13.html#a728</link>
<description>Yahoo! </description>
<stock:ticker>YHOO</stock:ticker>
<stock:offset>7</stock:offset>
</item>
The problem is that every aggregator would also need to implement a
handler for the stock namespace. A more generic method would have the
aggregator do a 'file include' at display time.
<item>
<title>Why not file include</title>
<link>http://radio.weblogs.com/0100875/2002/11/13.html#a728</link>
<description>Yahoo! </description>
<include:url>http://radio.weblogs.com/0100875/gems/quote-yahoo.html
</include:url>
<include:offset>7</include:offset>
</item>
This namespace addition and aggregator functionality would easily
allow inclusion of any time of dynamic content in an RSS feed.
Perhaps there already exists some RSS module like this?
Aggregator developers, what do you think of supporting something like
this?
Any other thoughts?
Thanks for reading all the way!
Mikel