[toronto-lisp] SGML, Scheme and a historical anecdote

Abram Hindle abram.hindle at softwareprocess.es
Wed Oct 7 19:06:31 UTC 2009

XML at least defines a few things like attributes. With s-expressions
how one handles attributes and the possible values an attribute can be
are rather undefined. Some communities will have common patterns but is
there really a standard to say the same thing as XML?

XML also allows PCDATA which would require another agreement.

In a DTD-less manner Sexprs and XML are pretty close but unless you
agree upon some XML-ish semantics they are not equivalent.

If anyone has a good example of a common idiom for doing this that is
accepted and written out I'd like to hear of it. So far I'm only aware
of Rivest S-exprs which I would suggest is XML without attributes and
PCDATA but with entities, lists, strings and character types.

* XML is not equivalent to S-Exprs and vice versa
** They are probably reducible to each other
* I'd like to know if I'm wrong or there are S-Expr standards out there
that handle what XML handles.


Brian Connoy wrote:
> This list could probably use some activity, so your reminiscence is welcome.
> As an aside, my own casual readings evoke the notion that XML is just a bad reinvention of LISP list structure ... but without the ability to EVAL any of it.  
> Luckily, I never touch the stuff!
> BC
> -----Original Message-----
> From: David Penton [mailto:djp at arqux.com] 
> Sent: Wednesday, October 07, 2009 2:20 PM
> To: toronto-lisp at common-lisp.net
> Subject: [toronto-lisp] SGML, Scheme and a historical anecdote
> This is a reminiscence that may be a bit over-long. You may wish to  
> spend your time wisely and just skip reading it ;-)
> At the Oct. 6 meeting I made a vague reference to having heard about  
> Scheme for the first time in connection with SGML. I was not  
> altogether sure that my memory was correct, but a quick check in  
> wikipedia confirms the connection. The sgml stylesheet language DSSSL  
> is said to be "based on a subset of Scheme." (http://en.wikipedia.org/wiki/DSSSL 
> )
> Moreover, its connection with my own history now reminds me that, like  
> Brian Connoy, I too missed an earlier chance to dive into learning  
> lisp/lisp-like languages. This is where I first heard about Scheme.
> In the early 2000's  I was heavily involved in a project whose main  
> objective was to put Canadian federal legislation online. XML was the  
> big deal back then, so we planned to use it to mark up, store, print  
> and search Canadian statutes and regulations.
> One of the biggest problems encountered was how to print legislation  
> marked up as XML. The legacy system used legislation created in  
> WordPerfect, which was then converted to the input format of custom  
> implementation of one of the phototypesetting engines of the day (I  
> forget which one.) The legacy printing system was becoming  
> unsupportable due to its age, the large quantity of cruft in the code  
> and the gradual disappearance (through death, insanity etc.) of most  
> people who knew how to use it.
> The jackass whose responsibility it was to replace the legacy printing  
> system had absolutely no clue about XML. He had spent years at the  
> Canada Gazette, and had done everything in MS Word plus a bunch of  
> crap he had kluged up in VB or some other horror. He absolutely could  
> NOT grasp the idea of hierarchical data structures, trees etc. When I  
> tried to explain recursion and tree structures to him he just lost his  
> temper.
> The project bogged down almost to the point of cancellation over this  
> issue. The House of Commons techical staff were in a total panic.
> I "tactfully" informed the project manager that the guy in charge of  
> printing was a total fucking idiot. Eventually I began investigating  
> methods of printing XML and SGML on my own. I discovered Jade (a DSSSL  
> engine) and also JadeTex. I  had used TeX heavily for some time, so I  
> proposed that we go that direction.
> As it turned out, DSSSL was in fairly bad repute with a lot of people  
> who had considerable influence on the project. This was almost  
> entirely because (to paraphrase these people) "DSSSL = Scheme and  
> Scheme is *weird* and NOBODY uses Scheme for anything useful." This  
> same bunch also had a lot of prejudice against TeX. The desktop  
> publishing, or rather word processing paradigm ruled supreme in their  
> world. And anyway, in the structured markup world at the time many  
> people thought that SGML was too complex, and hence so was anything  
> related to it. (That's why we have XML, I guess.)  (For a contrary  
> view check out some of the recently deceased Erik Naggum's rants about  
> XML.)
> At that point I began to investigate XSLT and XSL-FO. XSLT engines  
> were reasonably advanced at the time (XSLT 1.0 I think). XSL-FO was  
> pretty new. Only a rather half-baked open source version (FOP, an  
> apache project) was readily available. Hardly anyone was all that  
> worried about printing out XML, because the focus was all on its use  
> for web site content, or SOAP, and that kind of stuff. So transforming  
> XML to HTML and styling with CSS was about all anyone seemed to care  
> about.
> So, one April easter weekend I worked for four days straight (with  
> about two hours of sleep per day) to do a 'proof of concept' print  
> engine. I bashed together something using the project's XML for  
> legislation and XSLT outputting to XSL-FO. This worked fairly well. It  
> also gave me a quick introductory lesson in (more or less) functional  
> style, or at least without being able to rely on side-effects.
> As it all turned out, I had so offended the people in charge of the  
> print engine project that they persuaded management to
>    (a) take my proof of concept stuff
>    (b)hire consultants to produce a production-quality system based on  
> it
>    (c) acquire a commercial XSL-FO engine (Antenna House), and
>    (d) banish me to some remote part of the project for having  
> insulted the dimwit whose job I had largely done.
> I became the official project pariah for a time. So much for being  
> technically right, but tactlessly, vociferously, and impolitically so.
> It would not surprise me to find out that the almost-functional nature  
> of XSLT is based on the same rationale for basing DSSSL on Scheme. I  
> have read some explanations of the advantages the designers thought  
> might result from making XSLT side-effectless, but I did not  
> understand them at the time. Perhaps learning Scheme some day might  
> clarify the matter for me.
> I seems that the prevailing prejudice against DSSSL and Scheme caused  
> me to miss my chance to dive into the lisp/scheme world seven or eight  
> years ago.
> - Dave -
> _______________________________________________
> toronto-lisp mailing list
> toronto-lisp at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/toronto-lisp
> _______________________________________________
> toronto-lisp mailing list
> toronto-lisp at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/toronto-lisp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <https://mailman.common-lisp.net/pipermail/toronto-lisp/attachments/20091007/a96ec2c6/attachment.sig>

More information about the toronto-lisp mailing list