SGML or XML transformation into HTML

Subject: SGML or XML transformation into HTML
From: "Didier PH Martin" <martind@xxxxxxxxxxxxx>
Date: Sun, 11 Jul 1999 12:02:03 -0400
Hi,

I saw that several of us are using DSSSL to transform SGML or XML documents
into HTML. This is a question addressed to all of you who have a DTD
different than DocBook. I suppose that if you use docbook, you use Norman's
DSSSL scripts.

So, if your SGML or XML documents have a different DTD than docbook, do any
of you are using Tony's library?

Here is my own personal experience using it.

I am actually playing quite a bit with topic maps for a IETM project. I
wanted to render the topic maps with a HTML browser. thus, I used Tony's
library to do so.

With the "element" construction rule I found that the conversion process
(i.e. from SGML or XML into HTML) do not involve a lot of HTML construct per
rules. For example, I tend to use DIV when I wanted to have something like
the paragraph behavior and SPAN for the sequence behavior. I found also that
DIV and SPAN are somewhat related to the BLOCK and INLINE CSS objects.
Because, I am lucky that the IETM browser do support CSS 1 style sheets, I
used CSS style within the HTML elements as an attribute (i.e. style
attribute). For example when I wanted to render an occurrence or topic
instance as a link I did:

(element (locator)
	(make A
		css-style:  "background-color:teal;color:white;padding:4px"
	)
)

Obviously for each locator object I created a hyperlink with the attribute
listed in css-style (CSS attributes).

(element (basename)
	(make div
		css-style: "margin-left:20px;margin-bottom:1em;font-size:10pt;"
	)
)

this time, the topic name object was translated into a DIV object equivalent
to a paragraph.

To make a story short. I discovered that when I used the "element"
construction rule, usually, I translated the SGML/XML element into only a
few HTML constructs. (even for tables). So, the need for a template, in that
case was less important.

However, when I tried a different way to transform my topic map document
like, for instance with a template based tool such as Balise, ASP, JSP or
XSL, I used mainly, in the case of XSL, elements like "value-of", or
"for-each" . So in that case, I created the desired document template (a cut
and paste from my HTML editor) and just inserted "value-of" and "for-each"
constructs.

When I used more complicated constructs, I had to use construction rules.
But for a quick and dirty rendition (start with a cut and paste) I
discovered that the template with construct like value-of and for-each was
quite useful.

And you, do you have any experience to share?


regards
Didier PH Martin
mailto:martind@xxxxxxxxxxxxx
http://www.netfolder.com


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


Current Thread