add --shared
[pylucene.git] / lucene-java-3.4.0 / lucene / src / site / src / documentation / skins / lucene / xslt / html / site-to-xhtml.xsl
1 <?xml version="1.0"?>
2 <!--
3   Licensed to the Apache Software Foundation (ASF) under one or more
4   contributor license agreements.  See the NOTICE file distributed with
5   this work for additional information regarding copyright ownership.
6   The ASF licenses this file to You under the Apache License, Version 2.0
7   (the "License"); you may not use this file except in compliance with
8   the License.  You may obtain a copy of the License at
9
10       http://www.apache.org/licenses/LICENSE-2.0
11
12   Unless required by applicable law or agreed to in writing, software
13   distributed under the License is distributed on an "AS IS" BASIS,
14   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   See the License for the specific language governing permissions and
16   limitations under the License.
17 -->
18 <!--
19 site-to-xhtml.xsl is the final stage in HTML page production.  It merges HTML from
20 document-to-html.xsl, tab-to-menu.xsl and book-to-menu.xsl, and adds the site header,
21 footer, searchbar, css etc.  As input, it takes XML of the form:
22
23 <site>
24   <div class="menu">
25     ...
26   </div>
27   <div class="tab">
28     ...
29   </div>
30   <div class="content">
31     ...
32   </div>
33 </site>
34
35 -->
36 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
37   xmlns:i18n="http://apache.org/cocoon/i18n/2.1" exclude-result-prefixes="i18n">
38   <xsl:import href="../../../common/xslt/html/site-to-xhtml.xsl"/>
39 <!--+
40   |Overall site template
41   +-->
42   <xsl:template match="site">
43 <!--html lang="en" xml:lang="en"-->
44     <html>
45 <!--+
46   |HTML-head
47   +-->
48       <head>
49 <!--+
50   |generator meta
51   +-->
52 <!-- Add some Forrest-specific metadata -->
53         <xsl:call-template name="html-meta"/>
54 <!-- Add any metadata from the documents -->
55         <xsl:call-template name="meta-data"/>
56 <!--+
57   |title
58   +-->
59         <title><xsl:value-of select="div[@id='content']/h1"/>
60           <xsl:if test="$config/motd">
61             <xsl:for-each select="$config/motd/motd-option">
62               <xsl:choose>
63                 <xsl:when test="@starts-with='true'">
64                   <xsl:if test="starts-with($path, @pattern)">
65                     <xsl:if test="normalize-space(motd-title) != ''">
66 <xsl:text> (</xsl:text>
67                       <xsl:value-of select="motd-title"/>
68 <xsl:text>)</xsl:text>
69                     </xsl:if>
70                   </xsl:if>
71                 </xsl:when>
72                 <xsl:otherwise>
73                   <xsl:if test="contains($path, @pattern)">
74                     <xsl:if test="normalize-space(motd-title) != ''">
75 <xsl:text> (</xsl:text>
76                       <xsl:value-of select="motd-title"/>
77 <xsl:text>)</xsl:text>
78                     </xsl:if>
79                   </xsl:if>
80                 </xsl:otherwise>
81               </xsl:choose>
82             </xsl:for-each>
83           </xsl:if></title>
84 <!--+
85   |stylesheets
86   +--><link rel="stylesheet" href="{$root}skin/basic.css" type="text/css" 
87                 /><link rel="stylesheet" href="{$root}skin/screen.css" 
88                 type="text/css" media="screen" /><link rel="stylesheet" href="{$root}skin/print.css" type="text/css" 
89                 media="print" /><link rel="stylesheet" href="{$root}skin/profile.css" 
90                 type="text/css" />
91 <!--+
92   |Javascripts
93   +-->
94 <script type="text/javascript" language="javascript" 
95                 src="{$root}skin/getBlank.js"></script>
96 <script type="text/javascript" language="javascript" 
97                                 src="{$root}skin/getMenu.js"></script>
98 <script type="text/javascript" language="javascript" 
99                                 src="{$root}skin/fontsize.js"></script>
100 <!--+
101   |favicon
102   +-->
103         <xsl:if test="//skinconfig/favicon-url"><link rel="shortcut icon">
104           <xsl:attribute name="href">
105             <xsl:value-of 
106                             select="concat($root,//skinconfig/favicon-url)"/>
107           </xsl:attribute></link>
108         </xsl:if>
109       </head>
110 <!--+
111   |HTML-body
112   +-->
113       <body onload="init()">
114 <script type="text/javascript">ndeSetTextSize();</script>
115 <!--+Site structure
116   +++++++++++++++++++++++++++
117      +=========================+
118      |       topstrip          |
119      +=========================+
120      |                         |
121      |       centerstrip       |
122      |                         |
123      |                         |
124      +=========================+
125      |       bottomstrip       |
126      +=========================+
127      +++++++++++++++++++++++++++
128      +-->
129 <!--+
130   |topstrip with logos and search box 
131   +-->
132         <div id="top">
133 <!--breadcrumbs org location-->
134           <xsl:if test="not ($config/trail/@location)">
135             <xsl:comment>+
136     |breadtrail
137     +</xsl:comment>
138             <div class="breadtrail">
139               <xsl:call-template name="breadcrumbs"/>
140             </div>
141           </xsl:if>
142           <xsl:comment>+
143     |header
144     +</xsl:comment>
145           <div class="header">
146             <xsl:comment>+
147     |start group logo
148     +</xsl:comment>
149             <xsl:if test="$config/group-url">
150               <div class="grouplogo">
151                 <xsl:call-template name="renderlogo">
152                   <xsl:with-param name="name" select="$config/group-name"/>
153                   <xsl:with-param name="url" select="$config/group-url"/>
154                   <xsl:with-param name="logo" select="$config/group-logo"/>
155                   <xsl:with-param name="root" select="$root"/>
156                   <xsl:with-param name="description" select="$config/group-description"/>
157                 </xsl:call-template>
158               </div>
159             </xsl:if>
160             <xsl:comment>+
161     |end group logo
162     +</xsl:comment>
163             <xsl:comment>+
164     |start Project Logo
165     +</xsl:comment>
166             <xsl:variable name="xtest">
167               <xsl:choose>
168                 <xsl:when 
169                     test="$config/group-url and $config/search and not($config/search/@box-location = 'alt')">
170 <xsl:text>true</xsl:text>
171                 </xsl:when>
172                 <xsl:otherwise>
173 <xsl:text>false</xsl:text>
174                 </xsl:otherwise>
175               </xsl:choose>
176             </xsl:variable>
177             <div class="projectlogo">
178               <xsl:if test="$xtest='false'" >
179                 <xsl:attribute name="class">
180 <xsl:text>projectlogoA1</xsl:text>
181                 </xsl:attribute>
182               </xsl:if>
183               <xsl:call-template name="renderlogo">
184                 <xsl:with-param name="name" select="$config/project-name"/>
185                 <xsl:with-param name="url" select="$config/project-url"/>
186                 <xsl:with-param name="logo" select="$config/project-logo"/>
187                 <xsl:with-param name="root" select="$root"/>
188                 <xsl:with-param name="description" select="$config/project-description"/>
189               </xsl:call-template>
190             </div>
191             <xsl:comment>+
192     |end Project Logo
193     +</xsl:comment>
194             <xsl:if 
195             test="$config/search and not($config/search/@box-location = 'alt')">
196               <xsl:comment>+
197     |start Search
198     +</xsl:comment>
199               <div class="searchbox">
200                 <xsl:variable name="search-prompt">
201                   <i18n:text>Search the site with</i18n:text>
202 <xsl:text> </xsl:text>
203                   <xsl:value-of select="$config/search/@provider"/>
204                 </xsl:variable>
205                 <xsl:choose>
206                   <xsl:when test="$config/search/@provider = 'lucene'">
207 <!-- Lucene search -->
208                     <form method="get" action="{$root}{$lucene-search}">
209                       <input type="text" id="query" name="queryString" size="25" onFocus="getBlank (this, '{$search-prompt}');">
210                         <xsl:attribute name="value">
211                           <xsl:value-of select="$search-prompt"/>
212                         </xsl:attribute>
213                       </input>&#160;
214                   <input type="submit" value="Search" name="Search" i18n:attr="value"/>
215                     </form>
216                   </xsl:when>
217                   <xsl:otherwise>
218                     <form class="roundtopsmall" method="get" action="http://search.lucidimagination.com/p:lucene">
219                       <input type="text" id="query" name="q" size="25" onFocus="getBlank (this, '{$search-prompt}');">
220                         <xsl:attribute name="value">
221                           <xsl:value-of select="$search-prompt"/>
222                         </xsl:attribute>
223                       </input>&#160; 
224                     <input type="submit" value="Search" name="Search" i18n:attr="value"/>
225                     </form>
226                     <div style="position: relative; top: -5px; left: -10px">Powered by <a style="color: #033268" href="http://www.lucidimagination.com">Lucid Imagination</a></div>
227                   </xsl:otherwise>
228                 </xsl:choose>
229 <!--div id="roundbottomsmall">
230             <img 
231                 src="{$skin-img-dir}/rc-b-l-5-1body-2menu-3menu.png" 
232                 alt="" width="5" height="5" class="cornersmall" 
233                 style="display: none" />
234         </div-->
235               </div>
236               <xsl:comment>+
237     |end search
238     +</xsl:comment>
239             </xsl:if>
240             <xsl:comment>+
241     |start Tabs
242     +</xsl:comment>
243             <xsl:apply-templates select="ul[@id='tabs']"/>
244             <xsl:comment>+
245     |end Tabs
246     +</xsl:comment>
247           </div>
248         </div>
249 <!--+
250   |centerstrip with menu and mainarea
251   +-->
252         <div id="main">
253           <div id="publishedStrip">
254             <xsl:comment>+
255     |start Subtabs
256     +</xsl:comment>
257             <div id="level2tabs">
258               <xsl:apply-templates select="span[@id='level2tabs']/node()"/>
259             </div>
260             <xsl:comment>+
261     |end Endtabs
262     +</xsl:comment>
263             <xsl:call-template name="last-published"/>
264           </div>
265           <xsl:comment>+
266     |breadtrail
267     +</xsl:comment>
268           <div class="breadtrail">
269             <xsl:choose>
270               <xsl:when test="$config/trail/@location='alt'">
271 <!--breadtrail location='alt'-->
272                 <xsl:call-template name="breadcrumbs"/>
273               </xsl:when>
274               <xsl:otherwise>
275 <!--*NO* breadtrail-->
276              &#160;
277            </xsl:otherwise>
278             </xsl:choose>
279           </div>
280           <xsl:comment>+
281     |start Menu, mainarea
282     +</xsl:comment>
283           <xsl:if test="div[@id='menu']/ul/li">
284             <xsl:call-template name="menu"/>
285           </xsl:if>
286           <xsl:comment>+
287     |start content
288     +</xsl:comment>
289           <xsl:apply-templates select="div[@id='content']"/>
290           <xsl:comment>+
291     |end content
292     +</xsl:comment>
293           <div class="clearboth">&#160;</div>
294         </div>
295 <!--+
296   |bottomstrip with footer
297   +-->
298         <div id="footer">
299           <xsl:comment>+
300     |start bottomstrip
301     +</xsl:comment>
302           <div class="lastmodified">
303             <xsl:call-template name="last-published"/>
304           </div>
305           <xsl:if test="not($config/disable-copyright-footer = 'true')">
306             <div class="copyright">
307         Copyright &#169;
308         <xsl:text> </xsl:text>
309               <xsl:value-of select="$config/year"/>
310               <xsl:call-template name="current-year">
311                 <xsl:with-param name="copyrightyear" select="$config/year"/>
312               </xsl:call-template>
313 <xsl:text> </xsl:text>
314               <xsl:choose>
315                 <xsl:when test="$config/copyright-link"><a>
316                   <xsl:attribute name="href">
317                     <xsl:value-of select="$config/copyright-link"/>
318                   </xsl:attribute>
319                   <xsl:value-of select="$config/vendor"/></a>
320                 </xsl:when>
321                 <xsl:otherwise>
322                   <xsl:value-of select="$config/vendor"/>
323                 </xsl:otherwise>
324               </xsl:choose>
325             </div>
326           </xsl:if>
327           <xsl:if test="$filename = 'index.html'">
328             <div id="logos" >
329               <xsl:if test="$config/disable-compliance-links/@align">
330                 <xsl:attribute name="style">text-align: <xsl:value-of select="$config/disable-compliance-links/@align"/>
331                 </xsl:attribute>
332               </xsl:if>
333 <!-- W3C logos style="text-align: center;"-->
334               <xsl:call-template name="compliancy-logos"/>
335               <xsl:if test="$filename = 'index.html' and $config/credits">
336                 <xsl:for-each select="$config/credits/credit[not(@role='pdf')]">
337                   <xsl:if test="not(@box-location = 'alt') and not(@box-location = 'alt2')">
338                     <xsl:variable name="name" select="name"/>
339                     <xsl:variable name="url" select="url"/>
340                     <xsl:variable name="image" select="image"/>
341                     <xsl:variable name="width" select="width"/>
342                     <xsl:variable name="height" select="height"/><a href="{$url}">
343                     <img alt="{$name} - logo" title="{$name}" border="0">
344                       <xsl:attribute name="src">
345                         <xsl:if test="not(starts-with($image, 'http://'))">
346                           <xsl:value-of select="$root"/>
347                         </xsl:if>
348                         <xsl:value-of select="$image"/>
349                       </xsl:attribute>
350                       <xsl:attribute name="style">
351                         <xsl:if test="$width">width: <xsl:value-of select="$width"/>px;</xsl:if>
352                         <xsl:if test="$height">height: <xsl:value-of select="$height"/>px;</xsl:if>
353                       </xsl:attribute>
354                     </img></a>
355                   </xsl:if>
356                 </xsl:for-each>
357               </xsl:if>
358             </div>
359           </xsl:if>
360           <xsl:if test="$config/host-logo and not($config/host-logo = '')">
361             <div class="host">
362               <xsl:call-template name="renderlogo">
363                 <xsl:with-param name="name" select="$config/host-name"/>
364                 <xsl:with-param name="url" select="$config/host-url"/>
365                 <xsl:with-param name="logo" select="$config/host-logo"/>
366                 <xsl:with-param name="root" select="$root"/>
367               </xsl:call-template>
368             </div>
369           </xsl:if>
370           <xsl:if test="$config/feedback">
371             <xsl:call-template name="feedback"/>
372           </xsl:if>
373           <xsl:comment>+
374     |end bottomstrip
375     +</xsl:comment>
376         </div>
377       </body>
378     </html>
379   </xsl:template>
380   <xsl:template name="last-published">
381 <script type="text/javascript"><![CDATA[<!--
382 document.write("]]><i18n:text >Last Published:</i18n:text><![CDATA[ " + document.lastModified);
383 //  -->]]></script>
384   </xsl:template>
385 <!--headings-->
386   <xsl:template match="div[@class = 'skinconf-heading-1']">
387     <xsl:choose>
388       <xsl:when test="//skinconfig/headings/@type='underlined'">
389         <h2 class="underlined_10">
390           <xsl:value-of select="h1"/>
391         </h2>
392       </xsl:when>
393       <xsl:when test="//skinconfig/headings/@type='boxed'">
394         <h2 class="boxed">
395           <xsl:value-of select="h1"/>
396         </h2>
397       </xsl:when>
398       <xsl:otherwise>
399         <h2 class="h3">
400           <xsl:value-of select="h1"/>
401         </h2>
402       </xsl:otherwise>
403     </xsl:choose>
404   </xsl:template>
405   <xsl:template match="div[@class = 'skinconf-heading-2']">
406     <xsl:choose>
407       <xsl:when test="//skinconfig/headings/@type='underlined'">
408         <h3 class="underlined_5">
409           <xsl:value-of select="h2"/>
410         </h3>
411       </xsl:when>
412       <xsl:when test="//skinconfig/headings/@type='boxed'">
413         <h3 class="boxed">
414           <xsl:value-of select="h2"/>
415         </h3>
416       </xsl:when>
417       <xsl:otherwise>
418         <h3 class="h4">
419           <xsl:value-of select="h2"/>
420         </h3>
421       </xsl:otherwise>
422     </xsl:choose>
423   </xsl:template>
424 <!-- Add links to any standards-compliance logos -->
425   <xsl:template name="compliancy-logos">
426     <xsl:if test="$filename = 'index.html' and $config/disable-compliance-links = 'false'"><a href="http://validator.w3.org/check/referer">
427       <img class="logoImage" 
428           src="{$skin-img-dir}/valid-html401.png"
429           alt="Valid HTML 4.01!" title="Valid HTML 4.01!" style="height: 31px; width: 88px;" /></a><a href="http://jigsaw.w3.org/css-validator/check/referer">
430       <img class="logoImage" 
431           src="{$skin-img-dir}/vcss.png" 
432           alt="Valid CSS!" title="Valid CSS!" style="height: 31px; width: 88px;"/></a>
433     </xsl:if>
434   </xsl:template>
435   <xsl:template name="menu">
436     <xsl:comment>+
437     |start Menu
438     +</xsl:comment>
439     <div id="menu">
440 <!--menu - inner-->
441       <xsl:for-each select = "div[@id='menu']/ul/li">
442         <xsl:call-template name = "innermenuli" >
443           <xsl:with-param name="id" select="concat('1.', position())"/>
444         </xsl:call-template>
445       </xsl:for-each>
446 <!--
447                         <xsl:apply-templates select="div[@id='menu']/*" />
448                 -->
449 <!-- Search box: alternative location -->
450       <xsl:if 
451             test="$config/search and $config/search/@box-location='alt'">
452         <xsl:comment>+
453     |start Search
454     +</xsl:comment>
455         <div class="searchbox">
456           <hr />
457           <xsl:variable name="search-prompt">
458             <i18n:text>Search the site with</i18n:text>
459 <xsl:text> </xsl:text>
460             <xsl:value-of select="$config/search/@provider"/>
461           </xsl:variable>
462           <xsl:choose>
463             <xsl:when test="$config/search/@provider = 'lucene'">
464 <!-- Lucene search -->
465               <form method="get" action="{$root}{$lucene-search}">
466                 <input type="text" id="query" name="queryString" size="18" onFocus="getBlank (this, '{$search-prompt}');">
467                   <xsl:attribute name="value">
468                     <xsl:value-of select="$search-prompt"/>
469                   </xsl:attribute>
470                 </input>&#160;
471                   <input type="submit" value="Search" name="Search" i18n:attr="value"/>
472               </form>
473             </xsl:when>
474             <xsl:otherwise>
475                     <form class="roundtopsmall" method="get" action="http://search.lucidimagination.com/p:lucene">
476                   <input type="text" id="query" name="q" size="25" onFocus="getBlank (this, '{$search-prompt}');">
477                     <xsl:attribute name="value">
478                       <xsl:value-of select="$search-prompt"/>
479                     </xsl:attribute>
480                   </input>&#160; 
481                 <input type="submit" value="Search" name="Search" i18n:attr="value"/>
482                 </form>
483             </xsl:otherwise>
484           </xsl:choose>
485         </div>
486         <xsl:comment>+
487     |end search
488     +</xsl:comment>
489       </xsl:if>
490 <!--credits in alternative location-->
491       <div id="credit">
492         <xsl:if test="$filename = 'index.html' and $config/credits and ($config/credits/credit/@box-location = 'alt')">
493           <hr />
494           <xsl:for-each select="$config/credits/credit[not(@role='pdf')]">
495             <xsl:if test="@box-location = 'alt'">
496               <xsl:variable name="name" select="name"/>
497               <xsl:variable name="url" select="url"/>
498               <xsl:variable name="image" select="image"/>
499               <xsl:variable name="width" select="width"/>
500               <xsl:variable name="height" select="height"/><a href="{$url}">
501               <img alt="{$name} - logo" title="{$name}" border="0">
502                 <xsl:attribute name="src">
503                   <xsl:if test="not(starts-with($image, 'http://'))">
504                     <xsl:value-of select="$root"/>
505                   </xsl:if>
506                   <xsl:value-of select="$image"/>
507                 </xsl:attribute>
508                 <xsl:attribute name="style">
509                   <xsl:if test="$width">width: <xsl:value-of select="$width"/>px;</xsl:if>
510                   <xsl:if test="$height">height: <xsl:value-of select="$height"/>px;</xsl:if>
511                 </xsl:attribute>
512               </img></a>
513             </xsl:if>
514           </xsl:for-each>
515         </xsl:if>
516 <!-- Message of the day -->
517         <xsl:if test="$config/motd">
518           <xsl:for-each select="$config/motd/motd-option">
519             <xsl:choose>
520               <xsl:when test="@starts-with='true'">
521                 <xsl:if test="starts-with($path, @pattern)">
522                   <xsl:if test="motd-page/@location='alt' or motd-page/@location='both'">
523                     <hr />
524                     <xsl:value-of select="motd-page"/>
525                     <xsl:if test="motd-page-url">
526 <xsl:text> (</xsl:text><a>
527                       <xsl:attribute name="href">
528                         <xsl:value-of select="motd-page-url"/>
529                       </xsl:attribute>
530 <xsl:text>More</xsl:text></a>
531 <xsl:text>)</xsl:text>
532                     </xsl:if>
533                   </xsl:if>
534                 </xsl:if>
535               </xsl:when>
536               <xsl:otherwise>
537                 <xsl:if test="contains($path, @pattern)">
538                   <xsl:if test="motd-page/@location='alt' or motd-page/@location='both'">
539                     <hr />
540                     <xsl:value-of select="motd-page"/>
541                     <xsl:if test="motd-page-url">
542 <xsl:text> (</xsl:text><a>
543                       <xsl:attribute name="href">
544                         <xsl:value-of select="motd-page-url"/>
545                       </xsl:attribute>
546 <xsl:text>More</xsl:text></a>
547 <xsl:text>)</xsl:text>
548                     </xsl:if>
549                   </xsl:if>
550                 </xsl:if>
551               </xsl:otherwise>
552             </xsl:choose>
553           </xsl:for-each>
554         </xsl:if>
555       </div>
556       <div id="roundbottom">
557         <img 
558                 src="{$skin-img-dir}/rc-b-l-15-1body-2menu-3menu.png" 
559                 alt="" width="15" height="15" class="corner" 
560                 style="display: none" />
561       </div>
562 <!--credits in alternative location #2-->
563       <xsl:comment>+
564   |alternative credits
565   +</xsl:comment>
566       <div id="credit2">
567         <xsl:if test="$config/credits and ($config/credits/credit/@box-location = 'alt2')">
568           <xsl:for-each select="$config/credits/credit[not(@role='pdf')]">
569             <xsl:if test="@box-location = 'alt2'">
570               <xsl:variable name="name" select="name"/>
571               <xsl:variable name="url" select="url"/>
572               <xsl:variable name="image" select="image"/>
573               <xsl:variable name="width" select="width"/>
574               <xsl:variable name="height" select="height"/><a href="{$url}">
575               <img alt="{$name} - logo" title="{$name}" border="0">
576                 <xsl:attribute name="src">
577                   <xsl:if test="not(starts-with($image, 'http://'))">
578                     <xsl:value-of select="$root"/>
579                   </xsl:if>
580                   <xsl:value-of select="$image"/>
581                 </xsl:attribute>
582                 <xsl:attribute name="style">
583                   <xsl:if test="$width">width: <xsl:value-of select="$width"/>px;</xsl:if>
584                   <xsl:if test="$height">height: <xsl:value-of select="$height"/>px;</xsl:if>
585                 </xsl:attribute>
586               </img></a>
587             </xsl:if>
588           </xsl:for-each>
589         </xsl:if>
590       </div>
591     </div>
592     <xsl:comment>+
593     |end Menu
594     +</xsl:comment>
595   </xsl:template>
596   <xsl:template name="innermenuli">
597     <xsl:param name="id"/>
598     <xsl:variable name="tagid">
599       <xsl:choose>
600         <xsl:when test="descendant-or-self::node()/li/div/@class='current'">
601           <xsl:value-of select="concat('menu_selected_',$id)"/>
602         </xsl:when>
603         <xsl:otherwise>
604           <xsl:value-of select="concat('menu_',concat(font,$id))"/>
605         </xsl:otherwise>
606       </xsl:choose>
607     </xsl:variable>
608     <xsl:variable name="whichGroup">
609       <xsl:choose>
610         <xsl:when test="descendant-or-self::node()/li/div/@class='current'">selectedmenuitemgroup</xsl:when>
611         <xsl:otherwise>menuitemgroup</xsl:otherwise>
612       </xsl:choose>
613     </xsl:variable>
614     <div class="menutitle" id="{$tagid}Title" 
615         onclick="SwitchMenu('{$tagid}', '{$root}skin/')">
616       <xsl:if test="contains($tagid, '_selected_')" >
617         <xsl:attribute name="style">
618 <xsl:text>background-image: url('</xsl:text>
619           <xsl:value-of select="$root"/>
620 <xsl:text>skin/images/chapter_open.gif');</xsl:text>
621         </xsl:attribute>
622       </xsl:if>
623       <xsl:value-of select="h1"/>
624     </div>
625     <div class="{$whichGroup}" id="{$tagid}">
626       <xsl:if test="contains($tagid, '_selected_')" >
627         <xsl:attribute name="style">
628 <xsl:text>display: block;</xsl:text>
629         </xsl:attribute>
630       </xsl:if>
631       <xsl:for-each select= "ul/li">
632         <xsl:choose>
633           <xsl:when test="a">
634             <div class="menuitem"><a>
635               <xsl:attribute name="href">
636                 <xsl:value-of select="a/@href"/>
637               </xsl:attribute>
638               <xsl:if test="a/@title!=''">
639                 <xsl:attribute name="title">
640                   <xsl:value-of select="a/@title"/>
641                 </xsl:attribute>
642               </xsl:if>
643               <xsl:value-of select="a"/></a>
644             </div>
645           </xsl:when>
646           <xsl:when test="div/@class='current'">
647             <div class="menupage">
648               <div class="menupagetitle">
649                 <xsl:value-of select="div" />
650               </div>
651               <xsl:if test="$config/toc/@max-depth > 0
652                     and contains($minitoc-location,'menu')
653                     and count(//tocitems/tocitem) >= $config/toc/@min-sections">
654                 <div class="menupageitemgroup">
655                   <xsl:for-each select = "//tocitems/tocitem">
656                     <div class="menupageitem">
657                       <xsl:choose>
658                         <xsl:when test="string-length(@title)>15"><a href="{@href}" title="{@title}">
659                           <xsl:value-of select="substring(@title,0,20)" />...</a>
660                         </xsl:when>
661                         <xsl:otherwise><a href="{@href}">
662                           <xsl:value-of select="@title" /></a>
663                         </xsl:otherwise>
664                       </xsl:choose>
665                     </div>
666                   </xsl:for-each>
667                 </div>
668               </xsl:if>
669             </div>
670           </xsl:when>
671           <xsl:otherwise>
672             <xsl:call-template name = "innermenuli">
673               <xsl:with-param name="id" select="concat($id, '.', position())"/>
674             </xsl:call-template>
675           </xsl:otherwise>
676         </xsl:choose>
677       </xsl:for-each>
678     </div>
679   </xsl:template>
680 <!--+
681     |Generates the PDF link 
682     +-->
683   <xsl:template match="div[@id='skinconf-pdflink']">
684     <xsl:if test="not($config/disable-pdf-link) or $disable-pdf-link = 'false'">
685       <div class="pdflink" title="Portable Document Format"><a href="{$filename-noext}.pdf" class="dida">
686         <img class="skin" src="{$skin-img-dir}/pdfdoc.gif" alt="PDF -icon" />
687         <br/>
688         PDF</a>
689       </div>
690     </xsl:if>
691   </xsl:template>
692   <xsl:template match="div[@id='skinconf-xmllink']">
693     <xsl:if test="not($config/disable-xml-link) or $disable-xml-link = 'false'">
694       <div class="xmllink" title="raw XML"><a href="{$filename-noext}.xml" class="dida">
695         <img class="skin" src="{$skin-img-dir}/xmldoc.gif" alt="XML - icon" />
696         <br/>
697         XML</a>
698       </div>
699     </xsl:if>
700   </xsl:template>
701   <xsl:template match="div[@id='skinconf-txtlink']">
702     <xsl:if test="not($config/disable-txt-link) or $disable-txt-link = 'false'">
703       <div class="podlink" title="Plain Text Documentation"><a href="{$filename-noext}.txt" class="dida">
704         <img class="skin" src="{$skin-img-dir}/txtdoc.png" alt="TXT - icon" />
705         <br/>
706         TXT</a>
707       </div>
708     </xsl:if>
709   </xsl:template>
710   <xsl:template match="div[@id='skinconf-podlink']">
711     <xsl:if test="not($config/disable-pod-link) or $disable-pod-link = 'false'">
712       <div class="podlink" title="Plain Old Documentation"><a href="{$filename-noext}.pod" class="dida">
713         <img class="skin" src="{$skin-img-dir}/poddoc.png" alt="POD - icon" />
714         <br/>
715         POD</a>
716       </div>
717     </xsl:if>
718   </xsl:template>
719   <xsl:template match="div[@id='skinconf-printlink']">
720     <xsl:if test="not($config/disable-print-link) or $disable-print-link = 'false'">
721 <script type="text/javascript" language="Javascript">
722 function printit() {
723   if (window.print) {
724     window.focus();
725     window.print();
726   }
727 }
728         </script>
729 <script type="text/javascript" language="Javascript">
730 var NS = (navigator.appName == "Netscape");
731 var VERSION = parseInt(navigator.appVersion);
732 if (VERSION > 3) {
733   document.write('<div class="printlink" title="Print this Page">');
734   document.write('  <a href="javascript:printit()" class="dida">');
735   document.write('    <img class="skin" src="{$skin-img-dir}/printer.gif" alt="print - icon" />');
736   document.write('    <br />');
737   document.write('  PRINT</a>');
738   document.write('</div>');
739 }
740         </script>
741     </xsl:if>
742   </xsl:template>
743   <xsl:template match="div[@id='disable-font-script']">
744     <xsl:if test="$disable-font-script = 'false'">
745       <div class="trail">
746         <i18n:text >Font size:</i18n:text> 
747                   &#160;<input type="button" onclick="ndeSetTextSize('reset'); return false;" title="Reset text" class="resetfont" value="Reset"/>      
748                   &#160;<input type="button" onclick="ndeSetTextSize('decr'); return false;" title="Shrink text" class="smallerfont" value="-a"/>
749                   &#160;<input type="button" onclick="ndeSetTextSize('incr'); return false;" title="Enlarge text" class="biggerfont" value="+a"/>
750       </div>
751     </xsl:if>
752   </xsl:template>
753   <xsl:template match="div[@id='skinconf-toc-page']">
754 <!-- Message of the day -->
755     <xsl:if test="$config/motd">
756       <xsl:for-each select="$config/motd/motd-option">
757         <xsl:choose>
758           <xsl:when test="@starts-with='true'">
759             <xsl:if test="starts-with($path, @pattern)">
760               <xsl:if test="motd-page/@location='page' or motd-page/@location='both'">
761                 <div id="motd-area">
762                   <xsl:value-of select="motd-page"/>
763                   <xsl:if test="motd-page-url">
764 <xsl:text> (</xsl:text><a>
765                     <xsl:attribute name="href">
766                       <xsl:value-of select="motd-page-url"/>
767                     </xsl:attribute>
768 <xsl:text>More</xsl:text></a>
769 <xsl:text>)</xsl:text>
770                   </xsl:if>
771                 </div>
772               </xsl:if>
773             </xsl:if>
774           </xsl:when>
775           <xsl:otherwise>
776             <xsl:if test="contains($path, @pattern)">
777               <xsl:if test="motd-page/@location='page' or motd-page/@location='both'">
778                 <div id="motd-area">
779                   <xsl:value-of select="motd-page"/>
780                   <xsl:if test="motd-page-url">
781 <xsl:text> (</xsl:text><a>
782                     <xsl:attribute name="href">
783                       <xsl:value-of select="motd-page-url"/>
784                     </xsl:attribute>
785 <xsl:text>More</xsl:text></a>
786 <xsl:text>)</xsl:text>
787                   </xsl:if>
788                 </div>
789               </xsl:if>
790             </xsl:if>
791           </xsl:otherwise>
792         </xsl:choose>
793       </xsl:for-each>
794     </xsl:if>
795 <!-- Table of Contents ToC -->
796     <xsl:if test="$config/toc">
797       <xsl:if test="contains($minitoc-location,'page')">
798         <xsl:if test="(count(//tocitems/tocitem) >= $config/toc/@min-sections) or (//tocitems/@force = 'true')">
799           <div id="minitoc-area">
800             <xsl:call-template name="minitoc">
801               <xsl:with-param name="tocroot" select="//tocitems"/>
802             </xsl:call-template>
803           </div>
804         </xsl:if>
805       </xsl:if>
806     </xsl:if>
807   </xsl:template>
808 </xsl:stylesheet>