docbook-apps

  • 1.  Saxon and linenumbering

    Posted 05-01-2007 12:54
    Hi,

    I have done searches and already read
    http://www.oasis-open.org/archives/docbook-apps/200406/msg00101.html.

    However in my case linenumbering does not work, despite saxon
    extension. I know saxon extension works because I use it to add
    callouts and callouts need it. Here is what is working for callouts :

    java -jar ~/local/lib/xxe-std-3_5_2/bin/saxon.jar
    programlistingco.xml ~/local/lib/docbook-xsl-1.72.0/xhtml/docbook.xsl
    use.extensions=1 callouts.extension=1 >programlistingco.html

    Saxon.jar is 6.5.5 version

    However if I try :

    java ~/local/lib/xxe-std-3_5_2/bin/saxon.jar linenumbering.xml
    ~/local/lib/docbook-xsl-1.72.0/xhtml/docbook.xsl use.extensions=1
    linenumbering.extension=1 >linenumbering.html

    I get :

    No numberLines function available.
    Processing terminated by xsl:message at line 283

    saxon extension used in CLASSPATH is :

    ~/local/lib/docbook-xsl-1.72.0/extensions/saxon65.jar

    Thierry B.



  • 2.  Re: [docbook-apps] Saxon and linenumbering

    Posted 05-01-2007 14:36
    On 5/1/07, Thierry Bothorel <thierry.bothorel@gmail.com> wrote:
    > java ~/local/lib/xxe-std-3_5_2/bin/saxon.jar linenumbering.xml
    > ~/local/lib/docbook-xsl-1.72.0/xhtml/docbook.xsl use.extensions=1
    > linenumbering.extension=1 >linenumbering.html
    >
    > I get :
    >
    > No numberLines function available.
    > Processing terminated by xsl:message at line 283
    >
    > saxon extension used in CLASSPATH is :
    >
    > ~/local/lib/docbook-xsl-1.72.0/extensions/saxon65.jar

    Hi,

    Using the -jar flag causes the java command to ignore the current
    CLASSPATH. What happens if you start Saxon as
    java com.icl.saxon.StyleSheet ...

    ?


    HTH,
    Keith



  • 3.  Re: [docbook-apps] Saxon and linenumbering

    Posted 05-01-2007 15:43
    2007/5/1, Keith Fahlgren <abdelazer@gmail.com>:
    > On 5/1/07, Thierry Bothorel <thierry.bothorel@gmail.com> wrote:
    > > java ~/local/lib/xxe-std-3_5_2/bin/saxon.jar linenumbering.xml
    > > ~/local/lib/docbook-xsl-1.72.0/xhtml/docbook.xsl use.extensions=1
    > > linenumbering.extension=1 >linenumbering.html
    > >
    > > I get :
    > >
    > > No numberLines function available.
    > > Processing terminated by xsl:message at line 283
    > >
    > > saxon extension used in CLASSPATH is :
    > >
    > > ~/local/lib/docbook-xsl-1.72.0/extensions/saxon65.jar
    >
    > Hi,
    >
    > Using the -jar flag causes the java command to ignore the current
    > CLASSPATH. What happens if you start Saxon as
    > java com.icl.saxon.StyleSheet ...
    >
    > ?

    Uhm, here is the otput (never used like that) :

    java com.icl.saxon.StyleSheet linenumbering.xml
    ~/local/lib/docbook-xsl-1.72.0/xhtml/docbook.xsl use.extensions=1
    linenumbering.extension=1 >linenumbering.html
    Exception in thread "main" java.lang.NoClassDefFoundError:
    com/icl/saxon/StyleSheet

    For the CLASSPATH issue with -jar, I already tried :

    java -classpath
    ~/local/lib/docbook-xsl-1.72.0/extensions/saxon65.jar:~/local/lib/xxe-std-3_5_2/bin/saxon.jar:
    -jar ~/local/lib/xxe-std-3_5_2/bin/saxon.jar linenumbering.xml
    ~/local/lib/docbook-xsl-1.72.0/xhtml/docbook.xsl use.extensions=1
    linenumbering.extension=1 >linenumbering.html

    with the same result



  • 4.  RE: [docbook-apps] Saxon and linenumbering

    Posted 05-01-2007 17:42
    >


  • 5.  Re: [docbook-apps] Saxon and linenumbering

    Posted 05-02-2007 21:43
    2007/5/1, Mauritz Jeanson <mj@johanneberg.com>:
    >
    >
    > Don't use the -jar option. Either set the CLASSPATH environment variable (to
    > contain both saxon.jar and saxon65.jar), or use the -classpath option. In
    > both cases, supply the full name of the main class, as in your first command
    > line example above.
    >
    > See also http://saxon.sourceforge.net/saxon6.5.5/index.html#Installation
    >

    Thanks, it works now with this script (copied from another post).One
    thing I had hard time to find is the presence of xslthl.jar in
    SAXON_STUFF. It has nothing to do with linenumbering but I did not
    think it could interfere if it was not used. I have left this one from
    my highlighting tests (unsuccessful for the moment).

    #!/bin/sh
    OLD_CP=$CLASSPATH
    export CLASSPATH=""

    HOME_DIR="/home/thierrybo"
    MON_DOCBOOK_DIR="${HOME_DIR}/Mes.documents/Informatique/Docbook/Tests"
    SAXON="${HOME_DIR}/local/lib/xxe-std-3_5_2/bin/saxon.jar"

    INVOKE="com.icl.saxon.StyleSheet"
    #INVOKE="-jar ${SAXON}"

    SAXON_STUFF="${HOME_DIR}/local/lib/xxe-std-3_5_2/bin/saxon-jdom.jar:${HOME_DIR}/local/lib/xxe-std-3_5_2/bin/saxon-xml-apis.jar:${HOME_DIR}/local/lib/docbook-xsl-1.72.0/extensions/saxon65.jar"
    XSLTHL_JAR="${HOME_DIR}/local/lib/docbook-xsl-1.72.0/highlighting/xslthl.jar"

    # If XSLTHL.JAR is in CP6, raise "java.lang.UnsupportedClassVersionError".
    #CP6="$XSLTHL_JAR:$SAXON:$SAXON_STUFF"
    CP6="$SAXON:$SAXON_STUFF"

    XSLTHL_CONFIG="file://${HOME_DIR}/local/lib/docbook-xsl-1.72.0/highlighting/xslthl-config.xml"
    STYLESHEETS_PATH="${HOME_DIR}/local/lib/docbook-xsl-1.72.0"
    STYLESHEET_ONE_PAGE="docbook.xsl"
    XML="linenumbering.xml"
    OUT="linenumbering"

    java -classpath $CP6 -Xmx1024m $INVOKE -o "${OUT}".html $XML
    "${STYLESHEETS_PATH}"/xhtml/"${STYLESHEET_ONE_PAGE}" use.extensions=1
    linenumbering.extension=1 linenumbering.everyNth=1
    linenumbering.separator=' >' linenumbering.width=4

    export CLASSPATH=$OLD_CP