Menu

Does xslthl-2.1.3 Work With docbook-xsl-ns-1.79.1?

2017-02-13
2017-02-13
  • LinuxDevice

    LinuxDevice - 2017-02-13

    I've been trying to get xslthl to work with DocBook 5.1 and Saxon (Linux host). DocBook itself comes with this:
    docbook-xsl-ns-1.79.1/tools/lib/saxon.jar
    docbook-xsl-ns-1.79.1/extensions/saxon65.jar

    xslthl-2.1.3 comes with:
    * xslthl-2.1.3/xslthl-2.1.3.jar

    I have a CLASSPATH containing these (full path is used and no error, relative path shown for brevity):
    docbook-xsl-ns-1.79.1/tools/lib/saxon.jar
    docbook-xsl-ns-1.79.1/extensions/saxon65.jar
    * xslthl-2.1.3/xslthl-2.1.3.jar

    The DocBook 5.1 source is validated with xmllint and jing. Creating the fo output for use with fop works without error for this:

    java \
      -Dxslthl.config=${XSLTHL}/highlighters/xslthl-config.xml \
      com.icl.saxon.StyleSheet \
      -o ${OBJ}/${TITLE}_monolithic.fo \
      ${OBJ}/${TITLE}_monolithic.xml \
      ${XSLT}/fo/docbook.xsl \
      use.extensions=1
    

    Note that highlight.source is set to 1. I am able to work with linenumbering, so I can verify at least part configuration to use Saxon is correct (PDF output via fop works as expected). "language" has been tested with "ini" and "bourne", both of which are listed. Under no circumstance does any syntax highlighting ever show up...what might I be missing?

     
  • Jirka Kosek

    Jirka Kosek - 2017-02-14

    Usually problem is that wrong location for xslthl-config.xml is provided. It must URI not just path. So something like file:///...

     
  • LinuxDevice

    LinuxDevice - 2017-02-17

    The config file is specified correctly, but apparently in this version there is a need to add this:
    <xsl:import href="some/path/to/docbook-xsl/fo/highlight.xsl"/>
    ...I'm still trying to figure where to accomplish this.

     

Log in to post a comment.