This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: How to make my own stylesheets?
- From: "Michael D. Crawford" <crawford at goingware dot com>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Sat, 05 Jan 2002 21:15:38 -0500
- Subject: Re: DOCBOOK-APPS: How to make my own stylesheets?
- Organization: GoingWare Inc. - Expert Software Development and Consulting
I posted that I want to use custom CSS stylesheets when I publish my
docbook into HTML, and Bob Stayton replied:
---
You can still use CSS to do what you want.
See this FAQ:
http://www.dpawson.co.uk/docbook/styling/stygeneral.html
1. How to use a CSS stylesheet with docbook
----
I can see how this should work, but I don't seem to be able to get it to
do what I want. What I did was create a custom stylesheet as found in
the DSSSL doc I found on debian and try to tell it to use my stylesheet
"mystyle.css".
But I don't know enough DSSSL to have the HTML to link to my CSS
stylesheet included in the output HTML files.
On the abovementioned web page, it says:
---
To connect it with your files, you set the 'html.stylesheet' parameter
in either DSSSL or XSL to the name of your stylesheet file. You do that
in a stylesheet customization, which is described inthe faq. That
parameter causes an HTML element to be inserted into each generated HTML
file that associates your css stylesheet with that HTML file.
----
I use jade -d mystyle.dsl#html to tell jade to use my stylesheet, and it
seems to use my stylesheet because when I had the pathname wrong it
dumped plain text to standard output, and when I got it right it made
the HTML files.
Here is my DSSSL stylesheet, mystyle.dsl. Likely my error is obvious to
the initiated:
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY % html "IGNORE">
<![%html;[
<!ENTITY % print "IGNORE">
<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML
Stylesheet//EN" CDATA dsssl>
]]> <!ENTITY % print "INCLUDE">
<![%print;[
<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print
Stylesheet//EN" CDATA dsssl>
]]>
]>
<style-sheet>
<style-specification id="print" use="docbook">
<style-specification-body>
;; customize the print stylesheet
</style-specification-body>
</style-specification>
<style-specification id="html" use="docbook">
<style-specification-body>
;; customize the HTML stylesheet
(element html.stylesheet "mystyle.css")
;; I have also tried
;; (define html.stylesheet "mystyle.css")
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="docbook.dsl">
</style-sheet>
Thanks,
Mike Crawford
crawford@goingware.com
http://www.goingware.com/