Norbert Cartagena wrote:
> 
> This might be a pretty basic question, but I've been looking for a tool
> to turn the XML generated by XXE to HTML and PDF. Any hints? Are there
> any sgml-tools like tools (such as docx2html or something) whihc could
> accomplish this?

Method 1: the XSL way
~~~~~~~~~~~~~~~~~~~~~

You need to install:

* Norman Walsh's DocBook XSL stylesheets
http://sourceforge.net/projects/docbook

* An XSLT processor such as saxon http://sourceforge.net/projects/saxon

* For generating HTML, this is enough. Just use the XSL stylesheet that
transforms DocBook XML to HTML.

If you need to generate PDF, you'll have to use the XSL stylesheet that
transforms DocBook XML to FO (Formatting Objects: an abstract,
standardized, XML based, document formatting language). Then you'll need
a FO processor that transforms FOs to a typesetting language such as TeX
or RTF or to a page description language such as PostScript or PDF.

** fop (Open Source: http://xml.apache.org/fop/ ) transforms FOs to PDF.
** RenderX's XEP (Commercial: http://www.renderx.com/ ) transforms FOs
to PDF or PostScript.
** jfor (Open Source: http://sourceforge.net/projects/jfor/ ) transforms
FOs to RTF.

Our advice: PROS:

* This is the way of the future. It is not a good idea to invest on
DSSSL.

CONS:

* Very tedious to install.
* The generated output is not good looking enough, except when using
RenderX's XEP.
* DocBook is so huge that it is difficult to come up with really
satisfactory XSL stylesheets even when you are an ace like Norman Walsh.

Method 2: the DSSSL way
~~~~~~~~~~~~~~~~~~~~~~~

You need to install:

* Norman Walsh's DocBook DSSSL stylesheets
http://sourceforge.net/projects/docbook

* OpenJade an Open Source implementation of DSSSL based on James Clark's
Jade http://sourceforge.net/projects/openjade/

* OpenSP an Open Source SGML/XML parser based on James Clark's SP
http://sourceforge.net/projects/openjade/ 

* A modern TeX distribution such as http://www.miktex.org/ (TeX for
Windows)

Our advice: PROS:

* More mature than the XSL way. The generated output is generally better
looking than what can be accomplished by the XSL tools.

* Not  too tedious to install on Linux if you have a distribution such
as the SuSE 7.2 which includes all the tools mentioned above.

CONS:

* Picky about the document encoding. If you need accented letters, do
not forget to check the option ISO-8859-1 in the XXE Options dialog box!

* It is not a good idea to invest on DSSSL. XSL is the way of the
future.

* The generated output is not good looking enough. (We have been told
that the
LDP http://www.linuxdoc.org/ DSSSL customized stylesheet, ldp.dsl, gives
a better looking output).

* DocBook is so huge that it is difficult to come up with really
satisfactory DSSSL stylesheets even when you are an ace like Norman
Walsh.

There are probably other methods we don't know about.

This question and its answer will be added to the XXE FAQ.

Reply via email to