source: stylesheets/xhtml/lfs-mixed.xsl@ 1dca852

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 1dca852 was 1dca852, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Changed the "Revision History" table look.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4982 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 9.5 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="@role = 'root'">
11 <pre class="root">
12 <xsl:apply-templates/>
13 </pre>
14 </xsl:when>
15 <xsl:when test="child::* = userinput">
16 <pre class="userinput">
17 <xsl:apply-templates/>
18 </pre>
19 </xsl:when>
20 <xsl:otherwise>
21 <pre class="{name(.)}">
22 <xsl:apply-templates/>
23 </pre>
24 </xsl:otherwise>
25 </xsl:choose>
26 </xsl:template>
27
28 <!-- userinput -->
29 <xsl:template match="userinput">
30 <xsl:choose>
31 <xsl:when test="ancestor::screen">
32 <kbd class="command">
33 <xsl:apply-templates/>
34 </kbd>
35 </xsl:when>
36 <xsl:otherwise>
37 <xsl:apply-imports/>
38 </xsl:otherwise>
39 </xsl:choose>
40 </xsl:template>
41
42 <!-- Body attributes -->
43 <xsl:template name="body.attributes">
44 <xsl:attribute name="id">
45 <xsl:text>blfs</xsl:text>
46 </xsl:attribute>
47 <xsl:attribute name="class">
48 <xsl:value-of select="substring-after(/book/bookinfo/subtitle, ' ')"/>
49 </xsl:attribute>
50 </xsl:template>
51
52 <!-- External URLs in class='url' -->
53 <xsl:template match="ulink" name="ulink">
54 <a>
55 <xsl:if test="@id">
56 <xsl:attribute name="id">
57 <xsl:value-of select="@id"/>
58 </xsl:attribute>
59 </xsl:if>
60 <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
61 <span class='url'>
62 <xsl:choose>
63 <xsl:when test="count(child::node())=0">
64 <xsl:value-of select="@url"/>
65 </xsl:when>
66 <xsl:otherwise>
67 <xsl:apply-templates/>
68 </xsl:otherwise>
69 </xsl:choose>
70 </span>
71 </a>
72 </xsl:template>
73
74 <!-- Cunstomizing segementedlist -->
75 <xsl:template match="seg">
76 <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
77 <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
78 <xsl:variable name="segtitles" select="$seglist/segtitle"/>
79 <!-- Note: segtitle is only going to be the right thing in a well formed
80 SegmentedList. If there are too many Segs or too few SegTitles,
81 you'll get something odd...maybe an error -->
82 <div class="seg">
83 <strong>
84 <span class="segtitle">
85 <xsl:apply-templates select="$segtitles[$segnum=position()]"
86 mode="segtitle-in-seg"/>
87 <xsl:text>: </xsl:text>
88 </span>
89 </strong>
90 <span class="seg">
91 <xsl:apply-templates/>
92 </span>
93 </div>
94 </xsl:template>
95
96 <!-- The <code> xhtml tag have look issues in some browsers, like Konqueror and.
97 isn't semantically correct (a filename isn't a code fragment) We will use <tt> for now. -->
98 <xsl:template name="inline.monoseq">
99 <xsl:param name="content">
100 <xsl:call-template name="anchor"/>
101 <xsl:call-template name="simple.xlink">
102 <xsl:with-param name="content">
103 <xsl:apply-templates/>
104 </xsl:with-param>
105 </xsl:call-template>
106 </xsl:param>
107 <tt class="{local-name(.)}">
108 <xsl:if test="@dir">
109 <xsl:attribute name="dir">
110 <xsl:value-of select="@dir"/>
111 </xsl:attribute>
112 </xsl:if>
113 <xsl:copy-of select="$content"/>
114 </tt>
115 </xsl:template>
116
117 <xsl:template name="inline.boldmonoseq">
118 <xsl:param name="content">
119 <xsl:call-template name="anchor"/>
120 <xsl:call-template name="simple.xlink">
121 <xsl:with-param name="content">
122 <xsl:apply-templates/>
123 </xsl:with-param>
124 </xsl:call-template>
125 </xsl:param>
126 <!-- don't put <strong> inside figure, example, or table titles -->
127 <!-- or other titles that may already be represented with <strong>'s. -->
128 <xsl:choose>
129 <xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure'
130 or local-name(../..) = 'example' or local-name(../..) = 'table' or local-name(../..) = 'formalpara')">
131 <tt class="{local-name(.)}">
132 <xsl:if test="@dir">
133 <xsl:attribute name="dir">
134 <xsl:value-of select="@dir"/>
135 </xsl:attribute>
136 </xsl:if>
137 <xsl:copy-of select="$content"/>
138 </tt>
139 </xsl:when>
140 <xsl:otherwise>
141 <strong class="{local-name(.)}">
142 <tt>
143 <xsl:if test="@dir">
144 <xsl:attribute name="dir">
145 <xsl:value-of select="@dir"/>
146 </xsl:attribute>
147 </xsl:if>
148 <xsl:copy-of select="$content"/>
149 </tt>
150 </strong>
151 </xsl:otherwise>
152 </xsl:choose>
153 </xsl:template>
154
155 <xsl:template name="inline.italicmonoseq">
156 <xsl:param name="content">
157 <xsl:call-template name="anchor"/>
158 <xsl:call-template name="simple.xlink">
159 <xsl:with-param name="content">
160 <xsl:apply-templates/>
161 </xsl:with-param>
162 </xsl:call-template>
163 </xsl:param>
164 <em class="{local-name(.)}">
165 <tt>
166 <xsl:if test="@dir">
167 <xsl:attribute name="dir">
168 <xsl:value-of select="@dir"/>
169 </xsl:attribute>
170 </xsl:if>
171 <xsl:copy-of select="$content"/>
172 </tt>
173 </em>
174 </xsl:template>
175
176 <!-- Revision History -->
177 <xsl:template match="revhistory" mode="titlepage.mode">
178 <xsl:variable name="numcols">
179 <xsl:choose>
180 <xsl:when test="//authorinitials">4</xsl:when>
181 <xsl:otherwise>3</xsl:otherwise>
182 </xsl:choose>
183 </xsl:variable>
184 <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
185 <xsl:variable name="title">
186 <xsl:call-template name="gentext">
187 <xsl:with-param name="key">RevHistory</xsl:with-param>
188 </xsl:call-template>
189 </xsl:variable>
190 <xsl:variable name="contents">
191 <div class="{name(.)}">
192 <table summary="Revision history">
193 <tr>
194 <th colspan="{$numcols}">
195 <b>
196 <xsl:call-template name="gentext">
197 <xsl:with-param name="key" select="'RevHistory'"/>
198 </xsl:call-template>
199 </b>
200 </th>
201 </tr>
202 <xsl:apply-templates mode="titlepage.mode">
203 <xsl:with-param name="numcols" select="$numcols"/>
204 </xsl:apply-templates>
205 </table>
206 </div>
207 </xsl:variable>
208 <!--<xsl:choose>
209 <xsl:when test="$generate.revhistory.link != 0">
210 <xsl:variable name="filename">
211 <xsl:call-template name="make-relative-filename">
212 <xsl:with-param name="base.dir" select="$base.dir"/>
213 <xsl:with-param name="base.name" select="concat($id,$html.ext)"/>
214 </xsl:call-template>
215 </xsl:variable>
216 <a href="{concat($id,$html.ext)}">
217 <xsl:copy-of select="$title"/>
218 </a>
219 <xsl:call-template name="write.chunk">
220 <xsl:with-param name="filename" select="$filename"/>
221 <xsl:with-param name="quiet" select="$chunk.quietly"/>
222 <xsl:with-param name="content">
223 <xsl:call-template name="user.preroot"/>
224 <html>
225 <head>
226 <xsl:call-template name="system.head.content"/>
227 <xsl:call-template name="head.content">
228 <xsl:with-param name="title">
229 <xsl:value-of select="$title"/>
230 <xsl:if test="../../title">
231 <xsl:value-of select="concat(' (', ../../title, ')')"/>
232 </xsl:if>
233 </xsl:with-param>
234 </xsl:call-template>
235 <xsl:call-template name="user.head.content"/>
236 </head>
237 <body>
238 <xsl:call-template name="body.attributes"/>
239 <xsl:copy-of select="$contents"/>
240 </body>
241 </html>
242 </xsl:with-param>
243 </xsl:call-template>
244 </xsl:when>
245 <xsl:otherwise>-->
246 <xsl:copy-of select="$contents"/>
247 <!--</xsl:otherwise>
248 </xsl:choose>-->
249 </xsl:template>
250
251 <xsl:template match="revhistory/revision" mode="titlepage.mode">
252 <xsl:param name="numcols" select="'3'"/>
253 <xsl:variable name="revnumber" select="revnumber"/>
254 <xsl:variable name="revdate" select="date"/>
255 <xsl:variable name="revauthor" select="authorinitials"/>
256 <xsl:variable name="revremark" select="revremark|revdescription"/>
257 <tr>
258 <td>
259 <xsl:if test="$revnumber">
260 <xsl:call-template name="gentext">
261 <xsl:with-param name="key" select="'Revision'"/>
262 </xsl:call-template>
263 <xsl:call-template name="gentext.space"/>
264 <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/>
265 </xsl:if>
266 </td>
267 <td>
268 <xsl:apply-templates select="$revdate[1]" mode="titlepage.mode"/>
269 </td>
270 <xsl:choose>
271 <xsl:when test="$revauthor">
272 <td align="left">
273 <xsl:for-each select="$revauthor">
274 <xsl:apply-templates select="." mode="titlepage.mode"/>
275 <xsl:if test="position() != last()">
276 <xsl:text>, </xsl:text>
277 </xsl:if>
278 </xsl:for-each>
279 </td>
280 </xsl:when>
281 <xsl:when test="$numcols &gt; 3">
282 <td>&#160;</td>
283 </xsl:when>
284 <xsl:otherwise/>
285 </xsl:choose>
286 <td>
287 <xsl:apply-templates select="$revremark[1]" mode="titlepage.mode"/>
288 </td>
289 </tr>
290 </xsl:template>
291
292</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.