Re: (dsssl) Heresy

Subject: Re: (dsssl) Heresy
From: "John W. Shipman" <john@xxxxxxx>
Date: Sat, 5 Apr 2003 01:32:20 -0700 (MST)
+--
| >It has occurred to me that DSSSL is, well, not as popular as
| it ought
| >to have been, and that its functions have possibly <whisper>
| been
| >superceded by other systems</whisper>.
|
| The first proposition is correct, the second is not.  You can
| do *some* of what DSSSL does with XSLT.
+--

While we're practicing heresy, I'd like to throw in my two cents'
worth.

I've done a little custom presentation of XML to Web and hardcopy
form.  At the moment my needs are met by using XSLT for simple
stuff, and Python programs built on top of the Document Object
Model (DOM) for anything that's not obvious in XSLT.

Example: I invented an XML file format for my address book.  Each
entry may have several names in it (e.g., John Doe, Jane Roe, and
`Arctic Properties').  I want the presentation to show each entry
under all its names, so this entry would appear under Arctic,
Doe, and Roe.  (I hate cross-references, especially when I'm
standing at a pay phone trying to look up a phone number in a
high wind and poor light.)

Although XSLT can select things, and sort the selected sets, it
wasn't obvious to me how to cause an element to appear in
multiple places.  So I wrote a layer of Python objects that use
the DOM to represent the XML file as abstract data types.  A
small main program on top of this took care of duplicating the
objects for each possible sort key, and then sorting and
formatting them.

For the hardcopy output I had my Python script generate FO (XSL
Flow Objects) as processed by Apache's FOP, and for Web output I
went straight to HTML.

Obligatory DSSSL content:  Could I have done this application
in DSSSL, assuming I had a few months to spend crawling on my
hands and knees through the DSSSL specification and another
few months learning to use it?  I'm assuming that no one has
yet written a Nutshell Guide to DSSSL or the equivalent, so
the only way to learn DSSSL is from the spec.

For the record, despite XML's verbosity, I find it easier to read
XSLT and XSL-FO code than DSSSL code.  But I'm not an old Lisp
hand.

John Shipman (john@xxxxxxx), Applications Specialist, NM Tech Computer Center,
Speare 128, Socorro, NM 87801, (505) 835-5950, http://www.nmt.edu/~john
  ``Let's go outside and commiserate with nature.''  --Dave Farber

 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist

Current Thread