source: stylesheets/xhtml/lfs-mixed.xsl@ 276015d2

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 276015d2 was 276015d2, checked in by Randy McMurchy <randy@…>, 17 years ago

Added the LastChangedBy and Date keywords then set the corresponding keyword property on each file in the repo

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