Re: About articles on DSSSL usage

Subject: Re: About articles on DSSSL usage
From: Ron Ross <ronross@xxxxxxxxx>
Date: Sun, 16 May 1999 01:16:25 -0400 (EDT)
On Mon, 10 May 1999, martind@xxxxxxxxxxxxx wrote:
    > What do you do with dsssl?

Sorry about answering this a little late. I refrained from answering
immediately, as my dsssl skills are so ... hm... green, and project
development is sporadic. But I really am enthusiastic, not just about the
productivity I've been able to attain with the little I do have, but also
about the technology's obvious potential in the form of many immediately
relevant applications that I can see burgeoning... oooh -- just a few
keystrokes beyond that tenacious little fringe of complexity and "dark
spots", as one Netizen lost in the SGML production house named them.

My text translation DTD and DSSSL stylesheet. The simplest of measures: a
comment element, so useful while working and revising, that can be toggled
on for the revisions and off for presentational output (I've since
discovered that the DocBook COMMENT tag, with Norm's stylesheet, has
exactly the same functionality). By the same mechanism, more flexible it
seems to me than SGML's raw INCLUDE and IGNORE notations, I now include,
when practical, the entire source document. This cuts down on document
management significantly (on the other hand, it increases time spent
marking up text, although, again, the semantics of doing so are not all
that obtrusive when integrated into the necessary reading of the source).

The upshot of the comment element is that because of the separation of
source from output, structure from formatting, it no longer has to be
eliminated from the document (I say "no longer" in comparison to the
macros I've written for this purpose in Word Perfect). And the upshot of
*that* is that the content of these comments -- the citations of source
text, now juxtaposed to their translations, the alternate readings and
contextual references, etc. -- is now available to "process", or at least
refer to. I can imagine building lexicons that would contain the
vocabulary and idoms peculiar to a field or discipline, an industry or
even sometimes to a particular organization. (The TEI DTD would seem to
provide some analogous structure for this purpose already -- but has
anyone got a decent Tei(lite) stylesheet working ?... more on that later.)

And along with the optional inclusion of the source text, there's no limit
to the relevant meta information that can also be included. Everything
from the authorship, ownership, and purpose of the source text to version
control to data required for invoicing.


A couple of nights ago I didn't sleep. I had just begun a couple of hefty
translation projects, about 10K words or so, due within a week. I worked
half the night and got a good start. The other half of the night...

I came to the limits of my DTD and stylesheet. Tables, lists, a table of
contents, are all still missing. In the interim, I got the text down in
simple paragraphs and headings. This time, I thought (and you may
reasonably think it was bad timing), I didn't want to fall back on my word
processor. It was about time I pushed the envelope a little further. A
brief looking-over of that jaunty DSSSL spec awoke me to the fact that I
would not crack this on my own, not overnight. After all, I have properly
configured and updated copies of the DocBook DTD, with Norm's stylesheet,
and a more dated Tei-lite DTD and stylesheet by Richard Light and Jon
Bosak (Dec. 96).

My working directory now contains several SGML mark-ups of the same text
(not counting those that have been written over) of which none produce
satisfactory output. I've tried DocBook with various top-level elements:
book, part, chapter, sect1. I have the text in Tei-lite as well. They are
all conformant (as validated by nsgmls and psgml). And yet...

I would like to ask a few questions regarding problems with Tei-lite (I'm
concentrating on Tei-lite now, because both the DTD and stylesheet are a
lot smaller and less complex than DocBook, and now that I know a thing or
two, I can hack around with them -- I'll try to not be too dangerous with
my little knowledge;-).

problem 1.
Jade when run directly on the TEI instance, all identifyers fully
resolved, produced the following error message:

  : specification document does not have the DSSSL architecture as a base

Hybrick also gives me roughly the same message. Yet when I run the batch
file (slightly modified) supplied with the stylesheet it runs correctly
(minus problems 2 and 3 below). Run-tei.bat:

   @echo off
   if "%2" == "sgml" goto sgml-output
   jade -c ../../catalog -d tei-dem.dsl -t rtf -o %1.rtf %1.tei
   goto end
   jade -c ../../catalog -t fot -d tei-dem.dsl -o %1.out %1.tei

I don't understand why. Presumably the conditional is not fullfilled,
since only the rtf file is produced and not the "out" file. But I've
modified the extention (from %1.sgml to %1.tei). To my eyes, nothing seems
strange about the architecture of the specification doc, "tei-dem.dsl",
the driver used in both calls, or of the main "tei-lite.dsl". I would much
rather produce output the "normal" way, by invoking Jade directly with the
appropriate parameters, as the batch file method is inconvenient when I
have more than one file with the same root name.

problem 2.

Jade then, while it does produce the rtf file, also produces the following

tei-lite.dsl:562:3:E: no clause in case expression matched ""USLetter""
tei-lite.dsl:567:3:E: no clause in case expression matched ""USLetter""

You'll notice the duplicated quotation marks. I've tried both through the
Emacs shell buffer and at the DOS prompt ( The offending

    (define *paper-type* "A4")
    ; (define *paper-type* "USletter")

    (define *page-width*
      (case *paper-type*         ; line 562
            (("A4") 8.25in)
            (("USletter") 8.5in)))

    (define *page-height*
      (case *paper-type*         ; line 567
            (("A4") 11.5in)
            (("USletter") 11in)))

The variable is modified in the driver with

    (define *paper-type* "USLetter")

Again, I don't understand.

problem 3.

Whitespace. Solved for now, actually, by modifying the P element
specification in the stylesheet. So I'll allow myself another question:

problem 4.

(Not restricted to Tei.) Setting the margin characteristics for a
simple-page-sequence produces output with the correct margin, but the top
and bottom margins include headers and footers. How do I turn them off?
Setting header and footer margins to the same values as top and bottom
margins produced a document with one line per page, and setting them to
'nil is invalid. The default value of 0pt makes a header of the whole top

That's it for now.
Much thanks in advance,


 DSSSList info and archive:

Current Thread