source: stylesheets/lfs-xsl/nochunks.xsl@ a4eaba6

12.1 12.1-rc1 multilib trunk xry111/arm64 xry111/clfs-ng xry111/loongarch xry111/loongarch-12.1 xry111/mips64el xry111/update-glibc
Last change on this file since a4eaba6 was a4eaba6, checked in by Pierre Labastie <pierre.labastie@…>, 3 months ago

Tidy doctype and xml declarations in .html output

Part of a patch by Boian Berberov

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