#1126 html.stylesheet parameter and ePub

output: ePub
XSL (1066)

I'm using release 1.76.0.

When using:


to generate XHTML for ePub, the parameter:


does not appear to work.

I've had to do the following:

<xsl:template name="user.head.content">
<style type="text/css">
@import "xhtml_style.css"

which does work.

Please fix for 1.76.1



  • Keith Fahlgren

    Keith Fahlgren - 2010-09-16

    I'm not able to reproduce:

    $ xsltproc --stringparam html.stylesheet template.css docbook-xsl-1.76.0/epub/docbook.xsl tiny.xml
    Writing OEBPS/index.html for section(a)
    Writing OEBPS/toc.ncx
    Writing OEBPS/content.opf
    Writing META-INF/container.xml
    $ xmllint --format OEBPS/index.html | grep css
    <link rel="stylesheet" type="text/css" href="template.css"/>

    Would you please provide more details about your environment?

  • Keith Fahlgren

    Keith Fahlgren - 2010-09-16
    • labels: 1168228 --> XSL
    • priority: 5 --> 4
  • Oliver K. Smith

    Oliver K. Smith - 2010-09-16

    You are correct.

    It works from the command line using:

    xsltproc --stringparam html.stylesheet template.css

    It wasn't working for me when I used a customization layer and did the following:

    <xsl:param name="html.stylesheet" select="template.css"/>

    It does work with this:

    <xsl:param name="html.stylesheet" select="'template.css'"/>

    It would appear that the extra single quotes are necessary. (You might need to look carefully at the above with a fixed width font.)

    You can consider this case closed. Sorry to "bug" you.

    I made this mistake because the examples in

    Chapter 12. HTML customizations


    DocBook XSL: The Complete Guide, Fourth Edition.

    do not suggest the need for the single quotes.

    However, the example in

    Chapter 9. Customization methods

    make it clear the extra single quotes are needed.

    Thanks for all your efforts.

  • Keith Fahlgren

    Keith Fahlgren - 2010-09-16

    Having been bitten by this quoting issue so many times, I now try to use this pattern when defining string-based (rather than numeric or XPath-based) paramters:

    <xsl:param name="html.stylesheet">template.css</xsl:param>

  • Keith Fahlgren

    Keith Fahlgren - 2010-09-16
    • status: open --> closed-invalid
  • Oliver K. Smith

    Oliver K. Smith - 2010-09-16

    An excellent idea.



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks