RE: html to dsssl ?

Subject: RE: html to dsssl ?
From: Avi Kivity <Avi@xxxxxxxxxxxxx>
Date: Mon, 12 Jul 1999 11:09:45 +0300
On Monday, July 12, 1999 10:09, Wachata Wolfgang
[SMTP:wolfgang.wachata@xxxxxx] wrote:
> I'm searching for an program (or script) which converts an static
> html-template into dsssl-code for the jade sgml backend.
> This would be very convenient for many "static" parts of my
> stylesheets
> (headers, footers, ...). Because now i am wasting much time on
> converting my
> designed html-code manually to dsssl and then just adding the
> "dynamic
> parts".
> 
> If there is nothing compareable I could think about coding such an
> tool
> myself. Good idea? It would be nice to hear some experts opinions...
> 
I assume you mean translating the static parts into mountains of (make
element) expressions. It isn't really necessary.

If those static parts are well-formed fragments, you could put them in
files, (sgml-parse), then identity-transform. You can also do some
processing (like replacing <homepage> with <a
href="dynamically/generated/reference.html>Homepage</a>).

If they are not well-formed, put them in a file in a cdata marked section,
like

<!dtd text [

<!element text - - (#pcdata) >

]>
<text>
<!cdata[
<head>
... broken html ...
</head>
]>
</text>

Again, (sgml-parse) to get the contents, and probably (make
formatting-instruction) to emit. You lose the ability to manipulate the
text. You can put each section in a file, or multiple sections in a single
file, probably referenced by an ID.

Another alternative is to put the text as a string in the stylesheet. The
downside of this that it is too simple and straightforward for experienced
programmers:

(define (emit-header)
    (make formatting-instruction
        data: "<blah><gurgle>sdfksdjgskg<gurgle/><blah>"
        )
    )
)

(actually, the main downside is that you have to edit the sylesheet with
this method. with the others, you just edit some external file)
---
"The only words which have meaning are the last ones spoken"



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


Current Thread