Oft-encountered formatting problem

Subject: Oft-encountered formatting problem
From: christo@xxxxxxxxxxxxxxxxxx (Frank Christoph)
Date: Mon, 26 May 1997 16:30:40 +0900
Hello DSSSL programmers,

There is a problem I have encountered more than once when trying to format
SGML or SGML-like data in order to emulate the results of older, mostly ad-hoc
formatting methods.  The problem is that structure of the formatted document
does not match the element structure of the SGML document.  For example,
the data might look like this:

  <SEC>
  <COMPANY>Big-Time Do-Nothing Company</COMPANY>
  <DESC>We charge lots of money for things you can do yourself.</DESC>
  <MAINOFFICE>BTDN 666 Big Blvd., New York</MAINOFFICE>
  <BRANCHOFFICE>BTDN Los Angeles Branch</BRANCHOFFICE>
  <BRANCHOFFICE>BTDN Boston Branch</BRANCHOFFICE>
  <BRANCHOFFICE>BTDN Tokyo Branch</BRANCHOFFICE>
  <BRANCHOFFICE>BTDN Paris Branch</BRANCHOFFICE>
  </SEC>

where SEC is something like

  <!ELEMENT SEC - - (COMPANY,DESC,MAINOFFICE,BRANCHOFFICE*)>

and it ought to be formatted like this:

  Big-Time Do-Nothing Company

    We charge lots of money for things you can do yourself.

                         Main Office
                  BTDN 666 Big Blvd., New York

                        Branch Offices
  BTDN Los Angeles Branch               BTDN Tokyo Branch
  BTDN Boston Branch                    BTDN Paris Branch

So all the branch offices ought to be directed into the ports of a
column-set-sequence, but since they are on the same level as, for example,
MAINOFFICE and not grouped together as the only children of some other
element (maybe called "BRANCHOFFICES"), there is no good place to put
the column-set-sequence flow object.

One could change the DTD and the data, but that would not be in the spirit of
SGML, I suppose, and I have no access to an implementation of the DSSSL
transformation language.  So what does one do in a situation like this?
I suppose it is possible to construct a special query, but instances like
this seem to appear quite often (esp., for example, with tables), so I
was wondering if there is a simple or idiomatic solution.  Do any other people
come across this problem frequently?  Any solutions?  (Maybe I am just missing
some obvious solution...?)

  - FC


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


Current Thread