Re: tables html dsssl HELP!

Subject: Re: tables html dsssl HELP!
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxx>
Date: Sat, 11 Oct 1997 22:40:12 -0400
At 18:01 97/10/10 -0700, Ted Kandell wrote:
>I'm working with Billy Mahoney on this project.
> I ran your test example through Jade and got the output in test.fot and
>test.css

There were no indications in the first posting that the target was HTML.
The code fragment posted used the standardized semantics (flow objects),
which led me to believe that was what you wanted.  The sample I proved
assumed the output was a back end that processed the standardized flow
objects, such as the RTF back end.

>These files look OK to me but when I run test.fot through nsgmls, I don't get
>an .html file.

The function of nsgmls is to parse an SGML file and report on what is being
parsed, not to synthesize any particular markup.

A flow object tree is very useful for debugging, but I am not aware of any
programs (yet) to read one of JADE's flow object trees and processing it
into meaningful output.

Given that you wanted HTML, I recommend you use JADE's SGML back end.
Modifying my first example DSSSL script into one that uses the customized
flow objects and semantics of the SGML back end was quite straightforward.  

I've modified the example to illustrate both flow objects being explicitly
nested and flow objects being implicitly nested through the execution of
element construction rules.

...................... Ken


F:\test>type samp3.sgm
<!DOCTYPE t [
<!--
PUBLIC "+//ISBN 1-894049::CSL::Courses::PFUD//DOCUMENT Sample 3 Source//EN"
Copyright (C) Crane Softwrights Ltd.
-->
<!ELEMENT t - O ( r+ )      -- table  -->
<!ELEMENT r - O ( c+ )      -- row    -->
<!ELEMENT c - O ( #PCDATA ) -- column -->
]><t>
<r><c>r1c1<c>r1c2
<r><c>r2c1<c>r2c2

F:\test>type samp3h.dsl
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">

(declare-flow-object-class element
  "UNREGISTERED::James Clark//Flow Object Class::element")

(element t                      ;the processing of the table element
    (sosofo-append              ;first fixed table then child table
        (make element gi: "TABLE" attributes: '(( "BORDER" "1"))
            (make element gi: "TR"
                (make element gi: "TD"
                    (literal "Row 1 Col 1"))
                (make element gi: "TD"
                    (literal "Row 1 Col 2")))
            (make element gi: "TR"
                (make element gi: "TD"
                    (literal "Row 2 Col 1"))
                (make element gi: "TD"
                    (literal "Row 2 Col 2"))))
    
        (make element gi: "TABLE" attributes: '(( "BORDER" "3"))
            (process-children))))   ;child elements make row flow objs

(element r                      ;a row in the table
    (make element gi: "TR"
        (process-children)))    ;child elements make cell flow objects

(element c                      ;a column in the row
    (make element gi: "TD"
        (process-children)))    ;content of the table cell

; end of file

F:\test>jade -f samp3.err -t sgml -c l:\jade\current\catalog -d samp3h.dsl
>samp3.htm samp3.sgm

F:\test>type samp3.err

F:\test>type samp3.htm
<TABLE
BORDER="1"
><TR
><TD
>Row 1 Col 1</TD
><TD
>Row 1 Col 2</TD
></TR
><TR
><TD
>Row 2 Col 1</TD
><TD
>Row 2 Col 2</TD
></TR
></TABLE
><TABLE
BORDER="3"
><TR
><TD
>r1c1</TD
><TD
>r1c2</TD
></TR
><TR
><TD
>r2c1</TD
><TD
>r2c2</TD
></TR
></TABLE
>
F:\test>


--
G. Ken Holman            mailto:gkholman@xxxxxxxxxxxxxx
Crane Softwrights Ltd.  http://www.CraneSoftwrights.com
1605 Mardick Court, Box 266,         V: +1(613)489-0999
Kars, Ontario CANADA K0A-2E0         F: +1(613)489-0995
PGP Privacy: http://www.cyberus.ca/~holman/gkholman.pgp
Training:  http://www.CraneSoftwrights.com/schedule.htm

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


Current Thread