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 | <!-- Dropping the HEAD links -->
|
---|
13 | <xsl:template name="html.head">
|
---|
14 | <head>
|
---|
15 | <xsl:call-template name="system.head.content"/>
|
---|
16 | <xsl:call-template name="head.content"/>
|
---|
17 | <xsl:call-template name="user.head.content"/>
|
---|
18 | </head>
|
---|
19 | </xsl:template>
|
---|
20 |
|
---|
21 | <!-- Header Navigation-->
|
---|
22 | <xsl:template name="header.navigation">
|
---|
23 | <xsl:param name="prev" select="/foo"/>
|
---|
24 | <xsl:param name="next" select="/foo"/>
|
---|
25 | <xsl:param name="nav.context"/>
|
---|
26 | <xsl:variable name="home" select="/*[1]"/>
|
---|
27 | <xsl:variable name="up" select="parent::*"/>
|
---|
28 | <xsl:variable name="row" select="count($prev) > 0 or (count($up) > 0
|
---|
29 | and generate-id($up) != generate-id($home)) or count($next) > 0"/>
|
---|
30 | <xsl:if test="$row and $home != .">
|
---|
31 | <div class="navheader">
|
---|
32 | <xsl:if test="$home != .">
|
---|
33 | <div class="headertitles">
|
---|
34 | <h4>
|
---|
35 | <xsl:text>Beyond Linux From Scratch - </xsl:text>
|
---|
36 | <xsl:apply-templates select="$home" mode="object.subtitle.markup"/>
|
---|
37 | </h4>
|
---|
38 | <xsl:if test="$up != $home">
|
---|
39 | <h3>
|
---|
40 | <xsl:apply-templates select="$up" mode="object.title.markup"/>
|
---|
41 | </h3>
|
---|
42 | </xsl:if>
|
---|
43 | </div>
|
---|
44 | </xsl:if>
|
---|
45 | <ul class="headerlinks">
|
---|
46 | <xsl:if test="count($prev)>0 and $prev != $home">
|
---|
47 | <li class="prev">
|
---|
48 | <xsl:choose>
|
---|
49 | <xsl:when test="$prev[@role='dummy']">
|
---|
50 | <a accesskey="p">
|
---|
51 | <xsl:attribute name="href">
|
---|
52 | <xsl:call-template name="href.target">
|
---|
53 | <xsl:with-param name="object" select="preceding-sibling::sect1[position()=2]"/>
|
---|
54 | </xsl:call-template>
|
---|
55 | </xsl:attribute>
|
---|
56 | <xsl:attribute name="title">
|
---|
57 | <xsl:value-of select="preceding-sibling::sect1[position()=2]/title"/>
|
---|
58 | </xsl:attribute>
|
---|
59 | <xsl:call-template name="navig.content">
|
---|
60 | <xsl:with-param name="direction" select="'prev'"/>
|
---|
61 | </xsl:call-template>
|
---|
62 | </a>
|
---|
63 | <p>
|
---|
64 | <xsl:value-of select="preceding-sibling::sect1[position()=2]/title"/>
|
---|
65 | </p>
|
---|
66 | </xsl:when>
|
---|
67 | <xsl:otherwise>
|
---|
68 | <a accesskey="p">
|
---|
69 | <xsl:attribute name="href">
|
---|
70 | <xsl:call-template name="href.target">
|
---|
71 | <xsl:with-param name="object" select="$prev"/>
|
---|
72 | </xsl:call-template>
|
---|
73 | </xsl:attribute>
|
---|
74 | <xsl:attribute name="title">
|
---|
75 | <xsl:value-of select="$prev/title"/>
|
---|
76 | </xsl:attribute>
|
---|
77 | <xsl:call-template name="navig.content">
|
---|
78 | <xsl:with-param name="direction" select="'prev'"/>
|
---|
79 | </xsl:call-template>
|
---|
80 | </a>
|
---|
81 | <p>
|
---|
82 | <xsl:value-of select="$prev/title"/>
|
---|
83 | </p>
|
---|
84 | </xsl:otherwise>
|
---|
85 | </xsl:choose>
|
---|
86 | </li>
|
---|
87 | </xsl:if>
|
---|
88 | <xsl:if test="count($next)>0">
|
---|
89 | <li class="next">
|
---|
90 | <xsl:choose>
|
---|
91 | <xsl:when test="$next[@role='dummy']">
|
---|
92 | <a accesskey="n">
|
---|
93 | <xsl:attribute name="href">
|
---|
94 | <xsl:call-template name="href.target">
|
---|
95 | <xsl:with-param name="object" select="following-sibling::sect1[position()=2]"/>
|
---|
96 | </xsl:call-template>
|
---|
97 | </xsl:attribute>
|
---|
98 | <xsl:attribute name="title">
|
---|
99 | <xsl:value-of select="following-sibling::sect1[position()=2]/title"/>
|
---|
100 | </xsl:attribute>
|
---|
101 | <xsl:call-template name="navig.content">
|
---|
102 | <xsl:with-param name="direction" select="'next'"/>
|
---|
103 | </xsl:call-template>
|
---|
104 | </a>
|
---|
105 | <p>
|
---|
106 | <xsl:value-of select="following-sibling::sect1[position()=2]/title"/>
|
---|
107 | </p>
|
---|
108 | </xsl:when>
|
---|
109 | <xsl:otherwise>
|
---|
110 | <a accesskey="n">
|
---|
111 | <xsl:attribute name="href">
|
---|
112 | <xsl:call-template name="href.target">
|
---|
113 | <xsl:with-param name="object" select="$next"/>
|
---|
114 | </xsl:call-template>
|
---|
115 | </xsl:attribute>
|
---|
116 | <xsl:attribute name="title">
|
---|
117 | <xsl:choose>
|
---|
118 | <xsl:when test="local-name($next)='index'">
|
---|
119 | <xsl:call-template name="gentext">
|
---|
120 | <xsl:with-param name="key">Index</xsl:with-param>
|
---|
121 | </xsl:call-template>
|
---|
122 | </xsl:when>
|
---|
123 | <xsl:otherwise>
|
---|
124 | <xsl:value-of select="$next/title"/>
|
---|
125 | </xsl:otherwise>
|
---|
126 | </xsl:choose>
|
---|
127 | </xsl:attribute>
|
---|
128 | <xsl:call-template name="navig.content">
|
---|
129 | <xsl:with-param name="direction" select="'next'"/>
|
---|
130 | </xsl:call-template>
|
---|
131 | </a>
|
---|
132 | <p>
|
---|
133 | <xsl:choose>
|
---|
134 | <xsl:when test="local-name($next)='index'">
|
---|
135 | <xsl:call-template name="gentext">
|
---|
136 | <xsl:with-param name="key">Index</xsl:with-param>
|
---|
137 | </xsl:call-template>
|
---|
138 | </xsl:when>
|
---|
139 | <xsl:otherwise>
|
---|
140 | <xsl:value-of select="$next/title"/>
|
---|
141 | </xsl:otherwise>
|
---|
142 | </xsl:choose>
|
---|
143 | </p>
|
---|
144 | </xsl:otherwise>
|
---|
145 | </xsl:choose>
|
---|
146 | </li>
|
---|
147 | </xsl:if>
|
---|
148 | <li class="up">
|
---|
149 | <xsl:if test="count($up)>0 and $up != $home">
|
---|
150 | <a accesskey="u">
|
---|
151 | <xsl:attribute name="href">
|
---|
152 | <xsl:call-template name="href.target">
|
---|
153 | <xsl:with-param name="object" select="$up"/>
|
---|
154 | </xsl:call-template>
|
---|
155 | </xsl:attribute>
|
---|
156 | <xsl:attribute name="title">
|
---|
157 | <xsl:apply-templates select="$up" mode="object.title.markup"/>
|
---|
158 | </xsl:attribute>
|
---|
159 | <xsl:call-template name="navig.content">
|
---|
160 | <xsl:with-param name="direction" select="'up'"/>
|
---|
161 | </xsl:call-template>
|
---|
162 | </a>
|
---|
163 | </xsl:if>
|
---|
164 | <xsl:text>.</xsl:text>
|
---|
165 | </li>
|
---|
166 | <li class="home">
|
---|
167 | <a accesskey="h">
|
---|
168 | <xsl:attribute name="href">
|
---|
169 | <xsl:call-template name="href.target">
|
---|
170 | <xsl:with-param name="object" select="$home"/>
|
---|
171 | </xsl:call-template>
|
---|
172 | </xsl:attribute>
|
---|
173 | <xsl:attribute name="title">
|
---|
174 | <xsl:value-of select="$home/bookinfo/title"/>
|
---|
175 | <xsl:text> - </xsl:text>
|
---|
176 | <xsl:value-of select="$home/bookinfo/subtitle"/>
|
---|
177 | </xsl:attribute>
|
---|
178 | <xsl:call-template name="navig.content">
|
---|
179 | <xsl:with-param name="direction" select="'home'"/>
|
---|
180 | </xsl:call-template>
|
---|
181 | </a>
|
---|
182 | </li>
|
---|
183 | </ul>
|
---|
184 | </div>
|
---|
185 | </xsl:if>
|
---|
186 | </xsl:template>
|
---|
187 |
|
---|
188 | <!-- Footer Navigation-->
|
---|
189 | <xsl:template name="footer.navigation">
|
---|
190 | <xsl:param name="prev" select="/foo"/>
|
---|
191 | <xsl:param name="next" select="/foo"/>
|
---|
192 | <xsl:param name="nav.context"/>
|
---|
193 | <xsl:variable name="home" select="/*[1]"/>
|
---|
194 | <xsl:variable name="up" select="parent::*"/>
|
---|
195 | <xsl:variable name="row" select="count($prev) > 0 or count($up) > 0
|
---|
196 | or count($next) > 0 or generate-id($home) != generate-id(.)"/>
|
---|
197 | <xsl:if test="$row">
|
---|
198 | <div class="navfooter">
|
---|
199 | <ul>
|
---|
200 | <xsl:if test="count($prev)>0 and $prev != $home">
|
---|
201 | <li class="prev">
|
---|
202 | <xsl:choose>
|
---|
203 | <xsl:when test="$prev[@role='dummy']">
|
---|
204 | <a accesskey="p">
|
---|
205 | <xsl:attribute name="href">
|
---|
206 | <xsl:call-template name="href.target">
|
---|
207 | <xsl:with-param name="object" select="preceding-sibling::sect1[position()=2]"/>
|
---|
208 | </xsl:call-template>
|
---|
209 | </xsl:attribute>
|
---|
210 | <xsl:attribute name="title">
|
---|
211 | <xsl:value-of select="preceding-sibling::sect1[position()=2]/title"/>
|
---|
212 | </xsl:attribute>
|
---|
213 | <xsl:call-template name="navig.content">
|
---|
214 | <xsl:with-param name="direction" select="'prev'"/>
|
---|
215 | </xsl:call-template>
|
---|
216 | </a>
|
---|
217 | <p>
|
---|
218 | <xsl:value-of select="preceding-sibling::sect1[position()=2]/title"/>
|
---|
219 | </p>
|
---|
220 | </xsl:when>
|
---|
221 | <xsl:otherwise>
|
---|
222 | <a accesskey="p">
|
---|
223 | <xsl:attribute name="href">
|
---|
224 | <xsl:call-template name="href.target">
|
---|
225 | <xsl:with-param name="object" select="$prev"/>
|
---|
226 | </xsl:call-template>
|
---|
227 | </xsl:attribute>
|
---|
228 | <xsl:attribute name="title">
|
---|
229 | <xsl:value-of select="$prev/title"/>
|
---|
230 | </xsl:attribute>
|
---|
231 | <xsl:call-template name="navig.content">
|
---|
232 | <xsl:with-param name="direction" select="'prev'"/>
|
---|
233 | </xsl:call-template>
|
---|
234 | </a>
|
---|
235 | <p>
|
---|
236 | <xsl:value-of select="$prev/title"/>
|
---|
237 | </p>
|
---|
238 | </xsl:otherwise>
|
---|
239 | </xsl:choose>
|
---|
240 | </li>
|
---|
241 | </xsl:if>
|
---|
242 | <xsl:if test="count($next)>0">
|
---|
243 | <li class="next">
|
---|
244 | <xsl:choose>
|
---|
245 | <xsl:when test="$next[@role='dummy']">
|
---|
246 | <a accesskey="n">
|
---|
247 | <xsl:attribute name="href">
|
---|
248 | <xsl:call-template name="href.target">
|
---|
249 | <xsl:with-param name="object" select="following-sibling::sect1[position()=2]"/>
|
---|
250 | </xsl:call-template>
|
---|
251 | </xsl:attribute>
|
---|
252 | <xsl:attribute name="title">
|
---|
253 | <xsl:value-of select="following-sibling::sect1[position()=2]/title"/>
|
---|
254 | </xsl:attribute>
|
---|
255 | <xsl:call-template name="navig.content">
|
---|
256 | <xsl:with-param name="direction" select="'next'"/>
|
---|
257 | </xsl:call-template>
|
---|
258 | </a>
|
---|
259 | <p>
|
---|
260 | <xsl:value-of select="following-sibling::sect1[position()=2]/title"/>
|
---|
261 | </p>
|
---|
262 | </xsl:when>
|
---|
263 | <xsl:otherwise>
|
---|
264 | <a accesskey="n">
|
---|
265 | <xsl:attribute name="href">
|
---|
266 | <xsl:call-template name="href.target">
|
---|
267 | <xsl:with-param name="object" select="$next"/>
|
---|
268 | </xsl:call-template>
|
---|
269 | </xsl:attribute>
|
---|
270 | <xsl:attribute name="title">
|
---|
271 | <xsl:choose>
|
---|
272 | <xsl:when test="local-name($next)='index'">
|
---|
273 | <xsl:call-template name="gentext">
|
---|
274 | <xsl:with-param name="key">Index</xsl:with-param>
|
---|
275 | </xsl:call-template>
|
---|
276 | </xsl:when>
|
---|
277 | <xsl:otherwise>
|
---|
278 | <xsl:value-of select="$next/title"/>
|
---|
279 | </xsl:otherwise>
|
---|
280 | </xsl:choose>
|
---|
281 | </xsl:attribute>
|
---|
282 | <xsl:call-template name="navig.content">
|
---|
283 | <xsl:with-param name="direction" select="'next'"/>
|
---|
284 | </xsl:call-template>
|
---|
285 | </a>
|
---|
286 | <p>
|
---|
287 | <xsl:choose>
|
---|
288 | <xsl:when test="local-name($next)='index'">
|
---|
289 | <xsl:call-template name="gentext">
|
---|
290 | <xsl:with-param name="key">Index</xsl:with-param>
|
---|
291 | </xsl:call-template>
|
---|
292 | </xsl:when>
|
---|
293 | <xsl:otherwise>
|
---|
294 | <xsl:value-of select="$next/title"/>
|
---|
295 | </xsl:otherwise>
|
---|
296 | </xsl:choose>
|
---|
297 | </p>
|
---|
298 | </xsl:otherwise>
|
---|
299 | </xsl:choose>
|
---|
300 | </li>
|
---|
301 | </xsl:if>
|
---|
302 | <li class="up">
|
---|
303 | <xsl:if test="count($up)>0 and $up != $home">
|
---|
304 | <a accesskey="u">
|
---|
305 | <xsl:attribute name="href">
|
---|
306 | <xsl:call-template name="href.target">
|
---|
307 | <xsl:with-param name="object" select="$up"/>
|
---|
308 | </xsl:call-template>
|
---|
309 | </xsl:attribute>
|
---|
310 | <xsl:attribute name="title">
|
---|
311 | <xsl:apply-templates select="$up" mode="object.title.markup"/>
|
---|
312 | </xsl:attribute>
|
---|
313 | <xsl:call-template name="navig.content">
|
---|
314 | <xsl:with-param name="direction" select="'up'"/>
|
---|
315 | </xsl:call-template>
|
---|
316 | </a>
|
---|
317 | </xsl:if>
|
---|
318 | <xsl:text>.</xsl:text>
|
---|
319 | </li>
|
---|
320 | <li class="home">
|
---|
321 | <xsl:if test="$home != .">
|
---|
322 | <a accesskey="h">
|
---|
323 | <xsl:attribute name="href">
|
---|
324 | <xsl:call-template name="href.target">
|
---|
325 | <xsl:with-param name="object" select="$home"/>
|
---|
326 | </xsl:call-template>
|
---|
327 | </xsl:attribute>
|
---|
328 | <xsl:attribute name="title">
|
---|
329 | <xsl:value-of select="$home/bookinfo/title"/>
|
---|
330 | <xsl:text> - </xsl:text>
|
---|
331 | <xsl:value-of select="$home/bookinfo/subtitle"/>
|
---|
332 | </xsl:attribute>
|
---|
333 | <xsl:call-template name="navig.content">
|
---|
334 | <xsl:with-param name="direction" select="'home'"/>
|
---|
335 | </xsl:call-template>
|
---|
336 | </a>
|
---|
337 | </xsl:if>
|
---|
338 | <xsl:text>.</xsl:text>
|
---|
339 | </li>
|
---|
340 | </ul>
|
---|
341 | </div>
|
---|
342 | </xsl:if>
|
---|
343 | </xsl:template>
|
---|
344 |
|
---|
345 | </xsl:stylesheet>
|
---|