SGML: Using SGML Architectures and DSSSL to Do Literate Programming

Using SGML Architectures and DSSSL to Do Literate Programming

Title: Using SGML Architectures and DSSSL to Do Literate Programming
Author: "W. Eliot Kimber" <>
Date: 20 Jul 1997 13:11:32 GMT

In order to make the creation of DSSSL specifications easier for me I created a highly-structured document type for DSSSL specifications that lets me create structured and consistent metadata for the specification as a whole, as well as organize the constituent functions and provide structured and consistent metadata for them as well. This document type takes advantage of the built-in architectural processing of JADE (and any similarly-featured DSSSL engine) to automatically and transparently ignore all the non-DSSSL data in my documents, letting me use my structured DSSSL specs directly with JADE (without first stripping out the non-program stuff).

The document type also demonstrates the use of SGML architectures to define part of a larger document type or architecture, in this case, the semantics of the specification metadata, which is general to programs of all types, not just DSSSL specifications. The whole approach could be adapted to literate programming for any programming language by using tools like SGMLNORM or DSSSL to produce the processable versions of the documents (with DSSSL, the input is an SGML document, so the process is easier). For example, it would be a simple matter to create a trivial DSSSL spec that would output pretty-printed, executable source for any programming language.

Also, the document types I've created could be used as architectures from which more specialized document types could be created (for example, you might divide your DSSSL specs into consistent subsections for which you want to define specific element types rather than use my generic "Function Group" element type).

I've made the materials available on the ISOGEN Web site and written a paper explaining all the different things that are going on. You can find the paper at "" and the materials at "".

If you're trying to understand how SGML architectures can be used and what the details of using them are, you may find this paper to be a helpful example, because it uses pretty much all the features the architecture mechanism provides. It also enables the parlor trick of using a DSSSL spec to format itself.

The abstract for the paper is:

Relates the author's experience in developing an SGML-based system for creating and managing DSSSL specifications using SGML architectures as defined by the new Architectural Forms Declaration Requirements Annex of ISO/IEC 10744:1997 (Annex A.3 of HyTime). Demonstrates the use of the following:


<Address HyTime=bibloc homepage="">
W. Eliot Kimber,
Senior SGML Consulting Engineer, Highland Consulting
2200 North Lamar Street, Suite 230, Dallas, Texas 75202
+1-214-953-0004 +1-214-953-3152 (fax) (work)</Address>
"Rats in the morning, rats in the afternoon...if they don't go away, 
I'll be reducated soon..."   --Austin Lounge Lizards, "1984 Blues"