Generate CSS to display FO on a web browser

Subject: Generate CSS to display FO on a web browser
From: David Allouche <david@xxxxxxxxxxxxxxxx>
Date: Fri, 28 Jul 2000 23:31:27 -0200 (GMT+2)
Complete title:
---------------

Do you know of any tool that can generate a CSS stylesheet usable to
display a given XML instance containing Formatting Objects in a XML-aware
browser.

Background:
-----------

I'm working on a way to convert Dynatext (a SGML browser) stylesheets to
anything that can be used with XML technology.  I am precisely thinking of
CSS or FO (for the styles) plus XSLT (for all the logic), in order to
produce XML browsable using Mozilla or InternetExplorer.

The stylesheet is a SGML document defining styles that can be mapped quite
nicely to XSLT templates.  The logic language can be used anywhere in the
stylesheet and use a plain-text expression syntax I'm still not thinking
of how to digest it.

There several problem with using CSS2:

- CSS2 and XSLT overlap on some things, mainly text generation, and simple
attribute based logic.  This can be a cause of many programming
dilemma.  Even if the line between logic-to-do-with-CSS and
logic-to-do-with-XSLT is pretty obvious when writing a stylesheet by hand,
it requires some common sense.  Something most computers lack :-)

- CSS plus XSLT leave many holes that are not easily fixed in a way that
can be both human readable and easily automatable.  I think of conditional
styling based on XPath-like logic, something that is done with the
expression syntax of Dynatext.

- CSS and XSLT use a different syntaxes, with add unneeded extra
complexity to the problem.

Obviously CSS is not the good answer.  Using FO instead of CSS solves all
those problems, and make the conversion much simpler.  But there is still
no such thing as a FO-aware browser with hypertext (just <html:a> is
enough) capability.

Then idea:
----------

Since CSS is so much like FO, there must be a way to generate a CSS
stylesheet to display (simple) FOs...  Actually that is not that
difficult, and could be hacked in one weekend by anyone fluent in SAX and
DOM voodoo (that is not me).

I've alread written down a little spec for this kind of tool, and I could
start working on it.  Even though I have never heard of it and couldn't
find when looking for it, this so obviously a Good Idea (tm) that I can't
believe it has not yet been done.

Start again:
------------

So is that already done ?

                             -- David --



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread