1 | <xsl:stylesheet
|
---|
2 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
3 | xmlns:exsl="http://exslt.org/common"
|
---|
4 | xmlns:ng="http://docbook.org/docbook-ng"
|
---|
5 | xmlns:db="http://docbook.org/ns/docbook"
|
---|
6 | version="1.0" xmlns="http://www.w3.org/1999/xhtml"
|
---|
7 | exclude-result-prefixes="exsl ng db">
|
---|
8 |
|
---|
9 | <!-- ********************************************************************
|
---|
10 | $Id$
|
---|
11 | ********************************************************************
|
---|
12 |
|
---|
13 | This file is part customization layer on top of the XSL DocBook
|
---|
14 | Stylesheet distribution that generates webhelp output.
|
---|
15 |
|
---|
16 | ******************************************************************** -->
|
---|
17 |
|
---|
18 | <xsl:param name="chunker.output.method">
|
---|
19 | <xsl:choose>
|
---|
20 | <xsl:when test="contains(system-property('xsl:vendor'), 'SAXON 6')">saxon:xhtml</xsl:when>
|
---|
21 | <xsl:otherwise>html</xsl:otherwise>
|
---|
22 | </xsl:choose>
|
---|
23 | </xsl:param>
|
---|
24 |
|
---|
25 | <xsl:param name="doc.title">
|
---|
26 | <xsl:call-template name="get.doc.title"/>
|
---|
27 | </xsl:param>
|
---|
28 |
|
---|
29 | <!-- Set some reasonable defaults for webhelp output -->
|
---|
30 | <xsl:param name="webhelp.common.dir">common/</xsl:param>
|
---|
31 | <xsl:param name="chunker.output.indent">yes</xsl:param>
|
---|
32 | <xsl:param name="navig.showtitles">0</xsl:param>
|
---|
33 | <xsl:param name="manifest.in.base.dir" select="0"/>
|
---|
34 | <xsl:param name="base.dir" select="concat($webhelp.base.dir,'/')"/>
|
---|
35 | <xsl:param name="suppress.navigation">0</xsl:param>
|
---|
36 | <!-- Generate the end-of-the-book index -->
|
---|
37 | <xsl:param name="generate.index" select="1"/>
|
---|
38 | <xsl:param name="inherit.keywords" select="'0'"/>
|
---|
39 | <xsl:param name="para.propagates.style" select="1"/>
|
---|
40 | <xsl:param name="phrase.propagates.style" select="1"/>
|
---|
41 | <xsl:param name="chunk.first.sections" select="1"/>
|
---|
42 | <xsl:param name="chunk.section.depth" select="3"/>
|
---|
43 | <xsl:param name="use.id.as.filename" select="1"/>
|
---|
44 | <xsl:param name="branding">not set</xsl:param>
|
---|
45 | <xsl:param name="brandname"> </xsl:param>
|
---|
46 |
|
---|
47 | <xsl:param name="section.autolabel" select="0"/>
|
---|
48 | <xsl:param name="chapter.autolabel" select="0"/>
|
---|
49 | <xsl:param name="appendix.autolabel" select="0"/>
|
---|
50 | <xsl:param name="qandadiv.autolabel" select="0"/>
|
---|
51 | <xsl:param name="reference.autolabel" select="0"/>
|
---|
52 | <xsl:param name="part.autolabel" select="0"/>
|
---|
53 | <xsl:param name="section.label.includes.component.label" select="1"/>
|
---|
54 |
|
---|
55 | <xsl:param name="generate.section.toc.level" select="5"/>
|
---|
56 | <xsl:param name="component.label.includes.part.label" select="1"/>
|
---|
57 | <xsl:param name="suppress.footer.navigation">0</xsl:param>
|
---|
58 | <xsl:param name="callout.graphics.path"><xsl:value-of select="$webhelp.common.dir"/>images/callouts/</xsl:param>
|
---|
59 | <xsl:param name="callouts.extension">1</xsl:param>
|
---|
60 | <xsl:param name="admon.graphics.path"><xsl:value-of select="$webhelp.common.dir"/>images/admon/</xsl:param>
|
---|
61 | <xsl:param name="admon.graphics" select="0"/>
|
---|
62 | <!--xsl:param name="generate.toc">book toc</xsl:param-->
|
---|
63 |
|
---|
64 | <xsl:param name="generate.toc">
|
---|
65 | appendix toc,title
|
---|
66 | article/appendix nop
|
---|
67 | article toc,title
|
---|
68 | book title,figure,table,example,equation
|
---|
69 | chapter toc,title
|
---|
70 | part toc,title
|
---|
71 | preface toc,title
|
---|
72 | qandadiv toc
|
---|
73 | qandaset toc
|
---|
74 | reference toc,title
|
---|
75 | sect1 toc
|
---|
76 | sect2 toc
|
---|
77 | sect3 toc
|
---|
78 | sect4 toc
|
---|
79 | sect5 toc
|
---|
80 | section toc
|
---|
81 | set toc,title
|
---|
82 | </xsl:param>
|
---|
83 |
|
---|
84 | <!-- Localizations of webhelp specific words. Your contributions for other languages are appreciated.
|
---|
85 | Currently, only around 10 translations needed. -->
|
---|
86 | <!-- Moved to files under 'gentext/locale/', search for WebHelp -->
|
---|
87 |
|
---|
88 | <xsl:template name="user.head.title">
|
---|
89 | <xsl:param name="node" select="."/>
|
---|
90 | <xsl:param name="title">
|
---|
91 | <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
|
---|
92 | </xsl:param>
|
---|
93 | <xsl:param name="document-title">
|
---|
94 | <xsl:apply-templates select="/*" mode="object.title.markup.textonly"/>
|
---|
95 | </xsl:param>
|
---|
96 |
|
---|
97 | <title>
|
---|
98 | <xsl:copy-of select="$title"/> - <xsl:if test="parent::*"> - <xsl:copy-of select="$document-title"/></xsl:if>
|
---|
99 | </title>
|
---|
100 |
|
---|
101 | </xsl:template>
|
---|
102 |
|
---|
103 | <xsl:template name="system.head.content">
|
---|
104 | <xsl:param name="node" select="."/>
|
---|
105 | <xsl:text>
|
---|
106 | </xsl:text>
|
---|
107 | <!--
|
---|
108 | The meta tag tells the IE rendering engine that it should use the latest, or edge, version of the IE rendering environment;It prevents IE from entring compatibility mode.
|
---|
109 | -->
|
---|
110 | <meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
---|
111 | <xsl:text>
|
---|
112 | </xsl:text>
|
---|
113 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
---|
114 | <xsl:text>
|
---|
115 | </xsl:text>
|
---|
116 | </xsl:template>
|
---|
117 |
|
---|
118 | <!-- HTML <head> section customizations -->
|
---|
119 | <xsl:template name="user.head.content">
|
---|
120 | <xsl:param name="title">
|
---|
121 | <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
|
---|
122 | </xsl:param>
|
---|
123 | <meta name="Section-title" content="{$title}"/>
|
---|
124 |
|
---|
125 | <!-- <xsl:message>
|
---|
126 | webhelp.tree.cookie.id = <xsl:value-of select="$webhelp.tree.cookie.id"/> +++ <xsl:value-of select="count(//node())"/>
|
---|
127 | $webhelp.indexer.language = <xsl:value-of select="$webhelp.indexer.language"/> +++ <xsl:value-of select="count(//node())"/>
|
---|
128 | </xsl:message>-->
|
---|
129 | <script type="text/javascript">
|
---|
130 | //The id for tree cookie
|
---|
131 | var treeCookieId = "<xsl:value-of select="$webhelp.tree.cookie.id"/>";
|
---|
132 | var language = "<xsl:value-of select="$webhelp.indexer.language"/>";
|
---|
133 | var w = new Object();
|
---|
134 | //Localization
|
---|
135 | txt_filesfound = '<xsl:call-template name="gentext.template">
|
---|
136 | <xsl:with-param name="name" select="'txt_filesfound'"/>
|
---|
137 | <xsl:with-param name="context" select="'webhelp'"/>
|
---|
138 | </xsl:call-template>';
|
---|
139 | txt_enter_at_least_1_char = "<xsl:call-template name="gentext.template">
|
---|
140 | <xsl:with-param name="name" select="'txt_enter_at_least_1_char'"/>
|
---|
141 | <xsl:with-param name="context" select="'webhelp'"/>
|
---|
142 | </xsl:call-template>";
|
---|
143 | txt_browser_not_supported = "<xsl:call-template name="gentext.template">
|
---|
144 | <xsl:with-param name="name" select="'txt_browser_not_supported'"/>
|
---|
145 | <xsl:with-param name="context" select="'webhelp'"/>
|
---|
146 | </xsl:call-template>";
|
---|
147 | txt_please_wait = "<xsl:call-template name="gentext.template">
|
---|
148 | <xsl:with-param name="name" select="'txt_please_wait'"/>
|
---|
149 | <xsl:with-param name="context" select="'webhelp'"/>
|
---|
150 | </xsl:call-template>";
|
---|
151 | txt_results_for = "<xsl:call-template name="gentext.template">
|
---|
152 | <xsl:with-param name="name" select="'txt_results_for'"/>
|
---|
153 | <xsl:with-param name="context" select="'webhelp'"/>
|
---|
154 | </xsl:call-template>";
|
---|
155 | </script>
|
---|
156 |
|
---|
157 | <!-- kasunbg: Order is important between the in-html-file css and the linked css files. Some css declarations in jquery-ui-1.8.2.custom.css are over-ridden.
|
---|
158 | If that's a concern, just remove the additional css contents inside these default jquery css files. I thought of keeping them intact for easier maintenance! -->
|
---|
159 | <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
|
---|
160 | <link rel="stylesheet" type="text/css" href="{$webhelp.common.dir}css/positioning.css"/>
|
---|
161 | <link rel="stylesheet" type="text/css" href="{$webhelp.common.dir}jquery/theme-redmond/jquery-ui-1.8.2.custom.css"/>
|
---|
162 | <link rel="stylesheet" type="text/css" href="{$webhelp.common.dir}jquery/treeview/jquery.treeview.css"/>
|
---|
163 |
|
---|
164 | <style type="text/css">
|
---|
165 |
|
---|
166 | #noscript{
|
---|
167 | font-weight:bold;
|
---|
168 | background-color: #55AA55;
|
---|
169 | font-weight: bold;
|
---|
170 | height: 25spx;
|
---|
171 | z-index: 3000;
|
---|
172 | top:0px;
|
---|
173 | width:100%;
|
---|
174 | position: relative;
|
---|
175 | border-bottom: solid 5px black;
|
---|
176 | text-align:center;
|
---|
177 | color: white;
|
---|
178 | }
|
---|
179 |
|
---|
180 | input {
|
---|
181 | margin-bottom: 5px;
|
---|
182 | margin-top: 2px;
|
---|
183 | }
|
---|
184 | .folder {
|
---|
185 | display: block;
|
---|
186 | height: 22px;
|
---|
187 | padding-left: 20px;
|
---|
188 | background: transparent url(<xsl:value-of select="$webhelp.common.dir"/>jquery/treeview/images/folder.gif) 0 0px no-repeat;
|
---|
189 | }
|
---|
190 | span.contentsTab {
|
---|
191 | padding-left: 20px;
|
---|
192 | background: url(<xsl:value-of select="$webhelp.common.dir"/>images/toc-icon.png) no-repeat 0 center;
|
---|
193 | }
|
---|
194 | span.searchTab {
|
---|
195 | padding-left: 20px;
|
---|
196 | background: url(<xsl:value-of select="$webhelp.common.dir"/>images/search-icon.png) no-repeat 0 center;
|
---|
197 | }
|
---|
198 |
|
---|
199 | /* Overide jquery treeview's defaults for ul. */
|
---|
200 | .treeview ul {
|
---|
201 | background-color: transparent;
|
---|
202 | margin-top: 4px;
|
---|
203 | }
|
---|
204 | #webhelp-currentid {
|
---|
205 | background-color: #D8D8D8 !important;
|
---|
206 | }
|
---|
207 | .treeview .hover { color: black; }
|
---|
208 | .filetree li span a { text-decoration: none; font-size: 12px; color: #517291; }
|
---|
209 |
|
---|
210 | /* Override jquery-ui's default css customizations. These are supposed to take precedence over those.*/
|
---|
211 | .ui-widget-content {
|
---|
212 | border: 0px;
|
---|
213 | background: none;
|
---|
214 | color: none;
|
---|
215 | }
|
---|
216 | .ui-widget-header {
|
---|
217 | color: #e9e8e9;
|
---|
218 | border-left: 1px solid #e5e5e5;
|
---|
219 | border-right: 1px solid #e5e5e5;
|
---|
220 | border-bottom: 1px solid #bbc4c5;
|
---|
221 | border-top: 4px solid #e5e5e5;
|
---|
222 | border: medium none;
|
---|
223 | background: #F4F4F4; /* old browsers */
|
---|
224 | background: -moz-linear-gradient(top, #F4F4F4 0%, #E6E4E5 100%); /* firefox */
|
---|
225 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F4F4F4), color-stop(100%,#E6E4E5)); /* webkit */
|
---|
226 | font-weight: none;
|
---|
227 | }
|
---|
228 | .ui-widget-header a { color: none; }
|
---|
229 | .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
|
---|
230 | border: none; background: none; font-weight: none; color: none; }
|
---|
231 | .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: black; text-decoration: none; }
|
---|
232 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: none; background: none; font-weight: none; color: none; }
|
---|
233 |
|
---|
234 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: none; background: none; font-weight: none; color: none; }
|
---|
235 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {
|
---|
236 | color: black; text-decoration: none;
|
---|
237 | background: #C6C6C6; /* old browsers */
|
---|
238 | background: -moz-linear-gradient(top, #C6C6C6 0%, #D8D8D8 100%); /* firefox */
|
---|
239 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#C6C6C6), color-stop(100%,#D8D8D8)); /* webkit */
|
---|
240 | -webkit-border-radius:15px; -moz-border-radius:10px;
|
---|
241 | border: 1px solid #f1f1f1;
|
---|
242 | }
|
---|
243 | .ui-corner-all { border-radius: 0 0 0 0; }
|
---|
244 |
|
---|
245 | .ui-tabs { padding: .2em;}
|
---|
246 | .ui-tabs .ui-tabs-nav li { top: 0px; margin: -2px 0 1px; text-transform: uppercase; font-size: 10.5px;}
|
---|
247 | .ui-tabs .ui-tabs-nav li a { padding: .25em 2em .25em 1em; margin: .5em; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
|
---|
248 | /**
|
---|
249 | * Basic Layout Theme
|
---|
250 | *
|
---|
251 | * This theme uses the default layout class-names for all classes
|
---|
252 | * Add any 'custom class-names', from options: paneClass, resizerClass, togglerClass
|
---|
253 | */
|
---|
254 |
|
---|
255 | .ui-layout-pane { /* all 'panes' */
|
---|
256 | background: #FFF;
|
---|
257 | border: 1px solid #BBB;
|
---|
258 | padding: 05x;
|
---|
259 | overflow: auto;
|
---|
260 | }
|
---|
261 |
|
---|
262 | .ui-layout-resizer { /* all 'resizer-bars' */
|
---|
263 | background: #DDD;
|
---|
264 | top:100px
|
---|
265 | }
|
---|
266 |
|
---|
267 | .ui-layout-toggler { /* all 'toggler-buttons' */
|
---|
268 | background: #AAA;
|
---|
269 | }
|
---|
270 |
|
---|
271 | </style>
|
---|
272 | <xsl:comment><xsl:text>[if IE]>
|
---|
273 | <link rel="stylesheet" type="text/css" href="../common/css/ie.css"/>
|
---|
274 | <![endif]</xsl:text></xsl:comment>
|
---|
275 |
|
---|
276 | <!--
|
---|
277 | browserDetect is an Oxygen addition to warn the user if they're using chrome from the file system.
|
---|
278 | This breaks the Oxygen search highlighting.
|
---|
279 | -->
|
---|
280 | <script type="text/javascript" src="{$webhelp.common.dir}browserDetect.js">
|
---|
281 | <xsl:comment> </xsl:comment>
|
---|
282 | </script>
|
---|
283 | <script type="text/javascript" src="{$webhelp.common.dir}jquery/jquery-1.7.2.min.js">
|
---|
284 | <xsl:comment> </xsl:comment>
|
---|
285 | </script>
|
---|
286 | <script type="text/javascript" src="{$webhelp.common.dir}jquery/jquery.ui.all.js">
|
---|
287 | <xsl:comment> </xsl:comment>
|
---|
288 | </script>
|
---|
289 | <script type="text/javascript" src="{$webhelp.common.dir}jquery/jquery.cookie.js">
|
---|
290 | <xsl:comment> </xsl:comment>
|
---|
291 | </script>
|
---|
292 | <script type="text/javascript" src="{$webhelp.common.dir}jquery/treeview/jquery.treeview.min.js">
|
---|
293 | <xsl:comment> </xsl:comment>
|
---|
294 | </script>
|
---|
295 | <script type="text/javascript" src="{$webhelp.common.dir}jquery/layout/jquery.layout.js">
|
---|
296 | <xsl:comment> </xsl:comment>
|
---|
297 | </script>
|
---|
298 | <xsl:if test="$webhelp.include.search.tab != '0'">
|
---|
299 | <!--Scripts/css stylesheets for Search-->
|
---|
300 | <!-- TODO: Why THREE files? There's absolutely no need for having separate files.
|
---|
301 | These should have been identified at the optimization phase! -->
|
---|
302 | <script type="text/javascript" src="search/l10n.js">
|
---|
303 | <xsl:comment/>
|
---|
304 | </script>
|
---|
305 | <script type="text/javascript" src="search/htmlFileInfoList.js">
|
---|
306 | <xsl:comment> </xsl:comment>
|
---|
307 | </script>
|
---|
308 | <script type="text/javascript" src="search/nwSearchFnt.js">
|
---|
309 | <xsl:comment> </xsl:comment>
|
---|
310 | </script>
|
---|
311 |
|
---|
312 | <!--
|
---|
313 | NOTE: Stemmer javascript files should be in format <language>_stemmer.js.
|
---|
314 | For example, for English(en), source should be: "search/stemmers/en_stemmer.js"
|
---|
315 | For country codes, see: http://www.uspto.gov/patft/help/helpctry.htm
|
---|
316 | -->
|
---|
317 | <!--<xsl:message><xsl:value-of select="concat('search/stemmers/',$webhelp.indexer.language,'_stemmer.js')"/></xsl:message>-->
|
---|
318 | <script type="text/javascript" src="{concat('search/stemmers/',$webhelp.indexer.language,'_stemmer.js')}">
|
---|
319 | <xsl:comment>//make this scalable to other languages as well.</xsl:comment>
|
---|
320 | </script>
|
---|
321 |
|
---|
322 | <!--Index Files:
|
---|
323 | Index is broken in to three equal sized(number of index items) files. This is to help parallel downloading
|
---|
324 | of files to make it faster.
|
---|
325 | TODO: Generate webhelp index for largest docbook document that can be find, and analyze the file sizes.
|
---|
326 | IF the file size is still around ~50KB for a given file, we should consider merging these files together. again.
|
---|
327 | -->
|
---|
328 | <script type="text/javascript" src="search/index-1.js">
|
---|
329 | <xsl:comment> </xsl:comment>
|
---|
330 | </script>
|
---|
331 | <script type="text/javascript" src="search/index-2.js">
|
---|
332 | <xsl:comment> </xsl:comment>
|
---|
333 | </script>
|
---|
334 | <script type="text/javascript" src="search/index-3.js">
|
---|
335 | <xsl:comment> </xsl:comment>
|
---|
336 | </script>
|
---|
337 | <!--End of index files -->
|
---|
338 | </xsl:if>
|
---|
339 | <xsl:call-template name="user.webhelp.head.content"/>
|
---|
340 | </xsl:template>
|
---|
341 |
|
---|
342 | <!-- This is for the USERS. Users who want to customize webhelp may over-ride this template to add content to <head>. -->
|
---|
343 | <xsl:template name="user.webhelp.head.content"/>
|
---|
344 |
|
---|
345 | <xsl:template name="user.header.navigation">
|
---|
346 | <xsl:param name="prev"/>
|
---|
347 | <xsl:param name="next"/>
|
---|
348 | <xsl:param name="nav.context"/>
|
---|
349 | <xsl:call-template name="webhelpheader">
|
---|
350 | <xsl:with-param name="prev" select="$prev"/>
|
---|
351 | <xsl:with-param name="next" select="$next"/>
|
---|
352 | <xsl:with-param name="nav.context" select="$nav.context"/>
|
---|
353 | </xsl:call-template>
|
---|
354 | <!--xsl:call-template name="webhelptoc"/-->
|
---|
355 |
|
---|
356 | <!--testing toc in the content page>
|
---|
357 | <xsl:call-template name="webhelptoctoc"/>
|
---|
358 | <xsl:if test="$webhelp.include.search.tab != '0'">
|
---|
359 | <xsl:call-template name="search"/>
|
---|
360 | </xsl:if-->
|
---|
361 | </xsl:template>
|
---|
362 |
|
---|
363 | <xsl:template name="user.header.content">
|
---|
364 | <xsl:comment> <!-- KEEP this code. --> </xsl:comment>
|
---|
365 | </xsl:template>
|
---|
366 |
|
---|
367 | <xsl:template name="user.footer.navigation">
|
---|
368 | <xsl:call-template name="webhelptoc">
|
---|
369 | <xsl:with-param name="currentid" select="generate-id(.)"/>
|
---|
370 | </xsl:call-template>
|
---|
371 | </xsl:template>
|
---|
372 |
|
---|
373 | <xsl:template match="/">
|
---|
374 | <xsl:message>language: <xsl:value-of select="$webhelp.indexer.language"/> </xsl:message>
|
---|
375 | <!-- * Get a title for current doc so that we let the user -->
|
---|
376 | <!-- * know what document we are processing at this point. -->
|
---|
377 | <xsl:choose>
|
---|
378 | <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
|
---|
379 | toss the namespace and continue. Use the docbook5 namespaced
|
---|
380 | stylesheets for DocBook5 if you don't want to use this feature.-->
|
---|
381 | <!-- include extra test for Xalan quirk -->
|
---|
382 | <xsl:when test="$exsl.node.set.available != 0 and (*/self::ng:* or */self::db:*)">
|
---|
383 | <xsl:call-template name="log.message">
|
---|
384 | <xsl:with-param name="level">Note</xsl:with-param>
|
---|
385 | <xsl:with-param name="source" select="$doc.title"/>
|
---|
386 | <xsl:with-param name="context-desc">
|
---|
387 | <xsl:text>namesp. cut</xsl:text>
|
---|
388 | </xsl:with-param>
|
---|
389 | <xsl:with-param name="message">
|
---|
390 | <xsl:text>stripped namespace before processing</xsl:text>
|
---|
391 | </xsl:with-param>
|
---|
392 | </xsl:call-template>
|
---|
393 | <xsl:variable name="nons">
|
---|
394 | <xsl:apply-templates mode="stripNS"/>
|
---|
395 | </xsl:variable>
|
---|
396 | <!--
|
---|
397 | <xsl:message>Saving stripped document.</xsl:message>
|
---|
398 | <xsl:call-template name="write.chunk">
|
---|
399 | <xsl:with-param name="filename" select="'/tmp/stripped.xml'"/>
|
---|
400 | <xsl:with-param name="method" select="'xml'"/>
|
---|
401 | <xsl:with-param name="content">
|
---|
402 | <xsl:copy-of select="exsl:node-set($nons)"/>
|
---|
403 | </xsl:with-param>
|
---|
404 | </xsl:call-template>
|
---|
405 | -->
|
---|
406 | <xsl:call-template name="log.message">
|
---|
407 | <xsl:with-param name="level">Note</xsl:with-param>
|
---|
408 | <xsl:with-param name="source" select="$doc.title"/>
|
---|
409 | <xsl:with-param name="context-desc">
|
---|
410 | <xsl:text>namesp. cut</xsl:text>
|
---|
411 | </xsl:with-param>
|
---|
412 | <xsl:with-param name="message">
|
---|
413 | <xsl:text>processing stripped document</xsl:text>
|
---|
414 | </xsl:with-param>
|
---|
415 | </xsl:call-template>
|
---|
416 | <xsl:apply-templates select="exsl:node-set($nons)"/>
|
---|
417 | </xsl:when>
|
---|
418 | <!-- Can't process unless namespace removed -->
|
---|
419 | <xsl:when test="*/self::ng:* or */self::db:*">
|
---|
420 | <xsl:message terminate="yes">
|
---|
421 | <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
|
---|
422 | <xsl:text> cannot proceed.</xsl:text>
|
---|
423 | </xsl:message>
|
---|
424 | </xsl:when>
|
---|
425 | <xsl:otherwise>
|
---|
426 | <xsl:choose>
|
---|
427 | <xsl:when test="$rootid != ''">
|
---|
428 | <xsl:choose>
|
---|
429 | <xsl:when test="count(key('id',$rootid)) = 0">
|
---|
430 | <xsl:message terminate="yes">
|
---|
431 | <xsl:text>ID '</xsl:text>
|
---|
432 | <xsl:value-of select="$rootid"/>
|
---|
433 | <xsl:text>' not found in document.</xsl:text>
|
---|
434 | </xsl:message>
|
---|
435 | </xsl:when>
|
---|
436 | <xsl:otherwise>
|
---|
437 | <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'">
|
---|
438 | <xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/>
|
---|
439 | </xsl:if>
|
---|
440 | <xsl:if test="$collect.xref.targets != 'only'">
|
---|
441 | <xsl:apply-templates select="key('id',$rootid)" mode="process.root"/>
|
---|
442 | <xsl:if test="$tex.math.in.alt != ''">
|
---|
443 | <xsl:apply-templates select="key('id',$rootid)" mode="collect.tex.math"/>
|
---|
444 | </xsl:if>
|
---|
445 | </xsl:if>
|
---|
446 | </xsl:otherwise>
|
---|
447 | </xsl:choose>
|
---|
448 | </xsl:when>
|
---|
449 | <xsl:otherwise>
|
---|
450 | <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'">
|
---|
451 | <xsl:apply-templates select="/" mode="collect.targets"/>
|
---|
452 | </xsl:if>
|
---|
453 | <xsl:if test="$collect.xref.targets != 'only'">
|
---|
454 | <xsl:apply-templates select="/" mode="process.root"/>
|
---|
455 | <xsl:if test="$tex.math.in.alt != ''">
|
---|
456 | <xsl:apply-templates select="/" mode="collect.tex.math"/>
|
---|
457 | </xsl:if>
|
---|
458 | </xsl:if>
|
---|
459 | </xsl:otherwise>
|
---|
460 | </xsl:choose>
|
---|
461 | </xsl:otherwise>
|
---|
462 | </xsl:choose>
|
---|
463 |
|
---|
464 |
|
---|
465 | <xsl:call-template name="l10n.js"/>
|
---|
466 | </xsl:template>
|
---|
467 |
|
---|
468 |
|
---|
469 | <!-- The WebHelp output structure. similar to main() method.
|
---|
470 | basic format:
|
---|
471 | <html>
|
---|
472 | <head> calls-appropriate-template </head>
|
---|
473 | <body>
|
---|
474 | some-generic-content
|
---|
475 | <div id="content">
|
---|
476 | All your docbook document content goes here
|
---|
477 | ....
|
---|
478 | </div>
|
---|
479 | some-other-generic-content-at-footer
|
---|
480 | </body>
|
---|
481 | </html>
|
---|
482 | -->
|
---|
483 | <xsl:template name="chunk-element-content">
|
---|
484 | <xsl:param name="prev"/>
|
---|
485 | <xsl:param name="next"/>
|
---|
486 | <xsl:param name="nav.context"/>
|
---|
487 | <xsl:param name="content">
|
---|
488 | <xsl:apply-imports/>
|
---|
489 | </xsl:param>
|
---|
490 |
|
---|
491 | <xsl:call-template name="user.preroot"/>
|
---|
492 |
|
---|
493 | <html>
|
---|
494 | <xsl:call-template name="html.head">
|
---|
495 | <xsl:with-param name="prev" select="$prev"/>
|
---|
496 | <xsl:with-param name="next" select="$next"/>
|
---|
497 | </xsl:call-template>
|
---|
498 |
|
---|
499 | <body>
|
---|
500 | <noscript>
|
---|
501 | <div id="noscript">
|
---|
502 |
|
---|
503 | <xsl:call-template name="gentext.template">
|
---|
504 | <xsl:with-param name="name" select="'txt_browser_not_supported'"/>
|
---|
505 | <xsl:with-param name="context" select="'webhelp'"/>
|
---|
506 | </xsl:call-template>
|
---|
507 |
|
---|
508 | </div>
|
---|
509 | </noscript>
|
---|
510 |
|
---|
511 | <xsl:call-template name="body.attributes"/>
|
---|
512 |
|
---|
513 | <xsl:call-template name="user.header.navigation">
|
---|
514 | <xsl:with-param name="prev" select="$prev"/>
|
---|
515 | <xsl:with-param name="next" select="$next"/>
|
---|
516 | <xsl:with-param name="nav.context" select="$nav.context"/>
|
---|
517 | </xsl:call-template>
|
---|
518 |
|
---|
519 | <div id="content">
|
---|
520 |
|
---|
521 | <xsl:call-template name="user.header.content"/>
|
---|
522 |
|
---|
523 | <xsl:copy-of select="$content"/>
|
---|
524 |
|
---|
525 | <xsl:call-template name="user.footer.content"/>
|
---|
526 |
|
---|
527 | <!-- Redundant since the upper navigation bar always visible -->
|
---|
528 | <xsl:call-template name="footer.navigation">
|
---|
529 | <xsl:with-param name="prev" select="$prev"/>
|
---|
530 | <xsl:with-param name="next" select="$next"/>
|
---|
531 | <xsl:with-param name="nav.context" select="$nav.context"/>
|
---|
532 | </xsl:call-template>
|
---|
533 |
|
---|
534 | <xsl:call-template name="user.webhelp.content.footer"/>
|
---|
535 | </div>
|
---|
536 |
|
---|
537 | <xsl:call-template name="user.footer.navigation"/>
|
---|
538 | </body>
|
---|
539 | </html>
|
---|
540 | <xsl:value-of select="$chunk.append"/>
|
---|
541 | </xsl:template>
|
---|
542 |
|
---|
543 | <!-- This is for the USERS. Users who want to customize webhelp may over-ride this template to add content to the footer of the content DIV.
|
---|
544 | i.e. within <div id="content"> ... </div> -->
|
---|
545 | <xsl:template name="user.webhelp.content.footer"/>
|
---|
546 |
|
---|
547 | <!-- The Header with the company logo -->
|
---|
548 | <xsl:template name="webhelpheader">
|
---|
549 | <xsl:param name="prev"/>
|
---|
550 | <xsl:param name="next"/>
|
---|
551 | <xsl:param name="nav.context"/>
|
---|
552 |
|
---|
553 | <xsl:variable name="home" select="/*[1]"/>
|
---|
554 | <xsl:variable name="up" select="parent::*"/>
|
---|
555 |
|
---|
556 | <div id="header">
|
---|
557 | <xsl:call-template name="webhelpheader.logo"/>
|
---|
558 | <!-- Display the page title and the main heading(parent) of it-->
|
---|
559 | <h1>
|
---|
560 | <xsl:apply-templates select="/*[1]" mode="title.markup"/>
|
---|
561 | <br/>
|
---|
562 | <xsl:choose>
|
---|
563 | <xsl:when
|
---|
564 | test="count($up) > 0 and generate-id($up) != generate-id($home)">
|
---|
565 | <xsl:apply-templates select="$up" mode="object.title.markup"/>
|
---|
566 | </xsl:when>
|
---|
567 | <xsl:when test="not(generate-id(.) = generate-id(/*))">
|
---|
568 | <xsl:apply-templates select="." mode="object.title.markup"/>
|
---|
569 | </xsl:when>
|
---|
570 | <xsl:otherwise> </xsl:otherwise>
|
---|
571 | </xsl:choose>
|
---|
572 | </h1>
|
---|
573 | <!-- Prev and Next links generation-->
|
---|
574 | <div id="navheader">
|
---|
575 | <xsl:call-template name="user.webhelp.navheader.content"/>
|
---|
576 | <xsl:comment>
|
---|
577 | <!-- KEEP this code. In case of neither prev nor next links are available, this will help to
|
---|
578 | keep the integrity of the DOM tree-->
|
---|
579 | </xsl:comment>
|
---|
580 | <!--xsl:with-param name="prev" select="$prev"/>
|
---|
581 | <xsl:with-param name="next" select="$next"/>
|
---|
582 | <xsl:with-param name="nav.context" select="$nav.context"/-->
|
---|
583 | <table class="navLinks">
|
---|
584 | <tr>
|
---|
585 | <td>
|
---|
586 | <a id="showHideButton" href="#" onclick="myLayout.toggle('west')"
|
---|
587 | class="pointLeft" tabindex="5" title="Hide TOC tree">Sidebar
|
---|
588 | </a>
|
---|
589 | </td>
|
---|
590 | <xsl:if test="count($prev) > 0
|
---|
591 | or (count($up) > 0
|
---|
592 | and generate-id($up) != generate-id($home)
|
---|
593 | and $navig.showtitles != 0)
|
---|
594 | or count($next) > 0">
|
---|
595 | <td>
|
---|
596 | <xsl:if test="count($prev)>0">
|
---|
597 | <a accesskey="p" class="navLinkPrevious" tabindex="5">
|
---|
598 | <xsl:attribute name="href">
|
---|
599 | <xsl:call-template name="href.target">
|
---|
600 | <xsl:with-param name="object" select="$prev"/>
|
---|
601 | </xsl:call-template>
|
---|
602 | </xsl:attribute>
|
---|
603 | <xsl:call-template name="navig.content">
|
---|
604 | <xsl:with-param name="direction" select="'prev'"/>
|
---|
605 | </xsl:call-template>
|
---|
606 | </a>
|
---|
607 | </xsl:if>
|
---|
608 |
|
---|
609 | <!-- "Up" link-->
|
---|
610 | <xsl:choose>
|
---|
611 | <xsl:when test="count($up)>0
|
---|
612 | and generate-id($up) != generate-id($home)">
|
---|
613 | |
|
---|
614 | <a accesskey="u" class="navLinkUp" tabindex="5">
|
---|
615 | <xsl:attribute name="href">
|
---|
616 | <xsl:call-template name="href.target">
|
---|
617 | <xsl:with-param name="object" select="$up"/>
|
---|
618 | </xsl:call-template>
|
---|
619 | </xsl:attribute>
|
---|
620 | <xsl:call-template name="navig.content">
|
---|
621 | <xsl:with-param name="direction" select="'up'"/>
|
---|
622 | </xsl:call-template>
|
---|
623 | </a>
|
---|
624 | </xsl:when>
|
---|
625 | <xsl:otherwise> </xsl:otherwise>
|
---|
626 | </xsl:choose>
|
---|
627 |
|
---|
628 | <xsl:if test="count($next)>0">
|
---|
629 | |
|
---|
630 | <a accesskey="n" class="navLinkNext" tabindex="5">
|
---|
631 | <xsl:attribute name="href">
|
---|
632 | <xsl:call-template name="href.target">
|
---|
633 | <xsl:with-param name="object" select="$next"/>
|
---|
634 | </xsl:call-template>
|
---|
635 | </xsl:attribute>
|
---|
636 | <xsl:call-template name="navig.content">
|
---|
637 | <xsl:with-param name="direction" select="'next'"/>
|
---|
638 | </xsl:call-template>
|
---|
639 | </a>
|
---|
640 | </xsl:if>
|
---|
641 | </td>
|
---|
642 | </xsl:if>
|
---|
643 | </tr>
|
---|
644 | </table>
|
---|
645 | </div>
|
---|
646 | </div>
|
---|
647 | </xsl:template>
|
---|
648 |
|
---|
649 | <xsl:template name="webhelpheader.logo">
|
---|
650 | <a href="index.html">
|
---|
651 | <img style='margin-right: 2px; height: 59px; padding-right: 25px; padding-top: 8px' align="right"
|
---|
652 | src='{$webhelp.common.dir}images/logo.png' alt="{$brandname} Documentation"/>
|
---|
653 | </a>
|
---|
654 | </xsl:template>
|
---|
655 |
|
---|
656 | <xsl:template name="user.webhelp.navheader.content"/>
|
---|
657 |
|
---|
658 | <xsl:template name="webhelptoc">
|
---|
659 | <xsl:param name="currentid"/>
|
---|
660 | <xsl:choose>
|
---|
661 | <xsl:when test="$rootid != ''">
|
---|
662 | <xsl:variable name="title">
|
---|
663 | <xsl:if test="$webhelp.autolabel=1">
|
---|
664 | <xsl:variable name="label.markup">
|
---|
665 | <xsl:apply-templates select="key('id',$rootid)" mode="label.markup"/>
|
---|
666 | </xsl:variable>
|
---|
667 | <xsl:if test="normalize-space($label.markup)">
|
---|
668 | <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
|
---|
669 | </xsl:if>
|
---|
670 | </xsl:if>
|
---|
671 | <xsl:apply-templates select="key('id',$rootid)" mode="titleabbrev.markup"/>
|
---|
672 | </xsl:variable>
|
---|
673 | <xsl:variable name="href">
|
---|
674 | <xsl:choose>
|
---|
675 | <xsl:when test="$manifest.in.base.dir != 0">
|
---|
676 | <xsl:call-template name="href.target">
|
---|
677 | <xsl:with-param name="object" select="key('id',$rootid)"/>
|
---|
678 | </xsl:call-template>
|
---|
679 | </xsl:when>
|
---|
680 | <xsl:otherwise>
|
---|
681 | <xsl:call-template name="href.target.with.base.dir">
|
---|
682 | <xsl:with-param name="object" select="key('id',$rootid)"/>
|
---|
683 | </xsl:call-template>
|
---|
684 | </xsl:otherwise>
|
---|
685 | </xsl:choose>
|
---|
686 | </xsl:variable>
|
---|
687 | </xsl:when>
|
---|
688 |
|
---|
689 | <xsl:otherwise>
|
---|
690 | <xsl:variable name="title">
|
---|
691 | <xsl:if test="$webhelp.autolabel=1">
|
---|
692 | <xsl:variable name="label.markup">
|
---|
693 | <xsl:apply-templates select="/*" mode="label.markup"/>
|
---|
694 | </xsl:variable>
|
---|
695 | <xsl:if test="normalize-space($label.markup)">
|
---|
696 | <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
|
---|
697 | </xsl:if>
|
---|
698 | </xsl:if>
|
---|
699 | <xsl:apply-templates select="/*" mode="titleabbrev.markup"/>
|
---|
700 | </xsl:variable>
|
---|
701 | <xsl:variable name="href">
|
---|
702 | <xsl:choose>
|
---|
703 | <xsl:when test="$manifest.in.base.dir != 0">
|
---|
704 | <xsl:call-template name="href.target">
|
---|
705 | <xsl:with-param name="object" select="/"/>
|
---|
706 | </xsl:call-template>
|
---|
707 | </xsl:when>
|
---|
708 | <xsl:otherwise>
|
---|
709 | <xsl:call-template name="href.target.with.base.dir">
|
---|
710 | <xsl:with-param name="object" select="/"/>
|
---|
711 | </xsl:call-template>
|
---|
712 | </xsl:otherwise>
|
---|
713 | </xsl:choose>
|
---|
714 | </xsl:variable>
|
---|
715 |
|
---|
716 | <div id="sidebar"> <!--#sidebar id is used for showing and hiding the side bar -->
|
---|
717 | <div id="leftnavigation" style="padding-top:3px;">
|
---|
718 | <div id="tabs">
|
---|
719 | <ul>
|
---|
720 | <li>
|
---|
721 | <a href="#treeDiv" style="outline:0;" tabindex="1">
|
---|
722 | <span class="contentsTab">
|
---|
723 | <xsl:call-template name="gentext.template">
|
---|
724 | <xsl:with-param name="name" select="'TableofContents'"/>
|
---|
725 | <xsl:with-param name="context" select="'webhelp'"/>
|
---|
726 | </xsl:call-template>
|
---|
727 | </span>
|
---|
728 | </a>
|
---|
729 | </li>
|
---|
730 | <xsl:if test="$webhelp.include.search.tab != '0'">
|
---|
731 | <li>
|
---|
732 | <a href="#searchDiv" style="outline:0;" tabindex="1" onclick="doSearch()">
|
---|
733 | <span class="searchTab">
|
---|
734 | <xsl:call-template name="gentext.template">
|
---|
735 | <xsl:with-param name="name" select="'Search'"/>
|
---|
736 | <xsl:with-param name="context" select="'webhelp'"/>
|
---|
737 | </xsl:call-template>
|
---|
738 | </span>
|
---|
739 | </a>
|
---|
740 | </li>
|
---|
741 | </xsl:if>
|
---|
742 | <xsl:call-template name="user.webhelp.tabs.title"/>
|
---|
743 | </ul>
|
---|
744 | <div id="treeDiv">
|
---|
745 | <img src="{$webhelp.common.dir}images/loading.gif" alt="loading table of contents..."
|
---|
746 | id="tocLoading" style="display:block;"/>
|
---|
747 | <div id="ulTreeDiv" style="display:none">
|
---|
748 | <ul id="tree" class="filetree">
|
---|
749 | <xsl:apply-templates select="/*/*" mode="webhelptoc">
|
---|
750 | <xsl:with-param name="currentid" select="$currentid"/>
|
---|
751 | </xsl:apply-templates>
|
---|
752 | </ul>
|
---|
753 | </div>
|
---|
754 |
|
---|
755 | </div>
|
---|
756 | <xsl:if test="$webhelp.include.search.tab != '0'">
|
---|
757 | <div id="searchDiv">
|
---|
758 | <div id="search">
|
---|
759 | <form onsubmit="Verifie(searchForm);return false"
|
---|
760 | name="searchForm" class="searchForm">
|
---|
761 | <div>
|
---|
762 |
|
---|
763 | <!-- <xsl:call-template name="gentext.template">
|
---|
764 | <xsl:with-param name="name" select="'Search'"/>
|
---|
765 | <xsl:with-param name="context" select="'webhelp'"/>
|
---|
766 | </xsl:call-template>-->
|
---|
767 |
|
---|
768 |
|
---|
769 | <input id="textToSearch" name="textToSearch" type="search" placeholder="Search"
|
---|
770 | class="searchText" tabindex="1"/>
|
---|
771 | <xsl:text disable-output-escaping="yes"> <![CDATA[ ]]> </xsl:text>
|
---|
772 | <input onclick="Verifie(searchForm)" type="button"
|
---|
773 | class="searchButton"
|
---|
774 | value="Go" id="doSearch" tabindex="1"/>
|
---|
775 |
|
---|
776 | </div>
|
---|
777 | </form>
|
---|
778 | </div>
|
---|
779 | <div id="searchResults">
|
---|
780 | <center> </center>
|
---|
781 | </div>
|
---|
782 | <p class="searchHighlight"><a href="#" onclick="toggleHighlight()">Search Highlighter (On/Off)</a></p>
|
---|
783 | </div>
|
---|
784 | </xsl:if>
|
---|
785 | <xsl:call-template name="user.webhelp.tabs.content"/>
|
---|
786 | </div>
|
---|
787 | </div>
|
---|
788 | </div>
|
---|
789 | </xsl:otherwise>
|
---|
790 | </xsl:choose>
|
---|
791 | </xsl:template>
|
---|
792 |
|
---|
793 | <!-- Hooks for adding customs tabs -->
|
---|
794 | <xsl:template name="user.webhelp.tabs.title"/>
|
---|
795 | <xsl:template name="user.webhelp.tabs.content"/>
|
---|
796 |
|
---|
797 | <!-- Generates the webhelp table-of-contents (TOC). -->
|
---|
798 | <xsl:template
|
---|
799 | match="book|part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv|index|setindex"
|
---|
800 | mode="webhelptoc">
|
---|
801 | <xsl:param name="currentid"/>
|
---|
802 | <xsl:variable name="title">
|
---|
803 | <xsl:if test="$webhelp.autolabel=1">
|
---|
804 | <xsl:variable name="label.markup">
|
---|
805 | <xsl:apply-templates select="." mode="label.markup"/>
|
---|
806 | </xsl:variable>
|
---|
807 | <xsl:if test="normalize-space($label.markup)">
|
---|
808 | <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
|
---|
809 | </xsl:if>
|
---|
810 | </xsl:if>
|
---|
811 | <xsl:apply-templates select="." mode="titleabbrev.markup"/>
|
---|
812 | </xsl:variable>
|
---|
813 |
|
---|
814 | <xsl:variable name="href">
|
---|
815 | <xsl:choose>
|
---|
816 | <xsl:when test="$manifest.in.base.dir != 0">
|
---|
817 | <xsl:call-template name="href.target"/>
|
---|
818 | </xsl:when>
|
---|
819 | <xsl:otherwise>
|
---|
820 | <xsl:call-template name="href.target.with.base.dir"/>
|
---|
821 | </xsl:otherwise>
|
---|
822 | </xsl:choose>
|
---|
823 | </xsl:variable>
|
---|
824 |
|
---|
825 | <xsl:variable name="id" select="generate-id(.)"/>
|
---|
826 |
|
---|
827 | <xsl:if test="not(self::index) or (self::index and not($generate.index = 0))">
|
---|
828 | <!--li style="white-space: pre; line-height: 0em;"-->
|
---|
829 | <li>
|
---|
830 | <xsl:if test="$id = $currentid">
|
---|
831 | <xsl:attribute name="id">webhelp-currentid</xsl:attribute>
|
---|
832 | </xsl:if>
|
---|
833 | <span class="file">
|
---|
834 | <a href="{substring-after($href, $base.dir)}" tabindex="1">
|
---|
835 | <xsl:value-of select="$title"/>
|
---|
836 | </a>
|
---|
837 | </span>
|
---|
838 | <xsl:if test="part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv">
|
---|
839 | <ul>
|
---|
840 | <xsl:apply-templates
|
---|
841 | select="part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv"
|
---|
842 | mode="webhelptoc">
|
---|
843 | <xsl:with-param name="currentid" select="$currentid"/>
|
---|
844 | </xsl:apply-templates>
|
---|
845 | </ul>
|
---|
846 | </xsl:if>
|
---|
847 | </li>
|
---|
848 | </xsl:if>
|
---|
849 | </xsl:template>
|
---|
850 |
|
---|
851 | <xsl:template match="text()" mode="webhelptoc"/>
|
---|
852 |
|
---|
853 | <xsl:template name="user.footer.content">
|
---|
854 | <script type="text/javascript" src="{$webhelp.common.dir}main.js">
|
---|
855 | <xsl:comment> </xsl:comment>
|
---|
856 | </script>
|
---|
857 | <script type="text/javascript" src="{$webhelp.common.dir}splitterInit.js">
|
---|
858 | <xsl:comment> </xsl:comment>
|
---|
859 | </script>
|
---|
860 | </xsl:template>
|
---|
861 |
|
---|
862 | <!-- Generates index.html file at docs/. This is simply a redirection to content/$default.topic -->
|
---|
863 | <xsl:template name="index.html">
|
---|
864 | <xsl:variable name="default.topic">
|
---|
865 | <xsl:choose>
|
---|
866 | <xsl:when test="$webhelp.default.topic != ''">
|
---|
867 | <xsl:value-of select="$webhelp.default.topic"/>
|
---|
868 | </xsl:when>
|
---|
869 | <xsl:when test="$htmlhelp.default.topic != ''">
|
---|
870 | <xsl:value-of select="$htmlhelp.default.topic"/>
|
---|
871 | </xsl:when>
|
---|
872 | <xsl:otherwise>
|
---|
873 | <xsl:call-template name="make-relative-filename">
|
---|
874 | <xsl:with-param name="base.dir"/>
|
---|
875 | <xsl:with-param name="base.name">
|
---|
876 | <xsl:choose>
|
---|
877 | <xsl:when test="$rootid != ''">
|
---|
878 | <xsl:apply-templates select="key('id',$rootid)" mode="chunk-filename"/>
|
---|
879 | </xsl:when>
|
---|
880 | <xsl:otherwise>
|
---|
881 | <xsl:apply-templates
|
---|
882 | select="*/*[self::preface|self::chapter|self::appendix|self::part][1]"
|
---|
883 | mode="chunk-filename"/>
|
---|
884 | </xsl:otherwise>
|
---|
885 | </xsl:choose>
|
---|
886 | </xsl:with-param>
|
---|
887 | </xsl:call-template>
|
---|
888 | </xsl:otherwise>
|
---|
889 | </xsl:choose>
|
---|
890 | </xsl:variable>
|
---|
891 | <xsl:call-template name="write.chunk">
|
---|
892 | <xsl:with-param name="filename">
|
---|
893 | <!-- <xsl:if test="$manifest.in.base.dir != 0"> -->
|
---|
894 | <!-- <xsl:value-of select="$base.dir"/> -->
|
---|
895 | <!-- </xsl:if> -->
|
---|
896 | <xsl:choose>
|
---|
897 | <xsl:when test="$webhelp.start.filename">
|
---|
898 | <xsl:value-of select="concat($webhelp.base.dir,'/',$webhelp.start.filename)"/>
|
---|
899 | </xsl:when>
|
---|
900 | <xsl:otherwise>
|
---|
901 | <xsl:value-of select="'index.html'"/>
|
---|
902 | </xsl:otherwise>
|
---|
903 | </xsl:choose>
|
---|
904 | </xsl:with-param>
|
---|
905 | <xsl:with-param name="method" select="'xml'"/>
|
---|
906 | <xsl:with-param name="encoding" select="'utf-8'"/>
|
---|
907 | <xsl:with-param name="indent" select="'yes'"/>
|
---|
908 | <xsl:with-param name="content">
|
---|
909 | <html>
|
---|
910 | <head>
|
---|
911 | <link rel="shortcut icon" href="favicon.ico"/>
|
---|
912 | <meta http-equiv="Refresh" content="1; URL=content/{$default.topic}"/>
|
---|
913 | <title><xsl:value-of select="//title[1]"/> </title>
|
---|
914 | </head>
|
---|
915 | <body>
|
---|
916 | If not automatically redirected, click <a href="content/{$default.topic}">content/<xsl:value-of select="$default.topic"/></a>
|
---|
917 | </body>
|
---|
918 | </html>
|
---|
919 | </xsl:with-param>
|
---|
920 | </xsl:call-template>
|
---|
921 | </xsl:template>
|
---|
922 |
|
---|
923 | <xsl:template name="l10n.js">
|
---|
924 | <xsl:call-template name="write.chunk">
|
---|
925 | <xsl:with-param name="filename">
|
---|
926 | <xsl:value-of select="concat($base.dir,'search/l10n.js')"/>
|
---|
927 | </xsl:with-param>
|
---|
928 | <xsl:with-param name="method" select="'text'"/>
|
---|
929 | <xsl:with-param name="encoding" select="'utf-8'"/>
|
---|
930 | <xsl:with-param name="indent" select="'no'"/>
|
---|
931 | <xsl:with-param name="content">
|
---|
932 | //Resource strings for localization
|
---|
933 | var localeresource = new Object;
|
---|
934 | localeresource["search_no_results"]="<xsl:call-template name="gentext.template">
|
---|
935 | <xsl:with-param name="name" select="'Your_search_returned_no_results'"/>
|
---|
936 | <xsl:with-param name="context" select="'webhelp'"/>
|
---|
937 | </xsl:call-template>";
|
---|
938 | </xsl:with-param>
|
---|
939 | </xsl:call-template>
|
---|
940 | </xsl:template>
|
---|
941 |
|
---|
942 | </xsl:stylesheet>
|
---|
943 |
|
---|