|
Dave Winer has proposed an open standard called
Outline Processor Markup Language, or OPML for short. I'll let you read the gorey details of this
XML-based format at his Web site.
While OPML -- along with XML in general -- is intended as a standard way to describe an outline especially
for the exchange of outline-oriented data between applications, I wondered how easy it would be to convert
the XML data into a JavaScript- and CSS-controlled HTML presentation. I have done this in the past thanks
to the facilities of the IE5+ and Mozilla browsers, so I dug up some old collapsible outliner code from the CD of my
JavaScript Bible (3rd Edition) and grafted Dave's three sample
outline XML documents with the old code.
The results are viewable from the links below, provided you are using Internet Explorer 5 or later
for Windows. I will eventually tweak the scripts to accommodate the slightly different node parsing that
Netscape 6 implements (which it does by adhering to the W3C DOM Level 2 standard--but let's not get into
that). These examples aren't aesthetically pretty. The great thing was that after cobbling together the first one, the other
two went together in literally less than 5 minutes (actually, the third required nothing more than
pasting the XML into the template). I'm not kidding. That's the beauty of working with
XML as a data carrier.
Here are the three samples:
Feel free to scrounge around the source code. It cries for some cleanup as well as breaking out into
.js and .css libraries. Your feedback is welcome, but don't ask me
to customize anything for you--I'm overloaded with getting JavaScript Bible 4 out of my hair.
|