source: stylesheets/xhtml/lfs-mixed.xsl@ 073b549

6.0
Last change on this file since 073b549 was 3ed279f, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

Tags changes in the contents sections to make a better print output.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/testing/BOOK@4009 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 2.9 KB
Line 
1<?xml version='1.0' encoding='ISO-8859-1'?>
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 <!-- screen -->
8 <xsl:template match="screen">
9 <xsl:choose>
10 <xsl:when test="child::* = userinput">
11 <pre class="userinput">
12 <kbd class="command">
13 <xsl:value-of select="."/>
14 </kbd>
15 </pre>
16 </xsl:when>
17 <xsl:otherwise>
18 <pre class="{name(.)}">
19 <xsl:apply-templates/>
20 </pre>
21 </xsl:otherwise>
22 </xsl:choose>
23 </xsl:template>
24
25 <!-- variablelist -->
26 <xsl:template match="variablelist">
27 <div class="{name(.)}">
28 <xsl:if test="title | bridgehead">
29 <xsl:choose>
30 <xsl:when test="@role = 'materials'">
31 <h2>
32 <xsl:value-of select="title | bridgehead"/>
33 </h2>
34 </xsl:when>
35 <xsl:otherwise>
36 <h3>
37 <xsl:value-of select="title | bridgehead"/>
38 </h3>
39 </xsl:otherwise>
40 </xsl:choose>
41 </xsl:if>
42 <dl>
43 <xsl:if test="@role">
44 <xsl:attribute name="class">
45 <xsl:value-of select="@role"/>
46 </xsl:attribute>
47 </xsl:if>
48 <xsl:apply-templates select="varlistentry"/>
49 </dl>
50 </div>
51 </xsl:template>
52
53 <!-- Body attributes -->
54 <xsl:template name="body.attributes">
55 <xsl:attribute name="id">
56 <xsl:text>lfs</xsl:text>
57 </xsl:attribute>
58 <xsl:attribute name="class">
59 <xsl:value-of select="substring-after(/book/bookinfo/subtitle, ' ')"/>
60 </xsl:attribute>
61 </xsl:template>
62
63 <!-- Sect1 attributes -->
64 <xsl:template match="sect1">
65 <div>
66 <xsl:choose>
67 <xsl:when test="@role">
68 <xsl:attribute name="class">
69 <xsl:value-of select="@role"/>
70 </xsl:attribute>
71 </xsl:when>
72 <xsl:otherwise>
73 <xsl:attribute name="class">
74 <xsl:value-of select="name(.)"/>
75 </xsl:attribute>
76 </xsl:otherwise>
77 </xsl:choose>
78 <xsl:call-template name="language.attribute"/>
79 <xsl:call-template name="sect1.titlepage"/>
80 <xsl:apply-templates/>
81 <xsl:call-template name="process.chunk.footnotes"/>
82 </div>
83 </xsl:template>
84
85 <!-- Sect2 attributes -->
86 <xsl:template match="sect2">
87 <div>
88 <xsl:choose>
89 <xsl:when test="@role">
90 <xsl:attribute name="class">
91 <xsl:value-of select="@role"/>
92 </xsl:attribute>
93 </xsl:when>
94 <xsl:otherwise>
95 <xsl:attribute name="class">
96 <xsl:value-of select="name(.)"/>
97 </xsl:attribute>
98 </xsl:otherwise>
99 </xsl:choose>
100 <xsl:call-template name="language.attribute"/>
101 <xsl:call-template name="sect2.titlepage"/>
102 <xsl:apply-templates/>
103 <xsl:call-template name="process.chunk.footnotes"/>
104 </div>
105 </xsl:template>
106
107</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.