1<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
2<!ENTITY % output.html  "IGNORE">
3<!ENTITY % output.print "IGNORE">
4<![ %output.html; [
5<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
6]]>
7<![ %output.print; [
8<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>
9
10]]>
11]>
12
13<style-sheet>
14  <style-specification use="docbook">
15    <style-specification-body>
16      <!-- HTML only .................................................... -->
17      <![ %output.html; [
18        <!-- Configure the stylesheet using documented variables -->
19        (define %gentext-nav-use-tables%
20          ;; Use tables to build the navigation headers and footers?
21          #t)
22        (define %html-ext%
23          ;; Default extension for HTML output files
24          ".htm")
25        (define %shade-verbatim%
26          ;; Should verbatim environments be shaded?
27          #f)
28        (define %use-id-as-filename%
29          ;; Use ID attributes as name for component HTML files?
30          #t)
31        (define %root-filename%
32          ;; Name for the root HTML document
33          "index")
34        (define html-manifest
35          ;; Write a manifest?
36          #f)
37        (element segmentedlist
38          (make element gi: "TABLE"
39            (process-children)))
40        (element seglistitem
41          (make element gi: "TR"
42            (process-children)))
43        (element seg
44          (make element gi: "TD"
45                attributes: '(("VALIGN" "TOP"))
46            (process-children)))
47
48        <!-- The next two definitions control the appearance of an
49             e-mail footer at the bottom of each page. -->
50
51        <!-- This is the text to display at the bottom of each page.
52             Defaults to nothing.  The individual stylesheets should
53             redefine this as necessary. -->
54        (define ($email-footer$)
55          (empty-sosofo))
56
57        <!-- This code handles displaying $email-footer$ at the bottom
58             of each page.
59
60             If "nochunks" is turned on then we make sure that an <hr>
61             is shown first.
62
63             Then create a centered paragraph ("<p>"), and reduce the font
64             size ("<small>").  Then run $email-footer$, which should
65             create the text and links as necessary. -->
66	(define ($html-body-end$)
67          (if (equal? $email-footer$ (normalize ""))
68            (empty-sosofo)
69            (make sequence
70              (if nochunks
71                  (make empty-element gi: "hr")
72                  (empty-sosofo))
73                (make element gi: "p"
74                      attributes: (list (list "align" "center"))
75                  (make element gi: "small"
76                    ($email-footer$))))))
77      ]]>
78
79      <!-- Print only ................................................... --> 
80      <![ %output.print; [
81
82      ]]>
83
84      <!-- Both sets of stylesheets ..................................... -->
85      (define %section-autolabel% #t)
86      (define %may-format-variablelist-as-table% #f)
87      (define %indent-programlisting-lines% "    ")
88      (define %indent-screen-lines% "    ")
89      (define (toc-depth nd)
90        (if (string=? (gi nd) (normalize "book"))
91          7
92          1))
93
94
95      (define (article-titlepage-recto-elements)
96        (list (normalize "title")
97              (normalize "subtitle")
98              (normalize "corpauthor")
99              (normalize "authorgroup")
100              (normalize "author")
101              (normalize "releaseinfo")
102              (normalize "copyright")
103              (normalize "pubdate")
104              (normalize "revhistory")
105              (normalize "legalnotice")
106              (normalize "abstract")))
107      (element sgmltag ($mono-seq$
108          (make sequence (literal "<") (process-children) (literal ">"))))
109      <!-- John Fieber's 'instant' translation specification had 
110           '<command>' rendered in a mono-space font, and '<application>'
111           rendered in bold. 
112           Norm's stylesheet doesn't do this (although '<command>' is 
113           rendered in bold).
114           Configure the stylesheet to behave more like John's. -->
115      (element command ($mono-seq$))
116      (element application ($bold-seq$))
117      <!-- Warnings and cautions are put in boxed tables to make them stand
118           out. The same effect can be better achieved using CSS or similar,
119           so have them treated the same as <important>, <note>, and <tip>
120      -->
121      (element warning ($admonition$))
122      (element (warning title) (empty-sosofo))
123      (element (warning para) ($admonpara$))
124      (element (warning simpara) ($admonpara$))
125      (element caution ($admonition$))
126      (element (caution title) (empty-sosofo))
127      (element (caution para) ($admonpara$))
128      (element (caution simpara) ($admonpara$))
129
130      (define en-warning-label-title-sep ": ")
131      (define en-caution-label-title-sep ": ")
132
133      <!-- Tell the stylesheet about our local customisations -->
134      
135      (element hostid ($mono-seq$))
136      (element username ($mono-seq$))
137      (element devicename ($mono-seq$))
138      (element maketarget ($mono-seq$))
139      (element makevar ($mono-seq$))
140      (define (qanda-defaultlabel)
141        (normalize "qanda"))
142      <![ %output.html [
143      (element question
144        (let* ((chlist   (children (current-node)))
145               (firstch  (node-list-first chlist))
146               (restch   (node-list-rest chlist)))
147               (make element gi: "DIV"
148                     attributes: (list (list "CLASS" (gi)))
149                     (make element gi: "P" 
150                           (make element gi: "BIG"
151                                 (make element gi: "A"
152                                       attributes: (list
153                                                   (list "NAME" (element-id)))
154                                       (empty-sosofo))
155                                 (make element gi: "B"
156                                       (literal (question-answer-label
157                                                (current-node)) " ")
158                                       (process-node-list (children firstch)))))
159                    (process-node-list restch))))
160      ]]>
161
162    </style-specification-body>
163  </style-specification>
164  <external-specification id="docbook" document="docbook.dsl">
165</style-sheet>
166