docbook-apps

  • 1.  Colored listings

    Posted 04-14-2010 12:34
    Hello,

    Big thanks for all, yours help was helpfull. As result, I found next
    solution:

    --- my-pdf.xsl ---

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo ="http://www.w3.org/1999/XSL/Format"
    xmlns:db5="http://docbook.org/ns/docbook"
    xmlns:xslthl="http://xslthl.sf.net"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:latex="http://forge.scilab.org/p/jlatexmath"
    xmlns:jlm="http://forge.scilab.org/p/jlatexmath"
    exclude-result-prefixes="db5 xslthl xlink xsl fo latex jlm"
    version="1.0">



    <xsl:import href="../docbook-xsl/fo/docbook.xsl"/>
    <xsl:import href="../docbook-xsl/highlighting/common.xsl" />
    <xsl:import href="../docbook-xsl/fo/highlight.xsl"/>



    </xsl:stylesheet>
    ------

    Run saxon with commands like this:

    set XSL_TEMPLATE_FILE_NAME=%~dp0\my-pdf.xsl

    java -cp "%DOC_TOOLS_PATH%\syntax-hl\xslthl-2.0.1.jar;%DOC_TOOLS_PATH%\saxon\saxon6-5-5\saxon.jar"^
    com.icl.saxon.StyleSheet^
    -o %~dpn2.fo %1 %XSL_TEMPLATE_FILE_NAME%^
    highlight.xslthl.config="file:///%DOC_TOOLS_PATH%/docbook-xsl/highlighting/xslthl-config.xml" ^
    callout.graphics.path="file:///%DOC_TOOLS_PATH%/docbook-xsl/images/callouts/"^
    use.extensions=1^
    textinsert.extension=1^
    highlight.source=1


    There is the quiestion: when I try to set up parameter
    'highlight.xslthl.config' in xsl file, like shown above, I have got an
    error:

    Error at xsl:param on line 22 of file:/F:/work/docbook-tools/bin/my-pdf.xsl:
    Invalid QName: file:
    Transformation failed: Failed to compile stylesheet. 1 error detected.

    So I set up this parameter trough the command line and it work.
    Anybody can tell me, what I do wrong in this case?




  • 2.  Re: [docbook-apps] Colored listings

    Posted 04-14-2010 15:45
    ????????? ???????? wrote:

    >

    <xsl:param name="highlight.xslthl.config"
    select="'file:/F:/work/docbook-tools/docbook-xsl/highlighting/xslthl-config.xml'"/>


    <xsl:param
    name="highlight.xslthl.config">file:/F:/work/docbook-tools/docbook-xsl/highlighting/xslthl-config.xml</xsl:param>


    > There is the quiestion: when I try to set up parameter
    > 'highlight.xslthl.config' in xsl file, like shown above, I have got an
    > error:
    >
    > Error at xsl:param on line 22 of file:/F:/work/docbook-tools/bin/my-pdf.xsl:
    > Invalid QName: file:
    > Transformation failed: Failed to compile stylesheet. 1 error detected.

    You have to put value inside '' to make it string constant not path
    selection as shown above.

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
    ------------------------------------------------------------------
    Professional XML consulting and training services
    DocBook customization, custom XSLT/XSL-FO document processing
    ------------------------------------------------------------------
    OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
    ------------------------------------------------------------------