Re: Processing a home-brewed FOT

Subject: Re: Processing a home-brewed FOT
From: Richard Light <richard@xxxxxxxxxxxxxxxxx>
Date: Tue, 21 Jul 1998 09:52:52 +0100
In message <u4swcppcv.fsf@xxxxxxxxxxxxxxxxxxx>, Toby Speight
<Toby.Speight@xxxxxxxxxxxxxx> writes
>You ought to be able to feed it into the *front end* of Jade if you're
>happy to grind out a stylesheet for the identity transform of FOT.  I
>don't know why such a stylesheet hasn't been contributed to the Jade
>distribution; it's hard to believe that no-one has made one yet.

Probably because it's a massive job!  As far as I can tell, there will
need to be a specific declaration for _each_ characteristic of every
flow object type in the FOT DTD.  

What I've come up with so far deals with one characteristic (quadding)
of one flow object type (paragraph).  However, this approach might be a
useful template for the full thing.  It uses a procedure (att-to-symbol)
which converts the attribute value to lower case (still needed with the
latest Jade?) and thence to a symbol.  

There would need to be similar procedures to convert attribute values to
length-specs, booleans, etc.  The advantage of this approach is that it
lends itself to writing a scripted conversion of the FOT DTD itself to a
series of element construction rules:

(define (att-to-symbol attname inherited-value)
  (if (attribute-string attname (current-node))
    (string->symbol (STRING-DOWNCASE (attribute-string attname (current-

(element paragraph
  (make paragraph
;       ... lots of characteristics, including:
        quadding: (att-to-symbol "quadding" (inherited-quadding))
;       ... lots more characteristics

It should be possible to deduce which conversion is required from the
ATTLIST declaration for each characteristic in the DTD.

Have I missed something obvious, or should this work?

Richard Light.

Richard Light
SGML/XML and Museum Information Consultancy

 DSSSList info and archive:

Current Thread
  • Processing a home-brewed FOT
    • Richard Light - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id JAA14904Mon, 20 Jul 1998 09:59:06 -0400 (EDT)
      • Toby Speight - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id KAA15965Mon, 20 Jul 1998 10:29:07 -0400 (EDT)
        • Richard Light - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id EAA20487Tue, 21 Jul 1998 04:59:20 -0400 (EDT) <=
      • <Possible follow-ups>
      • Sean Mc Grath - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id GAA22050Tue, 21 Jul 1998 06:50:55 -0400 (EDT)