>>>>> Steinar Bang <[EMAIL PROTECTED]>:

>>>>> Steinar Bang <[EMAIL PROTECTED]>:
>> Platform: Intel PIII, RedHat 7.2, JDK 1.3.1, Saxon 6.5-1mdk (from the
>> Mandrake Cooker distribution), DocBook 4.1.2, DocBook-XSL 1.48

>> (example files attached at the end)

> [snip!]
>> When I do this, I get error messages both when generating HTML and FO:
>> cd /home/sba/tmp/docinclude/
>> make -k 
>> saxonbatch -o testdoc.html testdoc.xml local-html.xsl
>> No insertfile extension available.
>> Processing terminated by xsl:message at line 264
>> make: *** [testdoc.html] Error 1
> [snip!]

> I think I've found the answer
>       <http://sources.redhat.com/ml/docbook-apps/2001-q4/msg00171.html>

A more correct reference is the documentation:
        <http://docbook.sourceforge.net/projects/xsl/doc/extensions.html>

> I need to put the appropriate .jar file from the extensions/
> directory of the DocBook-XSL distribution, into the CLASSPATH before
> running saxon.

> Ie. 
> %.html: %.xml
>       export CLASSPATH="/path/to/docbook-xsl/extensions/saxon65.jar";
>       saxonbatch -o $@ $< $(HTMLSTYLE)

This wasn't quite right.  The saxonbatch script overrides CLASSPATH,
without caring about its earlier setting.  Giving a -cp argument to
saxonbatch put it after the class name, where it didn't work.  So I
had to run the saxon class directely with an appropriate classpath:

SAXON_CP=/usr/share/java/classes/saxon/saxon.jar
SAXONEXT_CP=/var/www/html/xml/styles/docbook-xsl-1.48/extensions/saxon65.jar
SAXON=java -cp $(SAXONEXT_CP):$(SAXON_CP) com.icl.saxon.StyleSheet

# XML -> HTML
%.html: %.xml
        $(SAXON) -o $@ $< $(HTMLSTYLE)

"SAXONEXT_CP" is wherever you have the appropriate .jar file in an
installed DocBook-XSL distribution.


Reply via email to