[dssslist] Deriving stylesheet from derived stylesheet

Subject: [dssslist] Deriving stylesheet from derived stylesheet
From: Srdjan Sobajic <ssobajic@xxxxxxxxx>
Date: Tue, 1 Mar 2005 20:04:22 -0800
Hello,

I hope that this question is appropriate for this forum (I think it's
truly a DSSSL question and not a tools issue...)

I am trying to derive a stylesheet from a derived stylesheet. In
particular, the derived stylesheet was constructed based on the method
described in http://docbook.sourceforge.net/release/dsssl/current/doc/custom.html
-- "A Single Stylesheet for Both Print and HTML". (In particular, this
is the stylesheet "docbook-utils.dsl" from the
docbook-utils-0.6.12-5.rpm (Red Hat 9).)

In my own stylesheet, I also try to follow the pattern as indicated in
the DSSSL documentation, with something like:

<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY % html "IGNORE">
<![%html;[
<!ENTITY % print "IGNORE">
<!ENTITY docbook-utils.dsl SYSTEM "/path/to/docbook-utils.dsl" CDATA dsssl>
]]>
<!ENTITY % print "INCLUDE">
<![%print;[
<!ENTITY docbook-utils.dsl SYSTEM "/path/to/docbook-utils.dsl" CDATA dsssl>
]]>
]>
<style-sheet>
<style-specification id="print" use="dbu">
<style-specification-body> 

;; customize the print stylesheet

</style-specification-body>
</style-specification>
<style-specification id="html" use="dbu">
<style-specification-body> 

;; customize the html stylesheet

</style-specification-body>
</style-specification>
<external-specification id="dbu" document="docbook-utils.dsl">
</style-sheet>

However, using this style sheet as:
db2html -d mystyle.dsl mybook.sgml produces errors as shown at the bottom.

Playing with the tools, I have found that db2html's -d argument
expects syntax of the form stylesheet_filename#(html|print). The
errors I get when running the command above are identical with the
errors produced with db2html -d **docbook-utils.dsl** mybook.sgml.

However, invoking db2html -d docbook-utils.dsl#html mybook.sgml works
fine.  (Except it doesn't use my customizations).
Unfortunately, trying db2html -d style.dsl#html doesn't work. (in the
same way as without #html).


I have found that if I modify the docbook-utils.dsl file to include
only the stylesheet for HTML (removing the 2-in-1 HTML/print
capability) and making my own stylesheet also HTML only, works fine.


Is it possible to derive the stylesheets in such a way to get both
HTML and Print capability in the same stylesheet?

I have a feeling that it is a problem of syntax...

Any help would be greatly appreciated.

Thank you,

Srdjan

---------------------------
Error seen when running db2html with stylesheet as above:

output is XXXX
Using catalogs: /etc/sgml/sgml-docbook-3.1-1.0-17.cat
Using stylesheet: /home/z/doc/style.dsl
Working on: /home/z/doc/XXXX.sgml
jade:/home/z/doc/docbook-utils.dsl:419:19:E: reference to undefined
variable "%admon-font-family%"
jade:/home/z/doc/docbook-utils.dsl:413:7:E: reference to undefined
variable "HSIZE"
jade:/home/z/doc/docbook-utils.dsl:475:2:E: too many arguments for function
jade:/usr/share/sgml/docbook/dsssl-stylesheets-1.76/html/dbhtml.dsl:326:17:E:
invalid value for "attributes" characteristic (repeated many times)

Current Thread