Personal tools
You are here: Home Articles Apr 2003 OPML Directory Browser Prototype
Navigation
 
Document Actions

OPML Directory Browser Prototype

by paul last modified 2006-01-20 19:06

Investigations to OPML, Mozilla, and Dave's project to do directory browsing.

I spent a little while today investigating OPML. Dave Winer has been talking about OPML, directory browsers, and the upcoming OSCOM conference. I really like outliners, especially OmniOutline, so I thought I'd look a little at how to do the OPML directory browser in Mozilla.

To cut to the chase, here is a screenshot of a tree in XUL before I load Dave's sample OPML file:

...and here is a screenshot after I press the button:

So what exactly went on when I pressed the button? At this stage, not much. The original XUL file has a bunch of hardcoded treechildren/treeitem/treerow/treecell elements. When you press the button, it asynchronously loads an OPML file as XML using XMLHttpRequest. It then iterates over the top level children in the <body>. For each <outline> element, it adds another treechildren/treeitem/treerow/treecell. The styling is all done as a CSS, so Mozilla can do its funky treechildren selectors to put images embedded into the <treecell>.

Presumably I could enable the security permission that would let you type in a URL to load data from, then keep accumulating more and more OPML data in the tree.

The things that were twists in the road:

1) Mozilla still doesn't let you do inline editing in a tree element. This makes building an outliner into a very different activity. I guess that Andrew Wooldridge's XBL approach from Anthem is the best you could do.

2) It would make a lot more sense to write an XSLT transform, from OPML to XUL, rather than doing it through the DOM.

3) I tried sticking the files on a server so I could point you at the demo. But the Apache I have access to doesn't recognize .xul as the right mime type.

4) The OPML directory browser project goes a little in the direction of our OSCOM project for building a common CMS front end using Mozilla. However, the way of getting there (since we are doing something in Mozilla with its datasources) is pretty different.

5) The activeRenderer vs 1.4 at slam looks pretty interesting.

6) In reading the archives from the OPML dev list, I found a few queries about Mozilla, the tree widget, RDF, etc. I'll try to respond to some of them, if anybody is still interested.

Source

http://www.zeapartners.org/articles/200304/opmlprototype