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:apply-templates select="$home" mode="object.title.markup"/>
|
---|
31 | <xsl:text> - </xsl:text>
|
---|
32 | <xsl:apply-templates select="$home" mode="object.subtitle.markup"/>
|
---|
33 | </h4>
|
---|
34 | <xsl:if test="$up != $home">
|
---|
35 | <h3>
|
---|
36 | <xsl:apply-templates select="$up" mode="object.title.markup"/>
|
---|
37 | </h3>
|
---|
38 | </xsl:if>
|
---|
39 | </div>
|
---|
40 | </xsl:if>
|
---|
41 | <ul class="headerlinks">
|
---|
42 | <xsl:if test="count($prev)>0 and $prev != $home">
|
---|
43 | <li class="prev">
|
---|
44 | <a accesskey="p">
|
---|
45 | <xsl:attribute name="href">
|
---|
46 | <xsl:call-template name="href.target">
|
---|
47 | <xsl:with-param name="object" select="$prev"/>
|
---|
48 | </xsl:call-template>
|
---|
49 | </xsl:attribute>
|
---|
50 | <xsl:attribute name="title">
|
---|
51 | <xsl:value-of select="$prev/title"/>
|
---|
52 | </xsl:attribute>
|
---|
53 | <xsl:call-template name="navig.content">
|
---|
54 | <xsl:with-param name="direction" select="'prev'"/>
|
---|
55 | </xsl:call-template>
|
---|
56 | </a>
|
---|
57 | <p>
|
---|
58 | <xsl:value-of select="$prev/title"/>
|
---|
59 | </p>
|
---|
60 | </li>
|
---|
61 | </xsl:if>
|
---|
62 | <xsl:if test="count($next)>0">
|
---|
63 | <li class="next">
|
---|
64 | <a accesskey="n">
|
---|
65 | <xsl:attribute name="href">
|
---|
66 | <xsl:call-template name="href.target">
|
---|
67 | <xsl:with-param name="object" select="$next"/>
|
---|
68 | </xsl:call-template>
|
---|
69 | </xsl:attribute>
|
---|
70 | <xsl:attribute name="title">
|
---|
71 | <xsl:choose>
|
---|
72 | <xsl:when test="local-name($next)='index'">
|
---|
73 | <xsl:call-template name="gentext">
|
---|
74 | <xsl:with-param name="key">Index</xsl:with-param>
|
---|
75 | </xsl:call-template>
|
---|
76 | </xsl:when>
|
---|
77 | <xsl:otherwise>
|
---|
78 | <xsl:value-of select="$next/title"/>
|
---|
79 | </xsl:otherwise>
|
---|
80 | </xsl:choose>
|
---|
81 | </xsl:attribute>
|
---|
82 | <xsl:call-template name="navig.content">
|
---|
83 | <xsl:with-param name="direction" select="'next'"/>
|
---|
84 | </xsl:call-template>
|
---|
85 | </a>
|
---|
86 | <p>
|
---|
87 | <xsl:choose>
|
---|
88 | <xsl:when test="local-name($next)='index'">
|
---|
89 | <xsl:call-template name="gentext">
|
---|
90 | <xsl:with-param name="key">Index</xsl:with-param>
|
---|
91 | </xsl:call-template>
|
---|
92 | </xsl:when>
|
---|
93 | <xsl:otherwise>
|
---|
94 | <xsl:value-of select="$next/title"/>
|
---|
95 | </xsl:otherwise>
|
---|
96 | </xsl:choose>
|
---|
97 | </p>
|
---|
98 | </li>
|
---|
99 | </xsl:if>
|
---|
100 | <li class="up">
|
---|
101 | <xsl:if test="count($up)>0 and $up != $home">
|
---|
102 | <a accesskey="u">
|
---|
103 | <xsl:attribute name="href">
|
---|
104 | <xsl:call-template name="href.target">
|
---|
105 | <xsl:with-param name="object" select="$up"/>
|
---|
106 | </xsl:call-template>
|
---|
107 | </xsl:attribute>
|
---|
108 | <xsl:attribute name="title">
|
---|
109 | <xsl:apply-templates select="$up" mode="object.title.markup"/>
|
---|
110 | </xsl:attribute>
|
---|
111 | <xsl:call-template name="navig.content">
|
---|
112 | <xsl:with-param name="direction" select="'up'"/>
|
---|
113 | </xsl:call-template>
|
---|
114 | </a>
|
---|
115 | </xsl:if>
|
---|
116 | <xsl:text>.</xsl:text>
|
---|
117 | </li>
|
---|
118 | <li class="home">
|
---|
119 | <a accesskey="h">
|
---|
120 | <xsl:attribute name="href">
|
---|
121 | <xsl:call-template name="href.target">
|
---|
122 | <xsl:with-param name="object" select="$home"/>
|
---|
123 | </xsl:call-template>
|
---|
124 | </xsl:attribute>
|
---|
125 | <xsl:attribute name="title">
|
---|
126 | <xsl:value-of select="$home/bookinfo/title"/>
|
---|
127 | <xsl:text> - </xsl:text>
|
---|
128 | <xsl:value-of select="$home/bookinfo/subtitle"/>
|
---|
129 | </xsl:attribute>
|
---|
130 | <xsl:call-template name="navig.content">
|
---|
131 | <xsl:with-param name="direction" select="'home'"/>
|
---|
132 | </xsl:call-template>
|
---|
133 | </a>
|
---|
134 | </li>
|
---|
135 | </ul>
|
---|
136 | </div>
|
---|
137 | </xsl:if>
|
---|
138 | </xsl:template>
|
---|
139 |
|
---|
140 | <!-- Footer Navigation-->
|
---|
141 | <xsl:template name="footer.navigation">
|
---|
142 | <xsl:param name="prev" select="/foo"/>
|
---|
143 | <xsl:param name="next" select="/foo"/>
|
---|
144 | <xsl:param name="nav.context"/>
|
---|
145 | <xsl:variable name="home" select="/*[1]"/>
|
---|
146 | <xsl:variable name="up" select="parent::*"/>
|
---|
147 | <xsl:variable name="row" select="count($prev) > 0 or count($up) > 0
|
---|
148 | or count($next) > 0 or generate-id($home) != generate-id(.)"/>
|
---|
149 | <xsl:if test="$row">
|
---|
150 | <div class="navfooter">
|
---|
151 | <ul>
|
---|
152 | <xsl:if test="count($prev)>0 and $prev != $home">
|
---|
153 | <li class="prev">
|
---|
154 | <a accesskey="p">
|
---|
155 | <xsl:attribute name="href">
|
---|
156 | <xsl:call-template name="href.target">
|
---|
157 | <xsl:with-param name="object" select="$prev"/>
|
---|
158 | </xsl:call-template>
|
---|
159 | </xsl:attribute>
|
---|
160 | <xsl:attribute name="title">
|
---|
161 | <xsl:value-of select="$prev/title"/>
|
---|
162 | </xsl:attribute>
|
---|
163 | <xsl:call-template name="navig.content">
|
---|
164 | <xsl:with-param name="direction" select="'prev'"/>
|
---|
165 | </xsl:call-template>
|
---|
166 | </a>
|
---|
167 | <p>
|
---|
168 | <xsl:value-of select="$prev/title"/>
|
---|
169 | </p>
|
---|
170 | </li>
|
---|
171 | </xsl:if>
|
---|
172 | <xsl:if test="count($next)>0">
|
---|
173 | <li class="next">
|
---|
174 | <a accesskey="n">
|
---|
175 | <xsl:attribute name="href">
|
---|
176 | <xsl:call-template name="href.target">
|
---|
177 | <xsl:with-param name="object" select="$next"/>
|
---|
178 | </xsl:call-template>
|
---|
179 | </xsl:attribute>
|
---|
180 | <xsl:attribute name="title">
|
---|
181 | <xsl:choose>
|
---|
182 | <xsl:when test="local-name($next)='index'">
|
---|
183 | <xsl:call-template name="gentext">
|
---|
184 | <xsl:with-param name="key">Index</xsl:with-param>
|
---|
185 | </xsl:call-template>
|
---|
186 | </xsl:when>
|
---|
187 | <xsl:otherwise>
|
---|
188 | <xsl:value-of select="$next/title"/>
|
---|
189 | </xsl:otherwise>
|
---|
190 | </xsl:choose>
|
---|
191 | </xsl:attribute>
|
---|
192 | <xsl:call-template name="navig.content">
|
---|
193 | <xsl:with-param name="direction" select="'next'"/>
|
---|
194 | </xsl:call-template>
|
---|
195 | </a>
|
---|
196 | <p>
|
---|
197 | <xsl:choose>
|
---|
198 | <xsl:when test="local-name($next)='index'">
|
---|
199 | <xsl:call-template name="gentext">
|
---|
200 | <xsl:with-param name="key">Index</xsl:with-param>
|
---|
201 | </xsl:call-template>
|
---|
202 | </xsl:when>
|
---|
203 | <xsl:otherwise>
|
---|
204 | <xsl:value-of select="$next/title"/>
|
---|
205 | </xsl:otherwise>
|
---|
206 | </xsl:choose>
|
---|
207 | </p>
|
---|
208 | </li>
|
---|
209 | </xsl:if>
|
---|
210 | <li class="up">
|
---|
211 | <xsl:if test="count($up)>0 and $up != $home">
|
---|
212 | <a accesskey="u">
|
---|
213 | <xsl:attribute name="href">
|
---|
214 | <xsl:call-template name="href.target">
|
---|
215 | <xsl:with-param name="object" select="$up"/>
|
---|
216 | </xsl:call-template>
|
---|
217 | </xsl:attribute>
|
---|
218 | <xsl:attribute name="title">
|
---|
219 | <xsl:apply-templates select="$up" mode="object.title.markup"/>
|
---|
220 | </xsl:attribute>
|
---|
221 | <xsl:call-template name="navig.content">
|
---|
222 | <xsl:with-param name="direction" select="'up'"/>
|
---|
223 | </xsl:call-template>
|
---|
224 | </a>
|
---|
225 | </xsl:if>
|
---|
226 | <xsl:text>.</xsl:text>
|
---|
227 | </li>
|
---|
228 | <li class="home">
|
---|
229 | <xsl:if test="$home != .">
|
---|
230 | <a accesskey="h">
|
---|
231 | <xsl:attribute name="href">
|
---|
232 | <xsl:call-template name="href.target">
|
---|
233 | <xsl:with-param name="object" select="$home"/>
|
---|
234 | </xsl:call-template>
|
---|
235 | </xsl:attribute>
|
---|
236 | <xsl:attribute name="title">
|
---|
237 | <xsl:value-of select="$home/bookinfo/title"/>
|
---|
238 | <xsl:text> - </xsl:text>
|
---|
239 | <xsl:value-of select="$home/bookinfo/subtitle"/>
|
---|
240 | </xsl:attribute>
|
---|
241 | <xsl:call-template name="navig.content">
|
---|
242 | <xsl:with-param name="direction" select="'home'"/>
|
---|
243 | </xsl:call-template>
|
---|
244 | </a>
|
---|
245 | </xsl:if>
|
---|
246 | <xsl:text>.</xsl:text>
|
---|
247 | </li>
|
---|
248 | </ul>
|
---|
249 | </div>
|
---|
250 | </xsl:if>
|
---|
251 | </xsl:template>
|
---|
252 |
|
---|
253 | </xsl:stylesheet>
|
---|
254 |
|
---|
255 |
|
---|