MovableBlog: Archives: eXtensible Markup Language

A weblog about the Movable Type Publishing Platform and other geekery

December 22nd, 2004

Instead of Feeling Overwhelmed by the Amount of Information That I Ought To Be Absorbing »

Suw Charman, writing in her Strange Attractor weblog, writes about the feeling after switching to NetNewsWire from Bloglines:

At last, I feel like I am in control of my aggregator again. Instead of feeling overwhelmed by the amount of information that I ought to be absorbing, instead of feeling scared to open my aggregator because the unread posts are gonna overtop any second and flood my poor little brain, I feel like I have a nice, tidy resource that I can dip into any time I want. Of course, much of this is an illusion, facilitated by a folder cunningly called 'blogs/tech/stuff' which contains pretty much everything that's currently uncategorised, but I can cope with that act of wilful self-deception.

I've been using NetNewsWire for about a month now, and the 2.0 release makes it a rather elegant and feature-rich, though still simple and easy-to-use, aggregator. The desktop aggregators I've tried on my now-lonely Windows XP box (though you'd think it would welcome the presence of its attractive cousin, the Powerbook G4), made me appreciate content aggregation from both a consumer and provider's point of view. I started on Syndirella, which had a neat screen-scraping feature for those sites that did not have RSS feeds. After active development ceased, I moved to to SharpReader. It has really neat features, like showing the relationships between individual entries aggregated by the software, but it was a memory hog when memory my older system was and still is at a premium. FeedDemon, and though my bank account may have squirmed under the pressure at the time, it was fully worth the purchase price. Development is active, and the 1.5 release, in beta at this writing, is zippy has a really great feature set. I recommend it without hesitation to Windows XP users.

The feature I most liked about FeedDemon, and that I like about NetNewsWire, is seeing the text from all the items ordered reverse-chronologically, be it from an individual feed, a group of feeds, or the list of items that are new. This is the way of displaying feed items that makes the most sense to me, and is the least email-like. The central idea of weblogs, or at least one of the central ideas, is that we were supposed to have web-based, linkable, fairly short (but size doesn't always matter), timely posts that fade into the archives. NNW gives me the option to view the full text of the entries sorted reverse-chronologically. (View » Layout » Combined View.) I'm liking more and more the idea of having one page to look at and letting the old stuff just fall away. This will matter most to people who value only the most recent information. Anything older than that will not be useful to them.

I'm not one of those people, however: I read personal weblogs more than I read technological weblogs, and if it's a few days old and well-written, I'll read, link to, and comment on what they've written. The value for me, then, is not when the information was produced but what that information is. A lot of people are like that. A lot of people also feel there is little value in historical information, because if they're only interested in commenting on what happened in the last day or so, then they'll just set their hundreds of posts that they missed to the "read" status and move on to the new stuff. Instead of feeling overwhelmed by the amount of information that they ought to be absorbing, then, they could just let the new stuff wash over them as if the old information was never there.

Besides, isn't that what search engines are for?

Posted by Richard at 11:08 PM

November 30th, 2004

Related Links in Your Sidebar Using RSS, PHP and Magpie », for me, is not so much a way to store my bookmarks online and view others' bookmarks as it is a collaborative linkblogging tool. In this article, I detail how I created a "related links" sidebar on my personal weblog, Just a Gwai Lo (scroll down to the "Delicious" heading; the same script is used to generate a less-cluttered page of links). Here is, in brief, how it works: I make a link at, tag it—generally looking at the HTML pages of the tags I'm using, to see what I'm getting myself into—and then use the RSS feeds generated for each tag to add on a few links as, essentially, related links. If Flickr had tags inside a <dc:subject> element like did, I'd be spending the time writing this article making basically the same thing, except a "related photos" page. I suppose I could learn the APIs for both and Flickr and accomplish the same thing, but I'd rather not.

The first two lines of the script enable the RSS fetching functions from the Magpie RSS library. The line after that starts an unordered list for the links. If you'd rather skip reading the explanation in this article, you can view the source code. One day I'll put this code in my Subversion repository, which gently weeps because it is currently empty.

I should mention that the source code is the most current version of the script, and may differ slightly from what you read below.

You need the Magpie PHP RSS library. Also make sure to make the changes noted in the script itself.

require_once "/home/richard/rssclasses/";
require_once "/home/richard/rssclasses/";

print "<ul>\n";

The third line tells the rest of the script what your username is:

$username = "username"; // replace with your username

When I was testing the script, was down for a few minutes, and I needed the ability to say the links were "unavailable at the moment". The Magpie Cookbook gives a method for cloaking warnings, so I included the following line before Magpie fetched the RSS feed.

error_reporting(E_ERROR); // cloak error messages

The next line fetches the RSS feed and puts the items into an an object.

$del = fetch_rss("".$username);

The next line simply checks to see whether the fetch was successful:

if ($del) {

Since shows the last 30 links that you've posted, it can get a little out of hand when you have related links on top of that, so I limit the amount of links to 5. You can experiment with the number to get the amount you're commfortable displaying.

$delitems = array_slice($del->items, 0, 5);

Starting the loop to display the items from the RSS feed:

foreach ($delitems as $item) {

The next line and following if block check to see if the date has been printed yet. If you want a different date format than, for example, "November 21st, 2004", check the PHP date codes and replace "F jS, Y" accordingly.

   $datethis = date("F jS, Y", parse_w3cdtf($item['dc']['date']));    
if ($datethis != $dateprinted) {
print " <li>";
print $datethis;
print "</li>\n";

Now comes the code to display your link and the description, if there is one. I like having lots of print statements because it makes debugging easier.

   print "  <li>";
print "<a href=\"";
print $item['link'];
print "\">";
print $item['title'];
print "</a>";
if ($item['description'] != "") {
print ": ";
print $item['description'];
print "</li>\n";

Now the fun part. The next if statement checks to see if there is a <dc:subject> element inside the item that the script is processing, which means you have tagged the link with one or more tags.

   if (isset($item['dc']['subject'])) {

If there are tags, then the script converts the string separated by spaces into an array.

     $tags = explode(" ", $item['dc']['subject']);

Now the script creates another list item in HTML, then starts a nested list within that list item.

     print "  <li>\n";
print " <ul>\n";

After starting the nested list, the script fetches the RSS feed for each of the tags in the item. The third line in thiis code block limits the related items to 2, because otherwise, if you tag your item with a lot of tags, you'll get a lot of related items.

     foreach ($tags as $tag) {
$tagrss = fetch_rss("".$tag);
$tagitems = array_slice($tagrss->items, 0, 2);

Still only processing the RSS feed of one of your tags, another loop starts to process the items in that RSS feed. The second line filters out links created by you (after all, those links appear in the RSS feed for the tag as well) because it would just be redundant, especially if the last few links with that tag were your links.

       foreach ($tagitems as $tagitem) {
if ($tagitem['dc']['creator'] != $username) {
print " <li>";
print "<a href=\"";
print $tagitem['link'];
print "\">";
print $tagitem['title'];
print "</a>";

We're still in the second loop (that is, inside the loop for the tag's RSS feed which is inside the loop for processing the tags of your original item), and the following block...

           if (rtrim($tagitem['description']) != "") {
print ": ";
print $tagitem['description'];

Because you were not the original author of the related link--unless you have another account that you linked something using the same tag with--you can absolve yourself of some responsibility of the content (link URL, text and description) by saying who it was linked by. In this script, I had it so that it linked to the author's page. (It seemed only fair that if I'm syndicating their content I should link to the page from which it came.) After doing this, all the loops, except for the very first, which is of your links' RSS feed, are closed, as is the nested list.

           print " (linked by ";
print "<a href=\"";
print $tagitem['dc']['creator'];
print "\">";
print $tagitem['dc']['creator'];
print "</a>)</li>\n";
print " </ul>\n";
print " </li>\n";

The next line stores the date of the most recent item printed, so that when it goes back to the top of the loop, it can check against the date of the next item. The original loop is closed (after all of your items are processed) and the if block is closed.

   $dateprinted = $datethis;

Remember how we had the rudimentary error checking at the beginning? The following else block just prints something more friendly than an ungly error message. Lastly, the end tag for the unordered list is printed.

else {
print "<li> links not available at the moment.</li>\n";

print "</ul>";

That's the script. Let me know if you run into any problems with it. I've been meaning to update my instructions to integrate PHP and using Magpie and my instructions to integrate using a Movable Type plugin, but instead wrote the above script.

Posted by Richard at 11:01 PM

April 16th, 2004

Integrating with PHP and Magpie »

In December of last year I published a way to integrate into your Movable Type-powered weblog. If you have PHP installed on your system, you can use the Magpie RSS PHP library in conjunction with the following PHP code to integrate on any website that has PHP. You will need to replace every instance of username with the links you wish to syndicate.

<h4><a href=""></a> links</h4>

require_once "";
// change to reflect path of

$yummy = fetch_rss("");

$maxitems = 15;

$yummyitems = array_slice($yummy->items, 0, $maxitems);

foreach ($yummyitems as $yummyitem) {

print '<li>';
print '<a href="';
print $yummyitem['link'];
print '">';
print $yummyitem['title'];
print '</a>';
if (isset($yummyitem['description'])) {

print ': ';
print $yummyitem['description'];

print '</li>';
print "\n";



Posted by Richard at 02:13 PM | TrackBacks (23)

May 10th, 2003

RSS 2.0 Getting Standardized? »

It looks as if RSS is getting standardized. Well, the process seems to be just getting underway in a semi-organized fashion.

This post by Sam Ruby is the best starting point and will lead you to all the pertinent info.


Posted by Richard at 10:40 PM | Comments (0)

April 27th, 2003

In Progress: OPML Template for MT »

I'm calling on people who are smarter than me to fix an OPML template for Movable Type that I've made. It outputs well-formed XML (see my output), but it (from what I gather) crashes Userland's Radio, which is a Bad Thing. I'm under the impression that my output is valid against the OPML spec, but corrections to that impression are welcome.

So, before proceeding, note that this template is a work in progress, and is not sanctioned by anybody. But maybe you can fix it. An XML expert I consulted believes the problem is not the encoded HTML in the resulting file, but the paragraph tags and title attribute in anchor (link) tags, and the individual paragraphs need to converted into individual outline elements, all the while stripping out tags that will not render in Radio, whatever those may be. In other words, a MT Text Formatting filter is needed.

Or perhaps there's a better way to write the template?

Posted by Richard at 11:27 PM | TrackBacks (1) | Comments (3)

April 23rd, 2003

Zeldman on RSS »

Earlier I expressed disappointment that Zeldman doesn't offer an RSS feed (and used the phrase 'main offender', which was probably inappropriate). He recently commented about RSS in more detail. Mark Pilgrim's brief reply: "I'm happy to read your words in their native environment, but a simple change notification system would be nice."

Somewhere in between my disappointment and the Zeldman-Mark Pilgrim mini-conversation, I noted that "I don't mind so much organizations like the New York Times and the Christian Science Monitor, who at least go to the trouble of writing [...] a brief summary of the article" and that an excerpt-only feed is "better than having to visit the site in question every hour or so, clamouring for an update, when the aggregator clamours for you". Kalsey and Jim Ray provide short, informative blurbs about their posts as well.

So maybe Zeldman could meet us half-way by writing a brief blurb about a recent mini-essay, he would give us what we want (an update when and about what he posts) which would encourage us to visit the actual site and see his in the graphical context. (To be fair, he actually does touch on this, so he's well within his right of not meeting us at all.) But as for his assertion that "RSS feeds seem to have commodified the personal web space, turning every scribbler into a pundit or 'journalist,'", didn't weblogs already do that?

Update Thursday April 24, 2:40 PM: Zeldman now has a feed available, on an experimental basis. We continue to admire him for hand-coding his site, and slightly more now for hand coding RSS.

Posted by Richard at 11:10 PM | Comments (0)

April 22nd, 2003

Bray's Problems With RSS »

Tim Bray has some problems with RSS. I was little confused myself by HTML escaping when writing an OPML template for Movable Type, and basically followed what Dave Winer did in his OPML file. I figure when in doubt, do what the inventor does. See? His OPML file escapes HTML.

The aforementioned OPML templates are forthcoming. Let me ask an actual XML expert or two what they think before proceeding.

Posted by Richard at 11:00 PM | Comments (0)

April 6th, 2003

Blogs Without RSS = Less Readers? »

I have come to the viewpoint that if you don't have an RSS feed, you shouldn't have a blog. Maybe thats harsh and there is a whole another model but I can't spend the time to surf a 150 sites a day. If its not on an RSS feed, I won't see your site or read it, and you know what? Most other people won't see it or read it either.

I disagree with that sentiment, which appears here. Odds are that the people who don't read Talking Points Memo have reasons other than the lack of RSS feed for not reading it, despite it being an excellent weblog. The above sentiment is echoed in this post elsewhere: "But if anyone wants to blog without an RSS feed... more power to them - just don't expect too many readers." Again, Talking Points Memo disproves that: it has quite a few readers despite not having an RSS feed (to my knowledge). Maybe if they qualified it with "if anyone is considering starting blogging, but without an RSS feed", then maybe I might be inclined to agree with their sentiments.

From that last-linked post: "And feeds that don't contain the entire post content aren't much better in my view". Fair enough. But at least they give us weblog-readers with news aggregators the ability to tell if a site has been updated or not, saving us from having to visit the site in question hour after hour (instead, we press Refresh on our aggregator hour after hour).

RSS is changing the way weblogs are published and read, but just because a site doesn't have an RSS feed, doesn't mean it isn't worth reading.

Posted by Richard at 08:35 PM | Comments (2)

SharpReader »

I may just have to switch news aggregators to SharpReader. The 'plus' icon is cool: it shows you what other feed linked to a link in the feed item your reading. There's less features than Syndirella (like no Feed Properties option), but SharpReader looks nicer. What I like about it most (as compared to Syndirella) is the ability to sort feeds. mm.

[via Phil Ringnalda]

Posted by Richard at 06:19 PM | Comments (0)

March 26th, 2003


According to Tim Bray, XML doesn't suck after all. That's a relief.

Posted by Richard at 10:38 PM | Comments (0)

RSS Evangelism »

At, I'm registered as an Evangelist, and there are sites that I would like to read that do not, as far as my autodiscovering feed reader and I can determine, have XML feeds. These sites (Zeldman being the main offender, which is understandable, since he hand codes his site) have been bookmarked as a group in Mozilla, but it would save time to have them aggregated in my copy of Syndirella.

Now, I just read Mark Pilgrim's post about nntp//rss, which I have yet to install. What concerns me now, though, is the last sentence of the email that Mark quotes—rather than quote something he quotes, I'll defer to his post. I've written earlier (here, which is a comment to this post at that a list of shame might not be the best approach to RSS evangelism, and that a short, well-worded email would be more appropriate. But I yet to actually try to actually use this approach.

Has anyody successfully convinced webloggers to provide RSS feeds before? How did you approach it?

Posted by Richard at 01:28 PM | Comments (5)

March 24th, 2003

Self-Explanatory RDF? »

Erik Benson, if I read his " self-explanatory text" weblog entry correctly, is saying that learning RDF by looking at it requires a lot of looking up what the vocubulary of RDF means, and can be very similar to the way I approached the reading of some of the journal articles I read in university. I would read a paragraph and see some people-, place- or even event-names that were theretofore unrecognized, and I would then proceed to look those names up and find others, look those names up, etc. It would take hours to read a journal article that, if read once straight through, would have taken less than an hour. Erik writes: "As you can see, at its very base, RDF is still relying on the foundations of our understanding of English to figure out what this stuff is. Which means we script builders still need to build into our scripts an interpretation of what Property means in our tools, and what UnambiguousProperty means." He then invokes the LazyWeb by asking if there are tools in simplifying the process of quick access to information definitions, but not before saying he himself is working on such tools. [via Six Apart]

Posted by Richard at 07:58 PM | Comments (1)

March 22nd, 2003

No War Feedster »

Feedster now has war filter, in that you can filter out sites having to do with the war. Full disclosure: originally I thought it filtered out sites that were pro-war and gave only anti-war posts, but it's actually for those who, like many, are just sick of hearing about it. Myself, I was a political science major in university, so I'll leave it up to you to guess as to whether I'm sick of it. Check this post on the Feedster weblog for more details.

P.S. if you search for 'Iraq' with the No War filter on, it doesn't work that great. [first link via Ben Hammersley]

Posted by Richard at 04:37 PM | Comments (1)

March 21st, 2003

RSS Comparison Chart »

There is now available a chart comparing what is required, optional, and not supported in the various versions of RSS. No word yet on what version 3.14159265359 supports. [first link via Scripting News]

Posted by Richard at 04:36 PM | Comments (0)

Content Synidcation with RSS Available Soon »

There is another sample chapter available to Content Syndication with RSS by Ben Hammersley (see previous post): Chapter 2, Content-Syndication Architecture. Chapter 4, RSS 0.91, 0.92, and 2.0 (Really Simple Syndication) is still available. See Ben Hammersley's post for links to preorder the book.

Posted by Richard at 01:10 PM | Comments (0)

March 20th, 2003

Syndirella Bookmarklet »

This is pretty neat: a bookmarklet to get Syndirella to subscribe to the page you're on. It works as intended, and saves having to cut & paste the URL into Syndirella. It would be even cooler, however, if it switched to Syndirella and then clicked the 'Download' button to automatically audiscover the feed, rather than having to do those two steps ourselves. That's probably asking a lot of Javascript though. I mean, hey, at least it works in Mozilla. [via Syndirella mailing list]

Posted by Richard at 11:50 PM | Comments (0)

March 19th, 2003

XML Too Hard? »

An XML Hero Reconsiders? Kendall Grant Clark: "all opinions about XML are equal. Except that that's not really true. All opinions about XML are equal, except some are more equal than others. Among the more equal opinions are ones held by the people who drafted the XML specification. " Takes on the notion that XML is too hard for programmers.

The Road to XHTML 2.0: MIME Types by Mark Pilgrim: with server-side code to tell your browser that the page is being served as application/xhtml+xml.

Also intersting: Standards: Optional Features or Law?" by Dimitris Dimitriadis

Posted by Richard at 05:42 PM | Comments (0)

March 18th, 2003

Another RSS Tutorial »

Syndicating Your Web Site's Content with RSS by Scott Mitchell: he lost me when he went into ASP coding, but then again, I'm a PHP guy. Or maybe I need to learn ASP. [via first Scripting News and then]

Posted by Richard at 10:42 PM | Comments (1)

March 17th, 2003

Introducing Feedster »

If you're an RSS-fiend like myself, you might have already come across Feedster (definitely a better name than Roogle), which is a search engine for RSS-feeds. The design even looks nice, and hopefully I can search it for things I remember seeing in the RSS feeds I subscribe to, but forget which feed it was (at least until Syndirella gets a search function). I like the idea of searching only the indivdual posts, and not the whole page, which will have multiple posts. I like the idea of Google going to the anchor nearest to the first occurance of the search result, but Feedster, theoretically, now accomplishes this. [via many blogs, Phil's being the latest]

Posted by Richard at 11:36 PM | Comments (0)

March 11th, 2003

RSS Feed Reader Directory »

RSS Feed Reader Directory: This was originally a ping on the sidebar, and wasn't directly related to Movable Type, but it's still good enough for a link from me. I've been using Syndirella ever since I heard about it on dive into mark. The author of the program is very receptive to bug reports and feature requests on the Syndirella email list.

We all know about The Tyranny of Email, but what about the Tyranny of RSS Feeds?

Posted by Richard at 10:22 PM | Comments (0)

March 6th, 2003

Some Articles »

Two excellent articles, the first more practical than the second, and the second more theoretical (which is to say entirely so) than the first:

There is a third article that looks interesting, but I have as yet not read it.

Posted by Richard at 07:47 PM | Comments (0)

March 3rd, 2003

NewsMonster Sucks »

Looks like I'm not the only one who thinks that NewsMonster sucks. The install didn't even work for me, and I followed the uninstall instructions the other day. Although I found all the files listed in the instructions, the references to NewsMonster weren't even in some of the files. I'm lucky, though, since I'm not plagued by the re-occuring configuration wizard.

Update: March 4, 5:45 PM: Mark climbs down from his strong anti-NewsMonster position, linked above.

Posted by Richard at 10:45 PM | Comments (0)

February 28th, 2003

Evil RSS »

Evil RSS: it doesn't crash Syndirella (20030224) if you answer No to the 'send e-mail report to the developer' prompt.

Five minutes later: Okay, it does if you load the offending posts in the evil feed often enough.

Posted by Richard at 08:11 PM | Comments (0)

February 25th, 2003

RSS Separates Content From Design »

Just to add to what The Shifted Librarian said about RSS feeds (or, more accurately, to respond to whom she quoted), I like the fact that I can separate the content from the design. Sure, there are plenty of well designed (i.e. simple but elegant) weblogs out there (e.g., ktheory, dive into mark, Gizmodo, svn and the list goes on), but it's the content that is still king. Tim is right, however, in that RSS doesn't work well for media-intensive weblogs.

Posted by Richard at 10:30 PM | Comments (0)

February 22nd, 2003

Cleared Bookmarks »

I needed to clear some bookmarks, and here are the geekier of the articles that were there.

Posted by Richard at 10:09 AM | Comments (0)

February 21st, 2003

RDF vs. XML »

If you need it dumbed down a little, here's a happy little graphical represenation of RDF vs. XML. [via Anil]

Posted by Richard at 07:22 PM | Comments (0)

NewsMonster and robots.txt II »

The comments for Ben Hammersley's post on NewsMonster features a debate between Mark Pilgrim and Kevin Burton. They've butted heads before. As for myself, I had difficulty installing it last night. I'll try again tonight after bowling.

I brought Mark's discussion up on the Syndirella mailing list, and there will be some limited support for robots.txt in a future release.

Also: Mark's Day 2 of NewsMonster.

Posted by Richard at 12:39 PM | Comments (0)

February 19th, 2003

NewsMonster and robots.txt »

Mark Pilgrim: why NewsMonster is bad (and what you can do about it).

Posted by Richard at 11:32 PM | Comments (0)


XFML is an XML format designed to ease indexing, publishing and sharing of hierarchical metadata. Important concepts include topics, facets and occurencestrength. Peruse the spec for XFML 1.0, and be sure to check out the Movable Type template for XFML. The software compatible with XFML is listed, but evidently a PHP/MySQL solution for authoring in XFML is coming soon. Is there no PHP parsing solution available yet? [via feature request in MT support forum]

Posted by Richard at 01:10 PM | Comments (0)

PHP, RSS and MT »

Some links found while traveling while browsing the site and through web searches:

Posted by Richard at 12:36 PM | Comments (0)

February 13th, 2003

Bible XML Service »

Using the ESV Bible as a Web Service: an RFC

And there was much rejoicing. Okay, bad joke, and it's even worse than you think, my being an atheist/agnostic (if you can believe it, I switch between the two). Interesting tool for faith-based blogs, one of which I follow, uh, religiously.

Route I took to get the first link: A Frog in the Valley > Heal Your Church Web Site > Bible Is Getting Even Friendlier to Programmers.

Posted by Richard at 06:03 PM | Comments (2)

February 11th, 2003

NetNewsWire and MT »

Mena reports that NetNewsWire 1.0 works with MT, but categories are problematic.

Posted by Richard at 06:02 PM | Comments (0)

February 9th, 2003

RSS Sample Chapter »

The fine folks at O'Reilly have released a beta chapter of Content Syndication with RSS by Ben Hammersley. There are some typos (e.g. "Its author, Dave Winer, did not invent any new practices with this specification, but did codify RSS in a far more precise way that [sic] the Netscape original..."), but it's cool that they're releasing a chapter even before the estimated March 2003 publication.

Posted by Richard at 10:00 PM | Comments (0)

January 27th, 2003

Quicklinks and RSS »

Photodude knows a good weblogging trend when he sees one, and the latest is having a sidebar of links to articles and websites with RSS feeds. This is a grand idea because a) it gives us an idea of the surf patterns of famous (as well as not-so-famous) bloggers; b) we as readers get cool links with short, pithy comments; and c) those recent converts to news aggregators (like myself) get RSS feeds to them.

Both bloggers mentioned in Photodude's post as well as Photodude himself use MT to post the links, or was it needless to point that out?

Posted by Richard at 10:15 PM | TrackBacks (0) | Comments (0)

January 23rd, 2003

RSS and MovableBLOG »

During my research into RSS, I looked for (and found) a post on the pros & cons of including the full post in one's RSS feed. At the moment, the RSS feed for this site includes the full post instead of the excerpt, which is the current default. The feed currently linked on the sidebar—index.rdf—is RSS 1.0. There exists a RSS 2.0 feed as well, the template for which I got at Dive Into Mark (unless it's gone now...?).

I'm using Syndirella as my RSS aggregator at the moment. There is also a page on how to validate your RSS with Movable Type.

The tutorials I read today:

Posted by Richard at 02:10 PM | TrackBacks (0) | Comments (0)