root/branches/new-xsl/nochunks.xsl

Revision 8227, 10.2 kB (checked in by manuel, 1 year ago)

Forgotten to commit this fix.

  • Property svn:keywords set to Author Date Revision Id
Line 
1 <?xml version='1.0' encoding='ISO-8859-1'?>
2
3 <!--
4 $LastChangedBy$
5 $Date$
6 -->
7
8 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9                 xmlns="http://www.w3.org/1999/xhtml"
10                 version="1.0">
11
12    <!-- Stylesheet for non-chunked XHTML output
13         Replaces {docbook-xsl}/xhtml/profile-docbook.xsl -->
14
15     <!-- Upstream XHTML templates -->
16   <xsl:import href="docbook-xsl-snapshot/xhtml/docbook.xsl"/>
17
18     <!-- Fix encoding issues with default UTF-8 output of the xhtml stylesheet -->
19   <xsl:output method="html" encoding="ISO-8859-1" indent="no" />
20
21    <!-- Including our others customized templates -->
22   <xsl:include href="common.xsl"/>
23   <xsl:include href="xhtml/lfs-index.xsl"/>
24   <xsl:include href="xhtml/lfs-mixed.xsl"/>
25   <xsl:include href="xhtml/lfs-sections.xsl"/>
26   <xsl:include href="xhtml/lfs-toc.xsl"/>
27   <xsl:include href="xhtml/lfs-xref.xsl"/>
28
29     <!-- Control generation of ToCs and LoTs -->
30   <xsl:param name="generate.toc">
31     book      toc,title
32     preface   nop
33     part      nop
34     chapter   nop
35     appendix  nop
36     sect1     nop
37     sect2     nop
38     sect3     nop
39     sect4     nop
40     sect5     nop
41     section   nop
42   </xsl:param>
43
44     <!-- How deep should recursive sections appear in the TOC? -->
45   <xsl:param name="toc.section.depth">1</xsl:param>
46
47     <!-- How maximaly deep should be each TOC? -->
48   <xsl:param name="toc.max.depth">3</xsl:param>
49
50     <!-- Dropping some unwanted style attributes -->
51   <xsl:param name="ulink.target" select="''"></xsl:param>
52   <xsl:param name="css.decoration" select="0"></xsl:param>
53
54     <!-- Don't use graphics in admonitions -->
55   <xsl:param name="admon.graphics" select="0"/>
56
57     <!-- Changing the admonitions output tagging:
58            Removed $admon.style support
59            Hardcoded $admon.textlabel feature -->
60     <!-- The original template is in {docbook-xsl}/xhtml/admon.xsl -->
61   <xsl:template name="nongraphical.admonition">
62     <div class="admon {name(.)}">
63       <h3>
64         <xsl:apply-templates select="." mode="object.title.markup"/>
65       </h3>
66       <xsl:apply-templates/>
67     </div>
68   </xsl:template>
69
70     <!-- sect2.titlepage:
71            Removed a lot of unneeded code.
72            Skip empty titles.
73            No label in preface (actualy, skip the hardcoded dot). -->
74     <!-- The original template is in {docbook-xsl}/xhtml/titlepage.templates.xsl -->
75   <xsl:template name="sect2.titlepage">
76     <xsl:choose>
77       <xsl:when test="string-length(title) = 0"/>
78       <xsl:otherwise>
79         <h3 class="{name(.)}">
80           <xsl:if test="@id">
81             <a id="{@id}" name="{@id}"/>
82           </xsl:if>
83           <xsl:if test="not(ancestor::preface) and $section.autolabel != 0">
84             <xsl:apply-templates select="." mode="label.markup"/>
85             <xsl:text>. </xsl:text>
86           </xsl:if>
87           <xsl:value-of select="title"/>
88         </h3>
89       </xsl:otherwise>
90     </xsl:choose>
91   </xsl:template>
92
93     <!-- The CSS Stylesheet:
94            Note: there is some diferences with lfs.css code releated
95                  to h* values, admonitions and no navigational code. -->
96     <!-- The original template is in {docbook-xsl}/xhtml/docbook.xsl -->
97   <xsl:template name='user.head.content'>
98     <style type="text/css">
99       <xsl:text>
100 /* Global settings */
101 body {
102   font-family: verdana, tahoma, helvetica, arial, sans-serif;
103   text-align: left;
104   background: #fff;
105   color: #222;
106   margin: 1em;
107   padding: 0;
108   font-size: 1em;
109   line-height: 1.2em
110 }
111
112
113 /* Links */
114 a:link { color: #22b; }
115 a.ulink:link { font-weight: bold; color: #55f; }
116 a:visited { color: #7e4988 ! important; }
117 a:hover, a:focus { color: #d30e08 ! important; }
118 a:active { color: #6b77b1 ! important;}
119
120
121 /* Book titlepage */
122 .book {
123   margin: 0px auto;
124   padding: 0 1em;
125 }
126
127 .book h1, .book .authorgroup, .book .copyright, .book .legalnotice .revhistory {
128   background: #f5f6f7;
129   margin: 0px auto;
130   padding: .1em 1em;
131 }
132
133 .book hr {
134   background: #dbddec;
135   height: .3em;
136   border: 0px;
137   margin: 0;
138   padding: 0;
139 }
140
141 div.dedication {
142   padding-left: 1em;
143 }
144
145
146 /* Sections */
147 div.sect1, div.appendix {
148   padding-left: .3em;
149 }
150
151 .package, .kernel, .installation, .commands, .testing, .configuration, .content {
152   padding: 0 .5em .2em 0;
153   margin: 0;
154 }
155
156 .lfs .package {
157   background: #f5f6f7;
158   border-bottom: 0.2em solid #dbddec;
159   padding-top: .1em;
160   margin-top: 0;
161 }
162
163 .lfs .configuration {
164   background:   #fefefe;
165   border-top: 0.2em solid #dbddec;
166 }
167
168 .lfs .content {
169   background: #f5f6f7;
170   border-top: 0.2em solid #dbddec;
171   border-bottom: 0.2em solid #dbddec;
172   padding-bottom: .1em;
173   margin-bottom: 0;
174 }
175
176
177 /* Headers */
178 h1, h2, h3, h4, h5, h6, b, .strong {
179   color: #000;
180   font-weight: bold;
181   line-height: 1em;
182 }
183
184 h1 {
185   font-size: 173%;
186   text-align: center;
187 }
188
189 .book h1 {
190   margin: 0;
191   padding: 0.4em;
192 }
193
194 h1.title sup {
195   font-size: small;
196 }
197
198 h2 {
199   font-size: 144%;
200 }
201
202 .preface h2, .part h1, .chapter h2, .appendix h2, .index h1, .sect1 h2 {
203   background: #f5f6f7;
204   border-top: .2em solid #dbddec;
205   border-bottom: .2em solid #dbddec;
206   margin-bottom: 1em;
207   margin-top: 1em;
208   padding: .4em;
209   text-align: center;
210 }
211
212 .sect1 h2, .appendix h2 {
213   margin-left: -.2em;
214 }
215
216 .wrap h2 {
217   background: #f5f6f7;
218   border-bottom: 0;
219   margin-top: 1em;
220   margin-bottom: 0;
221   padding-top: .4em;
222 }
223
224 .book h2.subtitle {
225   text-align: center;
226   background: #dbddec;
227   margin: 0;
228   padding: 0.2em;
229 }
230
231 h3 {
232   font-size: 120%;
233 }
234
235 .appendix h3 {
236   font-size: 133%;
237   margin-top: .8em;
238   margin-bottom: 0.2em;
239 }
240
241 h4 {
242   font-size: 110%;
243 }
244
245 .package h4, h5, h6 {
246   font-size: 100%;
247   font-style: italic;
248 }
249
250
251 /* TOC */
252 div.toc ul, div.index ul, div.navheader ul, div.navfooter ul {
253   list-style: none;
254 }
255
256 div.toc {
257   padding-left: 1em;
258 }
259
260 li.preface, .part li.appendix {
261   margin-left: 1em;
262 }
263
264 div.toc h3 {
265   margin: 1em 0 .3em 0;
266 }
267
268 li.appendix h3, li.glossary h3, li.index h3 {
269   margin: .5em
270 }
271
272 div.toc h4 {
273   margin: .6em 0 .2em 0;
274 }
275
276 li.chapter h4 a {
277   display: block;
278   margin-bottom: .4em
279 }
280
281 .dummy {
282   display: block;
283   font-weight: bold;
284   font-size: 110%;
285   margin: .6em 0 .2em 0;
286 }
287
288
289 /* Index */
290 .item {
291     float: left;
292     margin-right: 1em
293 }
294
295 .secitem {
296     font-weight: normal;
297     float: left;
298     margin-right: 1em
299 }
300
301 .indexref {
302     display: block;
303 }
304
305 .item + .indexref {
306     margin-left: 20em;
307 }
308
309 .secitem + .indexref {
310     margin-left: 19em;
311 }
312
313
314 /* Admonitions */
315 div.admon h3 {
316   padding-left: 2.5em;
317   padding-top: 1em;
318 }
319
320 div.admon p {
321   margin-left: .5em;
322 }
323
324 div.admon pre {
325   margin: 0.5em 3em;
326 }
327
328 div.note, div.tip {
329   background-color: #fffff6;
330   border: 2px solid #dbddec;
331   width: 90%;
332   margin: .5em auto;
333 }
334
335 div.important, div.warning, div.caution {
336   background-color: #fffff6;
337   border: medium solid #400;
338   width: 90%;
339   margin: .5em auto;
340   color: #600;
341 }
342
343 div.important h3, div.warning h3, div.caution h3 {
344   color: #900;
345 }
346
347 div.important em, div.warning em, div.caution em {
348   color: #000;
349   font-weight: bold;
350 }
351
352
353 /* table */
354 .table p.title {
355   text-align: center;
356   margin-top: 0;
357   margin-bottom: .3em;
358 }
359
360 .table table {
361   margin-left: auto;
362   margin-right: auto;
363 }
364
365 .table table th, .table table td {
366   padding: 0.2em 2em 0.2em 2em;
367   text-align: left;
368 }
369
370 .revhistory {
371   padding-left: 1em;
372 }
373
374 .revhistory th {
375   line-height: 2em;
376   text-align: left;
377 }
378
379 .revhistory td {
380   padding-right: 1em;
381 }
382
383
384 /* variablelist as table */
385 .variablelist table {
386   width: auto;
387   margin: 0 1em 0 1em;
388 }
389
390 .variablelist td {
391   vertical-align: top;
392 }
393
394 .variablelist td span, td p {
395   margin: 0.25em;
396 }
397
398 .variablelist td p {
399   margin-top: 0;
400 }
401
402
403 /* variablelist as list */
404 dl {
405   padding-left: 1em
406 }
407
408 dt {
409   font-weight: bold;
410   margin-left: 1em;
411 }
412
413 dd {
414   margin-bottom: .6em;
415   margin-left: 1em;
416 }
417
418 dd p {
419   margin-top: 0;
420   margin-bottom: 0;
421   padding-top: 0;
422   padding-bottom: 0;
423 }
424
425 div.materials dt {
426   display: list-item;
427 }
428
429 div.materials dd {
430   margin-left: 0;
431   padding-left: 0;
432 }
433
434
435 /* segmentedlist */
436 .appendix .segmentedlist {
437   padding-left: 1em;
438 }
439
440 .package .seg {
441   margin-bottom: 0em;
442   margin-top: 0em;
443   clear: left;
444 }
445
446 .content .seg {
447   margin-bottom: .4em;
448   margin-top: .4em;
449   clear: left;
450 }
451
452 .segtitle {
453   float: left;
454 }
455
456 .package .segbody, .appendix .segbody {
457   display: block;
458   padding-left: 14em;
459 }
460
461 .content .segbody {
462   display: block;
463   padding-left: 12em;
464 }
465
466
467 /* itemizedlist */
468 ul {
469   padding-left: 1em
470 }
471
472 .itemizedlist ul {
473   margin-left: 1em
474 }
475
476 .itemizedlist li ul {
477   margin-bottom: 1.2em;
478 }
479
480 .itemizedlist li ul li p {
481   margin-top: .5em;
482   margin-bottom: .5em;
483 }
484
485 .itemizedlist li ul li:first-child p:first-child {
486   margin-top: -.6em;
487 }
488
489 ul.compact {
490   list-style: none;
491 }
492
493 .blfs ul.compact {
494   list-style: disc;
495 }
496
497 ul.compact li {
498   margin: 0em;
499   padding: 0em;
500 }
501
502 ul.compact li p {
503   padding: 0.3em;
504   margin: 0em;
505 }
506
507 .blfs ul.compact li p {
508   background-color: #f0fff0;
509 }
510
511 /* orderedlist */
512 ol {
513   list-style: decimal;
514 }
515
516 ol ol {
517   list-style: lower-alpha;
518 }
519
520 ol ol ol {
521   list-style: lower-roman;
522 }
523
524 ol.compact li {
525   margin: 0em;
526   padding: 0em;
527 }
528
529 ol.compact li p {
530   padding: 0.3em;
531   margin: 0em;
532 }
533
534
535 /* Indented blocks */
536 p, blockquote {
537   padding-left: 1em;
538   padding-right: 1em;
539 }
540
541
542 /* Monospaced elements */
543 tt, code, kbd, pre, .command {
544   font-family: monospace;
545 }
546
547 .systemitem {
548   font-style: italic;
549 }
550
551 pre {
552   background-color: #e5e5e5;
553   border: 1px solid #050505;
554   padding: .5em 1em;
555   margin: 0 2em .5em 2em;
556   font-weight: bold;
557 }
558
559 pre.userinput {
560   color: #101310;
561 }
562
563 pre.root {
564   color: #101310;
565   border: 1px solid #11a;
566 }
567
568 pre.screen {
569   color: #000;
570   background-color: #e9e9e9;
571   font-weight: normal;
572 }
573
574 .literal, .prompt {
575   font-weight: normal;
576 }
577
578
579 /* Mixed tags */
580 p.usernotes {
581   margin-left: -1em;
582   font-size: small;
583   font-weight: bold;
584   font-style: italic;
585 }
586
587 .underlined {
588   text-decoration: underline;
589 }
590
591
592 /* Last edited info */
593 p.updated {
594   font-size: small;
595   font-weight: bold;
596   font-style: italic;
597 }
598
599
600 /* Special colored blocks */
601   /* OrangeRed4 */
602 .feature-ssp {
603   color: #8B2500;
604 }
605
606   /* RoyalBlue3 */
607 .feature-aslr {
608   color: #3A5FCD;
609 }
610
611   /* NavyBlue */
612 .feature-pax {
613   color: #000080;
614 }
615
616   /* VioletRed */
617 .feature-hardened_tmp {
618   color: #d02090;
619 }
620
621   /* PaleTurquoise4 */
622 .feature-warnings {
623   color: #668b8b;
624 }
625
626   /* RosyBrown */
627 .feature-misc {
628   color: #bc8f8f;
629 }
630
631   /* Sienna*/
632 .feature-blowfish {
633   color: #8E6B23
634 }
635       </xsl:text>
636     </style>
637   </xsl:template>
638
639 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.