[Techtalk] xsltproc and DocBook chunking problem

Kathryn Andersen kat_lists at katspace.homelinux.org
Wed Jun 7 12:03:58 EST 2006


I'm having a wierd problem generating HTML from DocBook using the
"chunked" method and xsltproc.
I'm getting errors like this:

     [exec] Writing Intro.html/ for chapter(Intro)
     [exec] I/O error : Is a directory
     [exec] runtime error: file file:///usr/local/docbook/xsl/xhtml/chunker.xsl line 133 element document
     [exec] xsltDocumentElem: unable to save to html/Intro.html/
     [exec] Writing Starting.html/ for chapter(Starting)
     [exec] I/O error : Is a directory
     [exec] runtime error: file file:///usr/local/docbook/xsl/xhtml/chunker.xsl line 133 element document

The only clue I could find by Googling was this:
http://mail.gnome.org/archives/gnome-web-list/2005-November/msg00051.html

So I tried changing the call to xsltproc as per the information there,
but it made no difference.  However, when I *don't* use xsltproc, but
use a different XSLT processor, the HTML files are generated perfectly
okay.

I am running on Tao 4 Linux.

This is the version of xsltproc:

$ xsltproc --version
Using libxml 20616, libxslt 10111 and libexslt 809
xsltproc was compiled against libxml 20614, libxslt 10111 and libexslt 809
libxslt 10111 was compiled against libxml 20614
libexslt 809 was compiled against libxml 20614

I am calling the xsltproc using Ant, here is the ant target:

<target name="html_fast" if="tmp:do.html.fast" depends="prepare_html">
    <exec executable="xsltproc" failonerror="true">
    <arg line="--stringparam generate.toc 'book toc'"/>
    <arg line="--stringparam chunk.section.depth 0"/>
    <arg line="--stringparam chunk.first.sections 0"/>
    <arg line="--stringparam html.stylesheet '${local.docbook.stylesheet.css}'"/>
    <arg line="--stringparam html.ext '${local.docbook.html.ext}/'"/>
    <arg line="--stringparam base.dir '${local.docbook.html.dir}/'"/>
    <arg value="${local.docbook.stylesheet.html}"/>
    <arg value="${local.docbook.input.file}"/>
    </exec>
</target>

I have another ant target, html_slow, which uses a slower Java-based
XSLT processor, and when I use that, the HTML generation works fine.
That is why I am suspecting xsltproc is the culprit.

This is the java-based Ant target:

<target name="html_slow" if="tmp:do.html.slow" depends="prepare_html">
  <java classname="com.icl.saxon.StyleSheet">
    <sysproperty key="javax.xml.parsers.DocumentBuilderFactory"
        value="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
    <sysproperty key="javax.xml.parsers.SAXParserFactory"
        value="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
    <classpath refid="xslt.classpath"/>
    <arg value="${local.docbook.input.file}"/>
    <arg value="${local.docbook.stylesheet.html}"/>
    <arg value="generate.toc=book toc"/>
    <arg value="chunk.section.depth=0"/>
    <arg value="chunk.first.sections=0"/>
    <arg value="html.stylesheet=${local.docbook.stylesheet.css}"/>
    <arg value="html.ext=${local.docbook.html.ext}"/>
    <arg value="base.dir=${local.docbook.html.dir}/"/>
  </java>
</target>

Can anyone give me a clue if there's anything I can do to make it work,
or should I just disable xsltproc processing until a better version of
xsltproc comes out on Tao 4?  (No, I can't change distros, this is 
a machine at my workplace)

Kathryn Andersen
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe


More information about the Techtalk mailing list