2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 <xsl:template match="head" mode="head.mode">
6 <xsl:variable name="nodes" select="*"/>
8 <meta name="generator" content="Website XSL Stylesheet V{$VERSION}"/>
9 <xsl:if test="$html.stylesheet != ''">
10 <link rel="stylesheet" href="{$html.stylesheet}" type="text/css">
11 <xsl:if test="$html.stylesheet.type != ''">
12 <xsl:attribute name="type">
13 <xsl:value-of select="$html.stylesheet.type"/>
19 <xsl:variable name="thisid" select="ancestor-or-self::webpage/@id"/>
20 <xsl:variable name="thisrelpath">
21 <xsl:apply-templates select="$autolayout//*[@id=$thisid]" mode="toc-rel-path"/>
24 <xsl:variable name="topid">
25 <xsl:call-template name="top.page"/>
28 <xsl:if test="$topid != ''">
30 <xsl:attribute name="href">
31 <xsl:call-template name="page.uri">
32 <xsl:with-param name="page" select="$autolayout//*[@id=$topid]"/>
33 <xsl:with-param name="relpath" select="$thisrelpath"/>
36 <xsl:attribute name="title">
37 <xsl:value-of select="$autolayout//*[@id=$topid]/title"/>
42 <xsl:variable name="upid">
43 <xsl:call-template name="up.page"/>
46 <xsl:if test="$upid != ''">
48 <xsl:attribute name="href">
49 <xsl:call-template name="page.uri">
50 <xsl:with-param name="page" select="$autolayout//*[@id=$upid]"/>
51 <xsl:with-param name="relpath" select="$thisrelpath"/>
54 <xsl:attribute name="title">
55 <xsl:value-of select="$autolayout//*[@id=$upid]/title"/>
60 <xsl:variable name="previd">
61 <xsl:call-template name="prev.page"/>
64 <xsl:if test="$previd != ''">
66 <xsl:attribute name="href">
67 <xsl:call-template name="page.uri">
68 <xsl:with-param name="page" select="$autolayout//*[@id=$previd]"/>
69 <xsl:with-param name="relpath" select="$thisrelpath"/>
72 <xsl:attribute name="title">
73 <xsl:value-of select="$autolayout//*[@id=$previd]/title"/>
78 <xsl:variable name="nextid">
79 <xsl:call-template name="next.page"/>
82 <xsl:if test="$nextid != ''">
84 <xsl:attribute name="href">
85 <xsl:call-template name="page.uri">
86 <xsl:with-param name="page" select="$autolayout//*[@id=$nextid]"/>
87 <xsl:with-param name="relpath" select="$thisrelpath"/>
90 <xsl:attribute name="title">
91 <xsl:value-of select="$autolayout//*[@id=$nextid]/title"/>
96 <xsl:variable name="firstid">
97 <xsl:call-template name="first.page"/>
100 <xsl:if test="$firstid != ''">
102 <xsl:attribute name="href">
103 <xsl:call-template name="page.uri">
104 <xsl:with-param name="page" select="$autolayout//*[@id=$firstid]"/>
105 <xsl:with-param name="relpath" select="$thisrelpath"/>
108 <xsl:attribute name="title">
109 <xsl:value-of select="$autolayout//*[@id=$firstid]/title"/>
114 <xsl:variable name="lastid">
115 <xsl:call-template name="last.page"/>
118 <xsl:if test="$lastid != ''">
120 <xsl:attribute name="href">
121 <xsl:call-template name="page.uri">
122 <xsl:with-param name="page" select="$autolayout//*[@id=$lastid]"/>
123 <xsl:with-param name="relpath" select="$thisrelpath"/>
126 <xsl:attribute name="title">
127 <xsl:value-of select="$autolayout//*[@id=$lastid]/title"/>
132 <xsl:apply-templates select="$autolayout/autolayout/style
133 |$autolayout/autolayout/script
134 |$autolayout/autolayout/headlink"
136 <xsl:with-param name="webpage" select="ancestor::webpage"/>
137 </xsl:apply-templates>
138 <xsl:apply-templates mode="head.mode"/>
139 <xsl:call-template name="user.head.content">
140 <xsl:with-param name="node" select="ancestor::webpage"/>
145 <xsl:template match="title" mode="head.mode">
146 <title><xsl:value-of select="."/></title>
149 <xsl:template match="titleabbrev" mode="head.mode">
153 <xsl:template match="subtitle" mode="head.mode">
157 <xsl:template match="summary" mode="head.mode">
161 <xsl:template match="base" mode="head.mode">
162 <base href="{@href}">
163 <xsl:if test="@target">
164 <xsl:attribute name="target">
165 <xsl:value-of select="@target"/>
171 <xsl:template match="keywords" mode="head.mode">
172 <meta name="keyword" content="{.}"/>
173 <meta name="keywords" content="{.}"/>
176 <xsl:template match="copyright" mode="head.mode">
180 <xsl:template match="author" mode="head.mode">
184 <xsl:template match="edition" mode="head.mode">
188 <xsl:template match="meta" mode="head.mode">
190 <xsl:when test="@http-equiv">
191 <meta http-equiv="{@http-equiv}" content="{@content}"/>
194 <meta name="{@name}" content="{@content}"/>
199 <xsl:template match="script" mode="head.mode">
202 <xsl:when test="@language">
203 <xsl:attribute name="language">
204 <xsl:value-of select="@language"/>
208 <xsl:attribute name="language">JavaScript</xsl:attribute>
212 <xsl:when test="@type">
213 <xsl:attribute name="type">
214 <xsl:value-of select="@type"/>
218 <xsl:attribute name="type">text/javascript</xsl:attribute>
221 <xsl:apply-templates/>
225 <xsl:template match="script[@src]" mode="head.mode" priority="2">
226 <xsl:param name="webpage" select="ancestor::webpage"/>
227 <xsl:variable name="relpath">
228 <xsl:call-template name="root-rel-path">
229 <xsl:with-param name="webpage" select="$webpage"/>
233 <xsl:variable name="language">
235 <xsl:when test="@language">
236 <xsl:value-of select="@language"/>
238 <xsl:otherwise>JavaScript</xsl:otherwise>
242 <xsl:variable name="type">
244 <xsl:when test="@type">
245 <xsl:value-of select="@type"/>
247 <xsl:otherwise>text/javascript</xsl:otherwise>
251 <script src="{$relpath}{@src}" language="{$language}" type="{$type}"/>
254 <xsl:template match="style" mode="head.mode">
256 <xsl:if test="@type">
257 <xsl:attribute name="type">
258 <xsl:value-of select="@type"/>
262 <xsl:apply-templates/>
267 <xsl:template match="style[@src]" mode="head.mode" priority="2">
268 <xsl:param name="webpage" select="ancestor::webpage"/>
269 <xsl:variable name="relpath">
270 <xsl:call-template name="root-rel-path">
271 <xsl:with-param name="webpage" select="$webpage"/>
276 <xsl:when test="starts-with(@src, '/')">
277 <link rel="stylesheet" href="{@src}">
278 <xsl:if test="@type">
279 <xsl:attribute name="type">
280 <xsl:value-of select="@type"/>
286 <link rel="stylesheet" href="{$relpath}{@src}">
287 <xsl:if test="@type">
288 <xsl:attribute name="type">
289 <xsl:value-of select="@type"/>
297 <xsl:template match="headlink" mode="head.mode">
299 <xsl:copy-of select="@*"/>
303 <xsl:template match="abstract" mode="head.mode">
307 <xsl:template match="revhistory" mode="head.mode">
311 <xsl:template match="rddl:*" mode="head.mode"
312 xmlns:rddl='http://www.rddl.org/'>