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 | <xsl:apply-templates/>
|
---|
13 | </pre>
|
---|
14 | </xsl:when>
|
---|
15 | <xsl:otherwise>
|
---|
16 | <pre class="{name(.)}">
|
---|
17 | <xsl:apply-templates/>
|
---|
18 | </pre>
|
---|
19 | </xsl:otherwise>
|
---|
20 | </xsl:choose>
|
---|
21 | </xsl:template>
|
---|
22 |
|
---|
23 | <xsl:template match="userinput">
|
---|
24 | <xsl:choose>
|
---|
25 | <xsl:when test="ancestor::screen">
|
---|
26 | <kbd class="command">
|
---|
27 | <xsl:apply-templates/>
|
---|
28 | </kbd>
|
---|
29 | </xsl:when>
|
---|
30 | <xsl:otherwise>
|
---|
31 | <xsl:apply-imports/>
|
---|
32 | </xsl:otherwise>
|
---|
33 | </xsl:choose>
|
---|
34 | </xsl:template>
|
---|
35 |
|
---|
36 |
|
---|
37 | <!-- variablelist -->
|
---|
38 | <xsl:template match="variablelist">
|
---|
39 | <div class="{name(.)}">
|
---|
40 | <xsl:if test="title | bridgehead">
|
---|
41 | <xsl:choose>
|
---|
42 | <xsl:when test="@role = 'materials'">
|
---|
43 | <h2>
|
---|
44 | <xsl:value-of select="title | bridgehead"/>
|
---|
45 | </h2>
|
---|
46 | </xsl:when>
|
---|
47 | <xsl:otherwise>
|
---|
48 | <h3>
|
---|
49 | <xsl:value-of select="title | bridgehead"/>
|
---|
50 | </h3>
|
---|
51 | </xsl:otherwise>
|
---|
52 | </xsl:choose>
|
---|
53 | </xsl:if>
|
---|
54 | <dl>
|
---|
55 | <xsl:if test="@role">
|
---|
56 | <xsl:attribute name="class">
|
---|
57 | <xsl:value-of select="@role"/>
|
---|
58 | </xsl:attribute>
|
---|
59 | </xsl:if>
|
---|
60 | <xsl:apply-templates select="varlistentry"/>
|
---|
61 | </dl>
|
---|
62 | </div>
|
---|
63 | </xsl:template>
|
---|
64 |
|
---|
65 | <!-- Body attributes -->
|
---|
66 | <xsl:template name="body.attributes">
|
---|
67 | <xsl:attribute name="id">
|
---|
68 | <xsl:text>lfs</xsl:text>
|
---|
69 | </xsl:attribute>
|
---|
70 | <xsl:attribute name="class">
|
---|
71 | <xsl:value-of select="substring-after(/book/bookinfo/subtitle, ' ')"/>
|
---|
72 | </xsl:attribute>
|
---|
73 | </xsl:template>
|
---|
74 |
|
---|
75 | <!-- Sect1 attributes -->
|
---|
76 | <xsl:template match="sect1">
|
---|
77 | <div>
|
---|
78 | <xsl:choose>
|
---|
79 | <xsl:when test="@role">
|
---|
80 | <xsl:attribute name="class">
|
---|
81 | <xsl:value-of select="@role"/>
|
---|
82 | </xsl:attribute>
|
---|
83 | </xsl:when>
|
---|
84 | <xsl:otherwise>
|
---|
85 | <xsl:attribute name="class">
|
---|
86 | <xsl:value-of select="name(.)"/>
|
---|
87 | </xsl:attribute>
|
---|
88 | </xsl:otherwise>
|
---|
89 | </xsl:choose>
|
---|
90 | <xsl:call-template name="language.attribute"/>
|
---|
91 | <xsl:call-template name="sect1.titlepage"/>
|
---|
92 | <xsl:apply-templates/>
|
---|
93 | <xsl:call-template name="process.chunk.footnotes"/>
|
---|
94 | </div>
|
---|
95 | </xsl:template>
|
---|
96 |
|
---|
97 | <!-- Sect2 attributes -->
|
---|
98 | <xsl:template match="sect2">
|
---|
99 | <div>
|
---|
100 | <xsl:choose>
|
---|
101 | <xsl:when test="@role">
|
---|
102 | <xsl:attribute name="class">
|
---|
103 | <xsl:value-of select="@role"/>
|
---|
104 | </xsl:attribute>
|
---|
105 | </xsl:when>
|
---|
106 | <xsl:otherwise>
|
---|
107 | <xsl:attribute name="class">
|
---|
108 | <xsl:value-of select="name(.)"/>
|
---|
109 | </xsl:attribute>
|
---|
110 | </xsl:otherwise>
|
---|
111 | </xsl:choose>
|
---|
112 | <xsl:call-template name="language.attribute"/>
|
---|
113 | <xsl:call-template name="sect2.titlepage"/>
|
---|
114 | <xsl:apply-templates/>
|
---|
115 | <xsl:call-template name="process.chunk.footnotes"/>
|
---|
116 | </div>
|
---|
117 | </xsl:template>
|
---|
118 |
|
---|
119 | </xsl:stylesheet>
|
---|