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:copy-of select="$content"/>
518 <xsl:call-template name="user.footer.content"/>
520 <!-- Redundant since the upper navigation bar always visible -->
521 <xsl:call-template name="footer.navigation">
522 <xsl:with-param name="prev" select="$prev"/>
523 <xsl:with-param name="next" select="$next"/>
524 <xsl:with-param name="nav.context" select="$nav.context"/>
527 <xsl:call-template name="user.webhelp.content.footer"/>
530 <xsl:call-template name="user.footer.navigation"/>
533 <xsl:value-of select="$chunk.append"/>
536 <!-- 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.
537 i.e. within <div id="content"> ... </div> -->
538 <xsl:template name="user.webhelp.content.footer"/>
540 <!-- The Header with the company logo -->
541 <xsl:template name="webhelpheader">
542 <xsl:param name="prev"/>
543 <xsl:param name="next"/>
544 <xsl:param name="nav.context"/>
546 <xsl:variable name="home" select="/*[1]"/>
547 <xsl:variable name="up" select="parent::*"/>
550 <xsl:call-template name="webhelpheader.logo"/>
551 <!-- Display the page title and the main heading(parent) of it-->
553 <xsl:apply-templates select="/*[1]" mode="title.markup"/>
557 test="count($up) > 0 and generate-id($up) != generate-id($home)">
558 <xsl:apply-templates select="$up" mode="object.title.markup"/>
560 <xsl:when test="not(generate-id(.) = generate-id(/*))">
561 <xsl:apply-templates select="." mode="object.title.markup"/>
563 <xsl:otherwise> </xsl:otherwise>
566 <!-- Prev and Next links generation-->
568 <xsl:call-template name="user.webhelp.navheader.content"/>
570 <!-- KEEP this code. In case of neither prev nor next links are available, this will help to
571 keep the integrity of the DOM tree-->
573 <!--xsl:with-param name="prev" select="$prev"/>
574 <xsl:with-param name="next" select="$next"/>
575 <xsl:with-param name="nav.context" select="$nav.context"/-->
576 <table class="navLinks">
579 <a id="showHideButton" href="#" onclick="myLayout.toggle('west')"
580 class="pointLeft" tabindex="5" title="Hide TOC tree">Sidebar
583 <xsl:if test="count($prev) > 0
584 or (count($up) > 0
585 and generate-id($up) != generate-id($home)
586 and $navig.showtitles != 0)
587 or count($next) > 0">
589 <xsl:if test="count($prev)>0">
590 <a accesskey="p" class="navLinkPrevious" tabindex="5">
591 <xsl:attribute name="href">
592 <xsl:call-template name="href.target">
593 <xsl:with-param name="object" select="$prev"/>
596 <xsl:call-template name="navig.content">
597 <xsl:with-param name="direction" select="'prev'"/>
604 <xsl:when test="count($up)>0
605 and generate-id($up) != generate-id($home)">
607 <a accesskey="u" class="navLinkUp" tabindex="5">
608 <xsl:attribute name="href">
609 <xsl:call-template name="href.target">
610 <xsl:with-param name="object" select="$up"/>
613 <xsl:call-template name="navig.content">
614 <xsl:with-param name="direction" select="'up'"/>
618 <xsl:otherwise> </xsl:otherwise>
621 <xsl:if test="count($next)>0">
623 <a accesskey="n" class="navLinkNext" tabindex="5">
624 <xsl:attribute name="href">
625 <xsl:call-template name="href.target">
626 <xsl:with-param name="object" select="$next"/>
629 <xsl:call-template name="navig.content">
630 <xsl:with-param name="direction" select="'next'"/>
642 <xsl:template name="webhelpheader.logo">
643 <a href="index.html">
644 <img style='margin-right: 2px; height: 59px; padding-right: 25px; padding-top: 8px' align="right"
645 src='{$webhelp.common.dir}images/logo.png' alt="{$brandname} Documentation"/>
649 <xsl:template name="user.webhelp.navheader.content"/>
651 <xsl:template name="webhelptoc">
652 <xsl:param name="currentid"/>
654 <xsl:when test="$rootid != ''">
655 <xsl:variable name="title">
656 <xsl:if test="$webhelp.autolabel=1">
657 <xsl:variable name="label.markup">
658 <xsl:apply-templates select="key('id',$rootid)" mode="label.markup"/>
660 <xsl:if test="normalize-space($label.markup)">
661 <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
664 <xsl:apply-templates select="key('id',$rootid)" mode="titleabbrev.markup"/>
666 <xsl:variable name="href">
668 <xsl:when test="$manifest.in.base.dir != 0">
669 <xsl:call-template name="href.target">
670 <xsl:with-param name="object" select="key('id',$rootid)"/>
674 <xsl:call-template name="href.target.with.base.dir">
675 <xsl:with-param name="object" select="key('id',$rootid)"/>
683 <xsl:variable name="title">
684 <xsl:if test="$webhelp.autolabel=1">
685 <xsl:variable name="label.markup">
686 <xsl:apply-templates select="/*" mode="label.markup"/>
688 <xsl:if test="normalize-space($label.markup)">
689 <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
692 <xsl:apply-templates select="/*" mode="titleabbrev.markup"/>
694 <xsl:variable name="href">
696 <xsl:when test="$manifest.in.base.dir != 0">
697 <xsl:call-template name="href.target">
698 <xsl:with-param name="object" select="/"/>
702 <xsl:call-template name="href.target.with.base.dir">
703 <xsl:with-param name="object" select="/"/>
709 <div id="sidebar"> <!--#sidebar id is used for showing and hiding the side bar -->
710 <div id="leftnavigation" style="padding-top:3px;">
714 <a href="#treeDiv" style="outline:0;" tabindex="1">
715 <span class="contentsTab">
716 <xsl:call-template name="gentext.template">
717 <xsl:with-param name="name" select="'TableofContents'"/>
718 <xsl:with-param name="context" select="'webhelp'"/>
723 <xsl:if test="$webhelp.include.search.tab != '0'">
725 <a href="#searchDiv" style="outline:0;" tabindex="1" onclick="doSearch()">
726 <span class="searchTab">
727 <xsl:call-template name="gentext.template">
728 <xsl:with-param name="name" select="'Search'"/>
729 <xsl:with-param name="context" select="'webhelp'"/>
735 <xsl:call-template name="user.webhelp.tabs.title"/>
738 <img src="{$webhelp.common.dir}images/loading.gif" alt="loading table of contents..."
739 id="tocLoading" style="display:block;"/>
740 <div id="ulTreeDiv" style="display:none">
741 <ul id="tree" class="filetree">
742 <xsl:apply-templates select="/*/*" mode="webhelptoc">
743 <xsl:with-param name="currentid" select="$currentid"/>
744 </xsl:apply-templates>
749 <xsl:if test="$webhelp.include.search.tab != '0'">
752 <form onsubmit="Verifie(searchForm);return false"
753 name="searchForm" class="searchForm">
756 <!-- <xsl:call-template name="gentext.template">
757 <xsl:with-param name="name" select="'Search'"/>
758 <xsl:with-param name="context" select="'webhelp'"/>
759 </xsl:call-template>-->
762 <input id="textToSearch" name="textToSearch" type="search" placeholder="Search"
763 class="searchText" tabindex="1"/>
764 <xsl:text disable-output-escaping="yes"> <![CDATA[ ]]> </xsl:text>
765 <input onclick="Verifie(searchForm)" type="button"
767 value="Go" id="doSearch" tabindex="1"/>
772 <div id="searchResults">
775 <p class="searchHighlight"><a href="#" onclick="toggleHighlight()">Search Highlighter (On/Off)</a></p>
778 <xsl:call-template name="user.webhelp.tabs.content"/>
786 <!-- Hooks for adding customs tabs -->
787 <xsl:template name="user.webhelp.tabs.title"/>
788 <xsl:template name="user.webhelp.tabs.content"/>
790 <!-- Generates the webhelp table-of-contents (TOC). -->
792 match="book|part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv|index|setindex"
794 <xsl:param name="currentid"/>
795 <xsl:variable name="title">
796 <xsl:if test="$webhelp.autolabel=1">
797 <xsl:variable name="label.markup">
798 <xsl:apply-templates select="." mode="label.markup"/>
800 <xsl:if test="normalize-space($label.markup)">
801 <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
804 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
807 <xsl:variable name="href">
809 <xsl:when test="$manifest.in.base.dir != 0">
810 <xsl:call-template name="href.target"/>
813 <xsl:call-template name="href.target.with.base.dir"/>
818 <xsl:variable name="id" select="generate-id(.)"/>
820 <xsl:if test="not(self::index) or (self::index and not($generate.index = 0))">
821 <!--li style="white-space: pre; line-height: 0em;"-->
823 <xsl:if test="$id = $currentid">
824 <xsl:attribute name="id">webhelp-currentid</xsl:attribute>
827 <a href="{substring-after($href, $base.dir)}" tabindex="1">
828 <xsl:value-of select="$title"/>
831 <xsl:if test="part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv">
834 select="part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv"
836 <xsl:with-param name="currentid" select="$currentid"/>
837 </xsl:apply-templates>
844 <xsl:template match="text()" mode="webhelptoc"/>
846 <xsl:template name="user.footer.content">
847 <script type="text/javascript" src="{$webhelp.common.dir}main.js">
848 <xsl:comment> </xsl:comment>
850 <script type="text/javascript" src="{$webhelp.common.dir}splitterInit.js">
851 <xsl:comment> </xsl:comment>
855 <!-- Generates index.html file at docs/. This is simply a redirection to content/$default.topic -->
856 <xsl:template name="index.html">
857 <xsl:variable name="default.topic">
859 <xsl:when test="$webhelp.default.topic != ''">
860 <xsl:value-of select="$webhelp.default.topic"/>
862 <xsl:when test="$htmlhelp.default.topic != ''">
863 <xsl:value-of select="$htmlhelp.default.topic"/>
866 <xsl:call-template name="make-relative-filename">
867 <xsl:with-param name="base.dir"/>
868 <xsl:with-param name="base.name">
870 <xsl:when test="$rootid != ''">
871 <xsl:apply-templates select="key('id',$rootid)" mode="chunk-filename"/>
875 select="*/*[self::preface|self::chapter|self::appendix|self::part][1]"
876 mode="chunk-filename"/>
884 <xsl:call-template name="write.chunk">
885 <xsl:with-param name="filename">
886 <!-- <xsl:if test="$manifest.in.base.dir != 0"> -->
887 <!-- <xsl:value-of select="$base.dir"/> -->
890 <xsl:when test="$webhelp.start.filename">
891 <xsl:value-of select="concat($webhelp.base.dir,'/',$webhelp.start.filename)"/>
894 <xsl:value-of select="'index.html'"/>
898 <xsl:with-param name="method" select="'xml'"/>
899 <xsl:with-param name="encoding" select="'utf-8'"/>
900 <xsl:with-param name="indent" select="'yes'"/>
901 <xsl:with-param name="content">
904 <link rel="shortcut icon" href="favicon.ico"/>
905 <meta http-equiv="Refresh" content="1; URL=content/{$default.topic}"/>
906 <title><xsl:value-of select="//title[1]"/> </title>
909 If not automatically redirected, click <a href="content/{$default.topic}">content/<xsl:value-of select="$default.topic"/></a>
916 <xsl:template name="l10n.js">
917 <xsl:call-template name="write.chunk">
918 <xsl:with-param name="filename">
919 <xsl:value-of select="concat($base.dir,'search/l10n.js')"/>
921 <xsl:with-param name="method" select="'text'"/>
922 <xsl:with-param name="encoding" select="'utf-8'"/>
923 <xsl:with-param name="indent" select="'no'"/>
924 <xsl:with-param name="content">
925 //Resource strings for localization
926 var localeresource = new Object;
927 localeresource["search_no_results"]="<xsl:call-template name="gentext.template">
928 <xsl:with-param name="name" select="'Your_search_returned_no_results'"/>
929 <xsl:with-param name="context" select="'webhelp'"/>
930 </xsl:call-template>";