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