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">
9 <!-- ********************************************************************
11 ********************************************************************
13 This file is part customization layer on top of the XSL DocBook
14 Stylesheet distribution that generates webhelp output.
16 ******************************************************************** -->
18 <xsl:param name="chunker.output.method">
20 <xsl:when test="contains(system-property('xsl:vendor'), 'SAXON 6')">saxon:xhtml</xsl:when>
21 <xsl:otherwise>html</xsl:otherwise>
25 <xsl:param name="doc.title">
26 <xsl:call-template name="get.doc.title"/>
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>
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"/>
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-->
64 <xsl:param name="generate.toc">
68 book title,figure,table,example,equation
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 -->
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"/>
93 <xsl:param name="document-title">
94 <xsl:apply-templates select="/*" mode="object.title.markup.textonly"/>
98 <xsl:copy-of select="$title"/> - <xsl:if test="parent::*"> - <xsl:copy-of select="$document-title"/></xsl:if>
103 <xsl:template name="system.head.content">
104 <xsl:param name="node" select="."/>
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.
110 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
113 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
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"/>
123 <meta name="Section-title" content="{$title}"/>
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())"/>
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();
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>";
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"/>
164 <style type="text/css">
168 background-color: #55AA55;
175 border-bottom: solid 5px black;
188 background: transparent url(<xsl:value-of select="$webhelp.common.dir"/>jquery/treeview/images/folder.gif) 0 0px no-repeat;
192 background: url(<xsl:value-of select="$webhelp.common.dir"/>images/toc-icon.png) no-repeat 0 center;
196 background: url(<xsl:value-of select="$webhelp.common.dir"/>images/search-icon.png) no-repeat 0 center;
199 /* Overide jquery treeview's defaults for ul. */
201 background-color: transparent;
205 background-color: #D8D8D8 !important;
207 .treeview .hover { color: black; }
208 .filetree li span a { text-decoration: none; font-size: 12px; color: #517291; }
210 /* Override jquery-ui's default css customizations. These are supposed to take precedence over those.*/
218 border-left: 1px solid #e5e5e5;
219 border-right: 1px solid #e5e5e5;
220 border-bottom: 1px solid #bbc4c5;
221 border-top: 4px solid #e5e5e5;
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 */
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; }
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;
243 .ui-corner-all { border-radius: 0 0 0 0; }
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); }
251 * This theme uses the default layout class-names for all classes
252 * Add any 'custom class-names', from options: paneClass, resizerClass, togglerClass
255 .ui-layout-pane { /* all 'panes' */
257 border: 1px solid #BBB;
262 .ui-layout-resizer { /* all 'resizer-bars' */
267 .ui-layout-toggler { /* all 'toggler-buttons' */
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>
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.
280 <script type="text/javascript" src="{$webhelp.common.dir}browserDetect.js">
281 <xsl:comment> </xsl:comment>
283 <script type="text/javascript" src="{$webhelp.common.dir}jquery/jquery-1.7.2.min.js">
284 <xsl:comment> </xsl:comment>
286 <script type="text/javascript" src="{$webhelp.common.dir}jquery/jquery.ui.all.js">
287 <xsl:comment> </xsl:comment>
289 <script type="text/javascript" src="{$webhelp.common.dir}jquery/jquery.cookie.js">
290 <xsl:comment> </xsl:comment>
292 <script type="text/javascript" src="{$webhelp.common.dir}jquery/treeview/jquery.treeview.min.js">
293 <xsl:comment> </xsl:comment>
295 <script type="text/javascript" src="{$webhelp.common.dir}jquery/layout/jquery.layout.js">
296 <xsl:comment> </xsl:comment>
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">
305 <script type="text/javascript" src="search/htmlFileInfoList.js">
306 <xsl:comment> </xsl:comment>
308 <script type="text/javascript" src="search/nwSearchFnt.js">
309 <xsl:comment> </xsl:comment>
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
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>
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.
328 <script type="text/javascript" src="search/index-1.js">
329 <xsl:comment> </xsl:comment>
331 <script type="text/javascript" src="search/index-2.js">
332 <xsl:comment> </xsl:comment>
334 <script type="text/javascript" src="search/index-3.js">
335 <xsl:comment> </xsl:comment>
337 <!--End of index files -->
339 <xsl:call-template name="user.webhelp.head.content"/>
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"/>
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"/>
354 <!--xsl:call-template name="webhelptoc"/-->
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"/>
363 <xsl:template name="user.header.content">
364 <xsl:comment> <!-- KEEP this code. --> </xsl:comment>
367 <xsl:template name="user.footer.navigation">
368 <xsl:call-template name="webhelptoc">
369 <xsl:with-param name="currentid" select="generate-id(.)"/>
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. -->
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
383 namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
384 <xsl:call-template name="log.message">
385 <xsl:with-param name="level">Note</xsl:with-param>
386 <xsl:with-param name="source" select="$doc.title"/>
387 <xsl:with-param name="context-desc">
388 <xsl:text>namesp. cut</xsl:text>
390 <xsl:with-param name="message">
391 <xsl:text>stripped namespace before processing</xsl:text>
394 <xsl:variable name="nons">
395 <xsl:apply-templates mode="stripNS"/>
398 <xsl:message>Saving stripped document.</xsl:message>
399 <xsl:call-template name="write.chunk">
400 <xsl:with-param name="filename" select="'/tmp/stripped.xml'"/>
401 <xsl:with-param name="method" select="'xml'"/>
402 <xsl:with-param name="content">
403 <xsl:copy-of select="exsl:node-set($nons)"/>
407 <xsl:apply-templates select="exsl:node-set($nons)"/>
409 <!-- Can't process unless namespace fixed with exsl node-set()-->
410 <xsl:when test="namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
411 <xsl:message terminate="yes">
412 <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
413 <xsl:text> cannot proceed.</xsl:text>
418 <xsl:when test="$rootid != ''">
420 <xsl:when test="count(key('id',$rootid)) = 0">
421 <xsl:message terminate="yes">
422 <xsl:text>ID '</xsl:text>
423 <xsl:value-of select="$rootid"/>
424 <xsl:text>' not found in document.</xsl:text>
428 <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'">
429 <xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/>
431 <xsl:if test="$collect.xref.targets != 'only'">
432 <xsl:apply-templates select="key('id',$rootid)" mode="process.root"/>
433 <xsl:if test="$tex.math.in.alt != ''">
434 <xsl:apply-templates select="key('id',$rootid)" mode="collect.tex.math"/>
441 <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'">
442 <xsl:apply-templates select="/" mode="collect.targets"/>
444 <xsl:if test="$collect.xref.targets != 'only'">
445 <xsl:apply-templates select="/" mode="process.root"/>
446 <xsl:if test="$tex.math.in.alt != ''">
447 <xsl:apply-templates select="/" mode="collect.tex.math"/>
456 <xsl:if test="$collect.xref.targets != 'only'">
457 <xsl:call-template name="l10n.js"/>
462 <!-- The WebHelp output structure. similar to main() method.
465 <head> calls-appropriate-template </head>
469 All your docbook document content goes here
472 some-other-generic-content-at-footer
476 <xsl:template name="chunk-element-content">
477 <xsl:param name="prev"/>
478 <xsl:param name="next"/>
479 <xsl:param name="nav.context"/>
480 <xsl:param name="content">
484 <xsl:call-template name="user.preroot"/>
487 <xsl:call-template name="html.head">
488 <xsl:with-param name="prev" select="$prev"/>
489 <xsl:with-param name="next" select="$next"/>
496 <xsl:call-template name="gentext.template">
497 <xsl:with-param name="name" select="'txt_browser_not_supported'"/>
498 <xsl:with-param name="context" select="'webhelp'"/>
504 <xsl:call-template name="body.attributes"/>
506 <xsl:call-template name="user.header.navigation">
507 <xsl:with-param name="prev" select="$prev"/>
508 <xsl:with-param name="next" select="$next"/>
509 <xsl:with-param name="nav.context" select="$nav.context"/>
514 <xsl:call-template name="user.header.content"/>
516 <xsl:call-template name='condition-decorator'>
517 <xsl:with-param name='content' select="$content"/>
520 <xsl:call-template name="user.footer.content"/>
522 <!-- Redundant since the upper navigation bar always visible -->
523 <xsl:call-template name="footer.navigation">
524 <xsl:with-param name="prev" select="$prev"/>
525 <xsl:with-param name="next" select="$next"/>
526 <xsl:with-param name="nav.context" select="$nav.context"/>
529 <xsl:call-template name="user.webhelp.content.footer"/>
532 <xsl:call-template name="user.footer.navigation"/>
535 <xsl:value-of select="$chunk.append"/>
538 <!-- 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.
539 i.e. within <div id="content"> ... </div> -->
540 <xsl:template name="user.webhelp.content.footer"/>
542 <!-- The Header with the company logo -->
543 <xsl:template name="webhelpheader">
544 <xsl:param name="prev"/>
545 <xsl:param name="next"/>
546 <xsl:param name="nav.context"/>
548 <xsl:variable name="home" select="/*[1]"/>
549 <xsl:variable name="up" select="parent::*"/>
552 <xsl:call-template name="webhelpheader.logo"/>
553 <!-- Display the page title and the main heading(parent) of it-->
555 <xsl:apply-templates select="/*[1]" mode="title.markup"/>
559 test="count($up) > 0 and generate-id($up) != generate-id($home)">
560 <xsl:apply-templates select="$up" mode="object.title.markup"/>
562 <xsl:when test="not(generate-id(.) = generate-id(/*))">
563 <xsl:apply-templates select="." mode="object.title.markup"/>
565 <xsl:otherwise> </xsl:otherwise>
568 <!-- Prev and Next links generation-->
570 <xsl:call-template name="user.webhelp.navheader.content"/>
572 <!-- KEEP this code. In case of neither prev nor next links are available, this will help to
573 keep the integrity of the DOM tree-->
575 <!--xsl:with-param name="prev" select="$prev"/>
576 <xsl:with-param name="next" select="$next"/>
577 <xsl:with-param name="nav.context" select="$nav.context"/-->
578 <table class="navLinks">
581 <a id="showHideButton" href="#" onclick="myLayout.toggle('west')"
582 class="pointLeft" tabindex="5" title="Hide TOC tree">Sidebar
585 <xsl:if test="count($prev) > 0
586 or (count($up) > 0
587 and generate-id($up) != generate-id($home)
588 and $navig.showtitles != 0)
589 or count($next) > 0">
591 <xsl:if test="count($prev)>0">
592 <a accesskey="p" class="navLinkPrevious" tabindex="5">
593 <xsl:attribute name="href">
594 <xsl:call-template name="href.target">
595 <xsl:with-param name="object" select="$prev"/>
598 <xsl:call-template name="navig.content">
599 <xsl:with-param name="direction" select="'prev'"/>
606 <xsl:when test="count($up)>0
607 and generate-id($up) != generate-id($home)">
609 <a accesskey="u" class="navLinkUp" tabindex="5">
610 <xsl:attribute name="href">
611 <xsl:call-template name="href.target">
612 <xsl:with-param name="object" select="$up"/>
615 <xsl:call-template name="navig.content">
616 <xsl:with-param name="direction" select="'up'"/>
620 <xsl:otherwise> </xsl:otherwise>
623 <xsl:if test="count($next)>0">
625 <a accesskey="n" class="navLinkNext" tabindex="5">
626 <xsl:attribute name="href">
627 <xsl:call-template name="href.target">
628 <xsl:with-param name="object" select="$next"/>
631 <xsl:call-template name="navig.content">
632 <xsl:with-param name="direction" select="'next'"/>
644 <xsl:template name="webhelpheader.logo">
645 <a href="index.html">
646 <img style='margin-right: 2px; height: 59px; padding-right: 25px; padding-top: 8px' align="right"
647 src='{$webhelp.common.dir}images/logo.png' alt="{$brandname} Documentation"/>
651 <xsl:template name="user.webhelp.navheader.content"/>
653 <xsl:template name="webhelptoc">
654 <xsl:param name="currentid"/>
656 <xsl:when test="$rootid != ''">
657 <xsl:variable name="title">
658 <xsl:if test="$webhelp.autolabel=1">
659 <xsl:variable name="label.markup">
660 <xsl:apply-templates select="key('id',$rootid)" mode="label.markup"/>
662 <xsl:if test="normalize-space($label.markup)">
663 <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
666 <xsl:apply-templates select="key('id',$rootid)" mode="titleabbrev.markup"/>
668 <xsl:variable name="href">
670 <xsl:when test="$manifest.in.base.dir != 0">
671 <xsl:call-template name="href.target">
672 <xsl:with-param name="object" select="key('id',$rootid)"/>
676 <xsl:call-template name="href.target.with.base.dir">
677 <xsl:with-param name="object" select="key('id',$rootid)"/>
685 <xsl:variable name="title">
686 <xsl:if test="$webhelp.autolabel=1">
687 <xsl:variable name="label.markup">
688 <xsl:apply-templates select="/*" mode="label.markup"/>
690 <xsl:if test="normalize-space($label.markup)">
691 <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
694 <xsl:apply-templates select="/*" mode="titleabbrev.markup"/>
696 <xsl:variable name="href">
698 <xsl:when test="$manifest.in.base.dir != 0">
699 <xsl:call-template name="href.target">
700 <xsl:with-param name="object" select="/"/>
704 <xsl:call-template name="href.target.with.base.dir">
705 <xsl:with-param name="object" select="/"/>
711 <div id="sidebar"> <!--#sidebar id is used for showing and hiding the side bar -->
712 <div id="leftnavigation" style="padding-top:3px;">
716 <a href="#treeDiv" style="outline:0;" tabindex="1">
717 <span class="contentsTab">
718 <xsl:call-template name="gentext.template">
719 <xsl:with-param name="name" select="'TableofContents'"/>
720 <xsl:with-param name="context" select="'webhelp'"/>
725 <xsl:if test="$webhelp.include.search.tab != '0'">
727 <a href="#searchDiv" style="outline:0;" tabindex="1" onclick="doSearch()">
728 <span class="searchTab">
729 <xsl:call-template name="gentext.template">
730 <xsl:with-param name="name" select="'Search'"/>
731 <xsl:with-param name="context" select="'webhelp'"/>
737 <xsl:call-template name="user.webhelp.tabs.title"/>
740 <img src="{$webhelp.common.dir}images/loading.gif" alt="loading table of contents..."
741 id="tocLoading" style="display:block;"/>
742 <div id="ulTreeDiv" style="display:none">
743 <ul id="tree" class="filetree">
744 <xsl:apply-templates select="/*/*" mode="webhelptoc">
745 <xsl:with-param name="currentid" select="$currentid"/>
746 </xsl:apply-templates>
751 <xsl:if test="$webhelp.include.search.tab != '0'">
754 <form onsubmit="Verifie(searchForm);return false"
755 name="searchForm" class="searchForm">
758 <!-- <xsl:call-template name="gentext.template">
759 <xsl:with-param name="name" select="'Search'"/>
760 <xsl:with-param name="context" select="'webhelp'"/>
761 </xsl:call-template>-->
764 <input id="textToSearch" name="textToSearch" type="search" placeholder="Search"
765 class="searchText" tabindex="1"/>
766 <xsl:text disable-output-escaping="yes"> <![CDATA[ ]]> </xsl:text>
767 <input onclick="Verifie(searchForm)" type="button"
769 value="Go" id="doSearch" tabindex="1"/>
774 <div id="searchResults">
777 <p class="searchHighlight"><a href="#" onclick="toggleHighlight()">Search Highlighter (On/Off)</a></p>
780 <xsl:call-template name="user.webhelp.tabs.content"/>
788 <!-- Hooks for adding customs tabs -->
789 <xsl:template name="user.webhelp.tabs.title"/>
790 <xsl:template name="user.webhelp.tabs.content"/>
792 <!-- Generates the webhelp table-of-contents (TOC). -->
794 match="book|part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv|index|setindex"
796 <xsl:param name="currentid"/>
797 <xsl:variable name="title">
798 <xsl:if test="$webhelp.autolabel=1">
799 <xsl:variable name="label.markup">
800 <xsl:apply-templates select="." mode="label.markup"/>
802 <xsl:if test="normalize-space($label.markup)">
803 <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
806 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
809 <xsl:variable name="href">
811 <xsl:when test="$manifest.in.base.dir != 0">
812 <xsl:call-template name="href.target"/>
815 <xsl:call-template name="href.target.with.base.dir"/>
820 <xsl:variable name="id" select="generate-id(.)"/>
822 <xsl:if test="not(self::index) or (self::index and not($generate.index = 0))">
823 <!--li style="white-space: pre; line-height: 0em;"-->
825 <xsl:if test="$id = $currentid">
826 <xsl:attribute name="id">webhelp-currentid</xsl:attribute>
829 <a href="{substring-after($href, $base.dir)}" tabindex="1">
830 <xsl:value-of select="$title"/>
831 <xsl:call-template name="condition-title">
832 <xsl:with-param name="condition" select="@condition"/>
836 <xsl:if test="part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv">
839 select="part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv"
841 <xsl:with-param name="currentid" select="$currentid"/>
842 </xsl:apply-templates>
849 <xsl:template match="text()" mode="webhelptoc"/>
851 <xsl:template name="user.footer.content">
852 <script type="text/javascript" src="{$webhelp.common.dir}main.js">
853 <xsl:comment> </xsl:comment>
855 <script type="text/javascript" src="{$webhelp.common.dir}splitterInit.js">
856 <xsl:comment> </xsl:comment>
860 <!-- Generates index.html file at docs/. This is simply a redirection to content/$default.topic -->
861 <xsl:template name="index.html">
862 <xsl:variable name="default.topic">
864 <xsl:when test="$webhelp.default.topic != ''">
865 <xsl:value-of select="$webhelp.default.topic"/>
867 <xsl:when test="$htmlhelp.default.topic != ''">
868 <xsl:value-of select="$htmlhelp.default.topic"/>
871 <xsl:call-template name="make-relative-filename">
872 <xsl:with-param name="base.dir"/>
873 <xsl:with-param name="base.name">
875 <xsl:when test="$rootid != ''">
876 <xsl:apply-templates select="key('id',$rootid)" mode="chunk-filename"/>
880 select="*/*[self::preface|self::chapter|self::appendix|self::part][1]"
881 mode="chunk-filename"/>
889 <xsl:call-template name="write.chunk">
890 <xsl:with-param name="filename">
891 <!-- <xsl:if test="$manifest.in.base.dir != 0"> -->
892 <!-- <xsl:value-of select="$base.dir"/> -->
895 <xsl:when test="$webhelp.start.filename">
896 <xsl:value-of select="concat($webhelp.base.dir,'/',$webhelp.start.filename)"/>
899 <xsl:value-of select="'index.html'"/>
903 <xsl:with-param name="method" select="'xml'"/>
904 <xsl:with-param name="encoding" select="'utf-8'"/>
905 <xsl:with-param name="indent" select="'yes'"/>
906 <xsl:with-param name="content">
909 <link rel="shortcut icon" href="favicon.ico"/>
910 <meta http-equiv="Refresh" content="1; URL=content/{$default.topic}"/>
911 <title><xsl:value-of select="//title[1]"/> </title>
914 If not automatically redirected, click <a href="content/{$default.topic}">content/<xsl:value-of select="$default.topic"/></a>
921 <xsl:template name="l10n.js">
922 <xsl:call-template name="write.chunk">
923 <xsl:with-param name="filename">
924 <xsl:value-of select="concat($base.dir,'search/l10n.js')"/>
926 <xsl:with-param name="method" select="'text'"/>
927 <xsl:with-param name="encoding" select="'utf-8'"/>
928 <xsl:with-param name="indent" select="'no'"/>
929 <xsl:with-param name="content">
930 //Resource strings for localization
931 var localeresource = new Object;
932 localeresource["search_no_results"]="<xsl:call-template name="gentext.template">
933 <xsl:with-param name="name" select="'Your_search_returned_no_results'"/>
934 <xsl:with-param name="context" select="'webhelp'"/>
935 </xsl:call-template>";