On Dec 4, 2005, at 13:35, Simon Pepping wrote:

On Fri, Dec 02, 2005 at 01:58:39PM +0100, Jeremias Maerki wrote:
<snip />
Sounds more like a problem in either the stylesheet itself or in Xalan which FOP calls for doing XSLT. Maybe I should finally install DocBook
on my machine. :-)

It is indeed not really a FOP issue.

The docbook stylesheets seem to be a pain for most XSLT
processors. Restricting myself to Java XSLT processors, I
have only been successful with Saxon6. Xalan and the Xalan processor
built into Java 5 cannot compile the docbook/fo stylesheets.

This can be achieved by putting saxon.jar first in the classpath.

FYI other options include:
- modifying your %JAVA_HOME%/lib/jaxp.properties file (or creating one if it doesn't exist)
- supplying the property via java's '-D' command-line option

jaxp.properties would look something like:
javax.xml.transformer.TransformerFactory=com.icl.saxon.TransformerFactor yImpl

(analogous for 'java -D...')

The first one has the advantage that it is completely independent of our FOP shell scripts, but it affects all Java Apps, so is really only useful when the user wants to use Saxon everywhere instead of Xalan (the default).

The second one would still require a modification to the shell script, maybe in the form of an optional parameter you can pass to the script. If the parameter is present, the java command-line at the bottom of the script can be made to take into account the override for that particular system property. (So, this could turn out to be beneficial in other areas as well, where the user needs to override sysprops... Could this solve the issue of using catalogs?)

How about allowing:

fop -sysprop ... -fo ... -pdf ...

The -sysprop switch is caught by the shell script, and incorporated into the java command-line. (Using '-D' here would create confusion with FOP's own '-d' switch, unless we were to allow only the slightly more verbose '-debug')

Just a thought.

Cheers,

Andreas

Reply via email to