2N/A<?
xml version="1.0"?>
2N/A Licensed to the Apache Software Foundation (ASF) under one or more 2N/A contributor license agreements. See the NOTICE file distributed with 2N/A this work for additional information regarding copyright ownership. 2N/A The ASF licenses this file to You under the Apache License, Version 2.0 2N/A (the "License"); you may not use this file except in compliance with 2N/A the License. You may obtain a copy of the License at 2N/A Unless required by applicable law or agreed to in writing, software 2N/A distributed under the License is distributed on an "AS IS" BASIS, 2N/A WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2N/A See the License for the specific language governing permissions and 2N/A limitations under the License. 2N/A<!
DOCTYPE xsl:
stylesheet [
313N/A<
xsl:
stylesheet version="1.0" 313N/A<!-- Please, don't hard-code output strings! Use the language --> 313N/A<!-- files and the translation "stuff"... --> 2238N/A<!-- Injected variables: --> 313N/A<!-- $is-chm - (boolean) target is for CHM generation or not --> 313N/A<!-- $is-zip - (boolean) target is for ZIP generation or not --> 313N/A<!-- $message - (node-set) localized common text snippets --> 313N/A<!-- $doclang - (string) document language --> 2238N/A<!-- $output-encoding - (string) MIME charset name of the output --> 127N/A<!-- Constants used for case translation --> 127N/A<
xsl:
variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
1622N/A<
xsl:
variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
127N/A<!-- used for inline content catching in <example>s --> 538N/A<
xsl:
variable name="blockelements">
538N/A p example note table ul ol dl pre highlight img blockquote
538N/A<!-- relative path to /manual/ --> 538N/A<
xsl:
variable name="metafile" select="document(/*/@metafile)/metafile" />
327N/A<!-- load outsourced page types --> 327N/A<!-- load utility snippets --> 2238N/A<!-- make sure, we set relative anchors only, if we're actually --> 2238N/A<!-- transforming a modulefile (see <directive> template) --> 2238N/A<
xsl:
variable name="in-modulesynopsis" select="boolean(/modulesynopsis)" />
177N/A<!-- when referencing to a directory, we may need to complete the path --> 2N/A<!-- with the index file (for offline applications like *.chm files) --> 145N/A<
xsl:
variable name="index-file">
38N/A<!-- it may be desired to open external targets in a new window --> 1622N/A<
xsl:
variable name="ext-target" select="boolean($is-chm)" />
477N/A<
xsl:
template match="/">
538N/A <
xsl:
if test="not($metafile/@reference)">
38N/A <
xsl:
message terminate="yes">
2N/A Invalid metafile. Probably your build system is not up-to-date.
6N/A Get a current version and try again.
3778N/A<!-- #################################################################### --> 3778N/A<!-- Utility templates for constructing pages --> 3778N/A<!-- #################################################################### --> 34N/A<!-- ==================================================================== --> 94N/A<!-- ==================================================================== --> 94N/A<
xsl:
template name="head">
156N/A <!-- the meta element is necessary for offline handling like CHM --> 59N/A <
xsl:
when test="$is-chm or $is-zip">
1273N/A <
meta http-
equiv="Content-Type" 2N/A <
xsl:
text> </
xsl:
text>
85N/A <
xsl:
text>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</
xsl:
text>
61N/A <
xsl:
text>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</
xsl:
text>
61N/A <
xsl:
text>This file is generated from xml source: </
xsl:
text>
61N/A <
xsl:
text>DO NOT EDIT</
xsl:
text>
61N/A <
xsl:
text>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</
xsl:
text>
61N/A <
xsl:
text>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</
xsl:
text>
74N/A <
xsl:
value-
of select="name"/>
172N/A <
xsl:
value-
of select="title"/>
172N/A <
xsl:
value-
of select="normalize-space($message[@id='apachetitle'])"/>
220N/A <!-- chm files get a slightly different stylesheet --> 454N/A <
xsl:
when test="$is-chm">
172N/A <!-- zip packages do also --> 61N/A <
xsl:
when test="$is-zip">
61N/A <
link title="No Sidebar - Default font size" type="text/css" media="all" 61N/A rel="alternate stylesheet" 64N/A <
link title="No Sidebar - Default font size" type="text/css" media="all" 43N/A rel="alternate stylesheet" 64N/A <!-- chm files do not need a favicon --> 64N/A <
xsl:
if test="not($is-chm or $is-zip)">&lf;
16N/A<!-- ==================================================================== --> 34N/A<!-- ==================================================================== --> 34N/A<
xsl:
template name="top">
16N/A<
div id="page-header">&lf;
6N/A <
xsl:
call-
template name="super-menu" />&lf;
12N/A <
xsl:
value-
of select="normalize-space($message 12N/A [@id='apachehttpserver'])"/>
12N/A</
div>&lf;
<!-- /page-header --> 12N/A <
a href="./{$index-file}">
369N/A <
xsl:
if test="parentdocument">
369N/A <
xsl:
attribute name="href">
3781N/A <
xsl:
value-
of select="parentdocument/@href"/>
61N/A <
xsl:
with-
param name="uri" select="parentdocument/@href" />
61N/A </
xsl:
call-
template>
279N/A <
xsl:
if test="$ext-target">
279N/A <
xsl:
attribute name="target">_blank</
xsl:
attribute>
181N/A <
xsl:
value-
of select="$message[@id='apache']" />
99N/A <
xsl:
text> > </
xsl:
text>
181N/A <
xsl:
if test="$ext-target">
181N/A <
xsl:
attribute name="target">_blank</
xsl:
attribute>
181N/A <
xsl:
value-
of select="$message[@id='http-server']" />
40N/A <
xsl:
text> > </
xsl:
text>
40N/A <
xsl:
if test="$ext-target">
43N/A <
xsl:
attribute name="target">_blank</
xsl:
attribute>
3442N/A <
xsl:
value-
of select="$message[@id='documentation']" />
814N/A <
xsl:
text> > </
xsl:
text>
814N/A <
a href="{$path}/{$index-file}">
814N/A <
xsl:
value-
of select="$message[@id='version']"/>
2238N/A <
xsl:
text> > </
xsl:
text>
99N/A <
a href="./{$index-file}">
206N/A <
xsl:
value-
of select="$message[@id='modules']"/>
2N/A <
xsl:
text> > </
xsl:
text>
206N/A <
a href="{parentdocument/@href}">
151N/A <
xsl:
with-
param name="uri" select="parentdocument/@href"/>
2N/A <
xsl:
value-
of select="parentdocument"/>
61N/A<!-- ==================================================================== --> 61N/A<!-- out of date --> 61N/A<!-- ==================================================================== --> 61N/A<
xsl:
template name="outofdate">
16N/A <
div class="outofdate">
814N/A <
xsl:
value-
of select="$message[@id='outofdate']"/>
2238N/A<!-- ==================================================================== --> 2238N/A<!-- ==================================================================== --> 2238N/A<
xsl:
template name="bottom">
2238N/A<
xsl:
call-
template name="langavail">
2238N/A <
xsl:
with-
param name="position" select="'bottom'" />
814N/A<
div class="top"><
a href="#page-header"><
img alt="top" src="{$path}/images/up.gif" /></
a></
div>
814N/A<
h2><
a name="comments_section" id="comments_section"><
xsl:
value-
of select="$message[@id='comments']" /></
a></
h2>
814N/A<
div class="warning"><
strong>This section is experimental!</
strong><
br/>Comments placed here should not be expected
2140N/Ato last beyond the testing phase of this system, nor do we in any way guarantee that we'll read them.</
div>&lf;
2127N/A<
xsl:
text disable-
output-
escaping="yes"><
![CDATA[<!--//--><![CDATA[//><!-- 2127N/Avar disqus_shortname = 'httpd'; 3783N/A d.write('<div id="disqus_thread">Comments have been disabled for offline viewing.<\/div>'); 3783N/A//--><!]]]]>></
xsl:
text></
script>
148N/A <
xsl:
text>Copyright 2012 The Apache Software Foundation.</
xsl:
text><
br />
2N/A <
xsl:
if test="normalize-space($message[@id='before-license'])">
47N/A <
xsl:
value-
of select="$message[@id='before-license']"/>
2N/A <
xsl:
text> </
xsl:
text>
3778N/A <
xsl:
if test="$ext-target">
3778N/A <
xsl:
attribute name="target">_blank</
xsl:
attribute>
3778N/A <
xsl:
text>Apache License, Version 2.0</
xsl:
text>
3778N/A <
xsl:
if test="normalize-space($message[@id='after-license'])">
3778N/A <
xsl:
value-
of select="$message[@id='after-license']"/>
146N/A <
xsl:
call-
template name="super-menu"/>
146N/A<
xsl:
text disable-
output-
escaping="yes"><
![CDATA[<!--//--><![CDATA[//><!-- 1653N/Aif (typeof(prettyPrint) !== 'undefined') { 116N/A//--><!]]]]>></
xsl:
text></
script>
260N/A<!-- ==================================================================== --> 260N/A<!-- build an "available languages" section --> 260N/A<!-- ==================================================================== --> 260N/A<
xsl:
template name="langavail">
1767N/A<
xsl:
param name="position" select="'top'" />
260N/A<
xsl:
if test="not($is-chm or $is-zip)">
127N/A<
div class="{$position}lang">&lf;
260N/A <
xsl:
value-
of select="$message[@id='langavail']" />
260N/A <
xsl:
text>: </
xsl:
text>
260N/A <
xsl:
attribute name="href">
1713N/A <
xsl:
if test="$doclang != .">
1713N/A <
xsl:
attribute name="hreflang">
1713N/A <
xsl:
value-
of select="." />
1713N/A <
xsl:
attribute name="rel">alternate</
xsl:
attribute>
2N/A <
xsl:
attribute name="title">
2N/A <
xsl:
value-
of select="document(concat('/lang/', ., 99N/A [@id='nativename']" />
2N/A <
xsl:
value-
of select="." />
2238N/A <
xsl:
if test="position() != last()">
2238N/A <
xsl:
text> |
</
xsl:
text>
160N/A</
div>
<!-- /.{$position}lang --> 165N/A<
xsl:
if test="$position = 'top'">
2N/A <
xsl:
call-
template name="outofdate" />
16N/A<!-- ==================================================================== --> 43N/A<!-- Process a documentation section --> 138N/A<!-- ==================================================================== --> 224N/A<
xsl:
template match="section">
224N/A<
xsl:
call-
template name="toplink" />&lf;
61N/A<
div class="section">&lf;
61N/A <!-- Section heading --> 1192N/A <
a id="{@id}" name="{@id}">
206N/A <
xsl:
apply-
templates select="title" mode="print" />
99N/A <
xsl:
apply-
templates select="title" mode="print" />
99N/A <!-- Section body --> 99N/A <
xsl:
apply-
templates />
61N/A</
div>
<!-- /.section --> 99N/A<!-- ==================================================================== --> 61N/A<!-- handle subsections (lower level headings) --> 99N/A<!-- ==================================================================== --> 99N/A<!-- Section heading --> 61N/A <
xsl:
when test="@id">
61N/A <
a id="{@id}" name="{@id}">
61N/A <
xsl:
apply-
templates select="title" mode="print" />
200N/A <
xsl:
apply-
templates select="title" mode="print" />
99N/A<!-- Section body --> 99N/A<
xsl:
apply-
templates />
99N/A<!-- ==================================================================== --> 99N/A<!-- handle subsubsections (h4) --> 99N/A<!-- ==================================================================== --> 99N/A<!-- Section heading --> 839N/A <
a id="{@id}" name="{@id}">
839N/A <
xsl:
apply-
templates select="title" mode="print" />
99N/A <
xsl:
apply-
templates select="title" mode="print" />
99N/A<!-- Section body --> 99N/A<
xsl:
apply-
templates/>
99N/A<!-- ==================================================================== --> 99N/A<!-- section nesting > h4 is not supported for now --> 99N/A<!-- ==================================================================== --> 200N/A<
xsl:
message terminate="yes">
200N/A <
xsl:
text>FATAL: exceeding maximum section nesting level.</
xsl:
text>
200N/A <
xsl:
text>Perhaps you should consider to split your document into</
xsl:
text>
200N/A <
xsl:
text>several ones...</
xsl:
text>
99N/A<!-- ==================================================================== --> 99N/A<!-- Process source code highlighting --> 102N/A<!-- ==================================================================== --> 102N/A<
xsl:
template match="highlight">
102N/A<
pre class="prettyprint lang-{@language}">
102N/A <!-- highlight body --> 102N/A <
xsl:
apply-
templates />
99N/A</
pre>&lf;
<!-- /.highlight --> 61N/A<!-- ==================================================================== --> 61N/A<!-- (sub)section titles --> 99N/A<!-- ==================================================================== --> 459N/A<!-- ==================================================================== --> 459N/A<!-- generate section index --> 459N/A<!-- ==================================================================== --> 459N/A<
xsl:
template match="section" mode="index">
99N/A <
xsl:
text> </
xsl:
text>
99N/A <
xsl:
when test="@id">
459N/A <
xsl:
apply-
templates select="title" mode="print" />
109N/A <
xsl:
apply-
templates select="title" mode="print" />
109N/A<!-- ==================================================================== --> 109N/A<!-- docs super menu --> 109N/A<!-- ==================================================================== --> 99N/A<
xsl:
template name="super-menu">
99N/A <
a href="{$path}/mod/{$index-file}">
99N/A <
xsl:
value-
of select="$message[@id='modules']" />
200N/A <
xsl:
text> | </
xsl:
text>
99N/A <
xsl:
value-
of select="$message[@id='directives']" />
99N/A <
xsl:
text> | </
xsl:
text>
109N/A <
xsl:
value-
of select="$message[@id='faq']" />
99N/A <
xsl:
text> | </
xsl:
text>
99N/A <
xsl:
value-
of select="$message[@id='glossary']" />
99N/A <
xsl:
text> | </
xsl:
text>
99N/A <
xsl:
value-
of select="$message[@id='sitemap']" />
99N/A<!-- /super-menu --> 99N/A<!-- ==================================================================== --> 99N/A<!-- iterate over *all* nodes; bare text and other inline stuff is --> 99N/A<!-- wrapped into <p><code>, block level elements (defined in --> 99N/A<!-- $blockelements) are applied "as is" --> 99N/A<!-- ==================================================================== --> 459N/A<
xsl:
variable name="blocks" 2238N/A select="concat(' ', normalize-space($blockelements), ' ')" />
99N/A<
xsl:
template match="example">
99N/A<
div class="example">
99N/A <
xsl:
apply-
templates select="title" mode="print" />
99N/A <
xsl:
variable name="is-block-node" 99N/A select="boolean(contains($blocks, 61N/A concat(' ', local-name(), ' ')))"/>
99N/A <!-- bb = (number of) blocks nodes before (the current) --> 206N/A <
xsl:
variable name="bb" 206N/A select="count(preceding-sibling::*[ 206N/A concat(' ', local-name(), ' '))])" />
206N/A <
xsl:
if test="$is-block-node or position()=last()">
206N/A <
xsl:
variable name="content">
206N/A <!-- phew. short explanation, what happens here: --> 206N/A <!-- We want to get the inline stuff between the last --> 206N/A <!-- block node and the current node. --> 206N/A <!-- So filter all previous nodes for the condition --> 206N/A <!-- that the number of block nodes of all of *their* --> 206N/A <!-- previous nodes is >= $bb. Hope that helps ;-) --> 206N/A select="preceding-sibling::node()[ 206N/A count(preceding-sibling::*[ 206N/A concat(' ', local-name(), ' '))]) 206N/A select="self::node()[not($is-block-node)]" />
206N/A <!-- apply bare text only, if it's not only \s or empty --> 206N/A <
xsl:
if test="not(normalize-space($content) = '')">
219N/A <!-- same as $content above. xsl:copy-of seems to make --> 219N/A <!-- thread problems with xalan-j ... --> 99N/A <
xsl:
apply-
templates 99N/A select="preceding-sibling::node()[ 99N/A count(preceding-sibling::*[ 99N/A concat(' ', local-name(), 99N/A select="self::node()[not($is-block-node)]" />
99N/A <
xsl:
apply-
templates select="self::node()[$is-block-node]" />
99N/A</
div>
<!-- /.example --> 806N/A<!-- ==================================================================== --> 99N/A<!-- ==================================================================== --> 99N/A<!-- ==================================================================== --> 61N/A<!-- indentations --> 2337N/A<!-- ==================================================================== --> 2337N/A<
xsl:
template match="indent">
2337N/A<!-- ==================================================================== --> 99N/A<!-- ==================================================================== --> 99N/A<
xsl:
template match="note">
99N/A <
xsl:
if test="@type='warning'">
99N/A <
xsl:
attribute name="class">warning</
xsl:
attribute>
99N/A <
xsl:
apply-
templates/>
61N/A<!-- ==================================================================== --> 99N/A<!-- <note><title> --> 99N/A<!-- ==================================================================== --> 99N/A <
xsl:
apply-
templates/>
806N/A<!-- ==================================================================== --> 99N/A<!-- <directive> --> 99N/A<!-- Inserts link to another directive, which might be in another module. --> 99N/A<!-- References are converted into lower case. --> 99N/A<!-- ==================================================================== --> 176N/A<
xsl:
template match="directive" name="directive">
64N/A <
xsl:
when test="@module">
2337N/A <
xsl:
variable name="lowerdirective" 2337N/A select="translate(., $uppercase, $lowercase)" />
64N/A <
a href="#{$lowerdirective}">
2337N/A <
xsl:
if test="@type='section'"><</
xsl:
if>
64N/A <
xsl:
if test="@type='section'">></
xsl:
if>
64N/A <
a href="{$path}/mod/{@module}.html#{$lowerdirective}">
62N/A <
xsl:
if test="@type='section'"><</
xsl:
if>
62N/A <
xsl:
value-
of select="."/>
62N/A <
xsl:
if test="@type='section'">></
xsl:
if>
181N/A <
xsl:
if test="@type='section'"><</
xsl:
if>
181N/A <
xsl:
value-
of select="."/>
181N/A <
xsl:
if test="@type='section'">></
xsl:
if>
1273N/A<!-- ==================================================================== --> <!-- Inserts a link to refereed module --> <!-- ==================================================================== --> <
xsl:
template match="module" name="module">
<
a href="{$path}/mod/{.}.html">
<
xsl:
value-
of select="."/>
<!-- ==================================================================== --> <!-- Inserts a link to referred program --> <!-- ==================================================================== --> <
xsl:
template match="program">
<
a href="{$path}/programs/{normalize-space(.)}.html">
<
xsl:
value-
of select="normalize-space(.)" />
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template match="related">
<
xsl:
value-
of select="$message[@id='relatedmodules']" />
<
xsl:
value-
of select="$message[@id='relateddirectives']" />
<
xsl:
if test="count(modulelist/*) > 0">
<
xsl:
apply-
templates select="modulelist" />
<
xsl:
if test="count(directivelist/*) > 0">
<
xsl:
apply-
templates select="directivelist"/>
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
for-
each select="module">
<
xsl:
call-
template name="module"/>
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
for-
each select="directive">
<
xsl:
call-
template name="directive"/>
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template match="table">
<!-- existing border attribute will result in <table class="bordered"> --> <
xsl:
attribute name="class">bordered</
xsl:
attribute>
<
xsl:
when test="@style = 'zebra'">
<
xsl:
apply-
templates select="tr" mode="zebra-table" />
<
xsl:
when test="@style = 'data'">
<
xsl:
apply-
templates select="tr" mode="data-table" />
<
xsl:
template match="tr" mode="data-table">
<!-- style="data": fixed font, padding-left and right alignment for <td>s --> <
xsl:
variable name="cross-table" select="boolean( preceding-sibling::tr/th[1]|following-sibling::tr/th[1])" />
<
xsl:
for-
each select="node()">
<
xsl:
when test="local-name() = 'td'">
<
xsl:
apply-
templates select="*|@*|text()" />
<
xsl:
when test="local-name() = 'th' and count(preceding-sibling::*) > 0)">
<
xsl:
apply-
templates select="*|@*|text()" />
<
xsl:
apply-
templates select="self::node()" />
<
xsl:
template match="tr" mode="zebra-table">
<!-- style="zebra": alternating colors per row, i.e. every second row --> <!-- gets a class="odd". Header lines (no <td>) get a --> <!-- class="header". These lines will be excluded from --> <!-- the "odd" line count. That way header lines act --> <!-- interjectional, which creates a better visual and --> <!-- psychological effect. --> <
xsl:
when test="count(td) = 0">
<
xsl:
attribute name="class">header</
xsl:
attribute>
<
xsl:
when test="position() mod 2 = (count(preceding-sibling::tr[count(td) = 0]) mod 2)">
<
xsl:
attribute name="class">odd</
xsl:
attribute>
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template match="ol">
<!-- A. B. C. D. (list-style-type="upper-alpha") --> <
xsl:
when test="@type = 'A'">
<
xsl:
attribute name="class">up-A</
xsl:
attribute>
<
xsl:
when test="@type = 'a'">
<
xsl:
attribute name="class">lo-A</
xsl:
attribute>
<!-- ==================================================================== --> <!-- diverse elements --> <!-- Passes through content --> <!-- ==================================================================== --> <
xsl:
template match="summary|description|usage|syntax|default">
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
when test="not(@href)">
<
xsl:
apply-
templates select="@*|*|text()"/>
<
xsl:
apply-
templates select="@*"/>
<
xsl:
with-
param name="uri" select="@href"/>
<
xsl:
apply-
templates select="*|text()"/>
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template name="toplink">
<
a href="#page-header"><
img src="{$path}/images/up.gif" alt="top" /></
a>
<!-- ==================================================================== --> <!-- translator's notes are displayed in a different color --> <!-- ==================================================================== --> <
xsl:
template match="transnote">
<
xsl:
value-
of select="$message[@id='transnote']" />
<!-- ==================================================================== --> <!-- phonetics are enclosed in square brackets and displayed in a --> <!-- ==================================================================== --> <
xsl:
template match="phonetic">
<!-- ==================================================================== --> <!-- link to a glossary anchor --> <!-- ==================================================================== --> <
xsl:
template match="glossary">
<
xsl:
variable name="glosslink">
<
xsl:
value-
of select="@ref"/>
<
xsl:
value-
of select="translate(., $uppercase, $lowercase)"/>
<
a href="{$path}/glossary.html#{$glosslink}" class="glossarylink">
<
xsl:
attribute name="title">
<
xsl:
value-
of select="$message[@id='glossarylink']" />
<!-- ==================================================================== --> <!-- Filter   in text() nodes. --> <!-- In some environments this character won't be transformed correctly, --> <!-- so we just write it explicitely as " " into the output. --> <!-- ==================================================================== --> <
xsl:
param name="text" select="." />
<
xsl:
when test="contains($text, ' ')">
<
xsl:
value-
of select="substring-before($text, ' ')" />
<
xsl:
with-
param name="text" select="substring-after($text, ' ')" />
<
xsl:
value-
of select="$text" />
<!-- ==================================================================== --> <!-- Process everything else by just passing it through --> <!-- ==================================================================== --> <
xsl:
message terminate="yes">
<
xsl:
text>Unknown element: </
xsl:
text>
<
xsl:
value-
of select="local-name()" />&lf;
<
xsl:
text>Is the document valid (try `build validate-xml`)?</
xsl:
text>
<
xsl:
template match="@*">
<
xsl:
apply-
templates select="*|@*|text()" />
<
xsl:
template match="br"><
br /></
xsl:
template>
<
xsl:
template match="tr"><
tr><
xsl:
apply-
templates select="*|@*|text()" /></
tr></
xsl:
template>
<
xsl:
template match="th"><
th><
xsl:
apply-
templates select="*|@*|text()" /></
th></
xsl:
template>
<
xsl:
template match="td"><
td><
xsl:
apply-
templates select="*|@*|text()" /></
td></
xsl:
template>
<
xsl:
template match="p"><
p><
xsl:
apply-
templates select="*|@*|text()" /></
p></
xsl:
template>
<
xsl:
template match="ul"><
ul><
xsl:
apply-
templates select="*|@*|text()" /></
ul></
xsl:
template>
<
xsl:
template match="li"><
li><
xsl:
apply-
templates select="*|@*|text()" /></
li></
xsl:
template>
<
xsl:
template match="dl"><
dl><
xsl:
apply-
templates select="*|@*|text()" /></
dl></
xsl:
template>
<
xsl:
template match="dt"><
dt><
xsl:
apply-
templates select="*|@*|text()" /></
dt></
xsl:
template>
<
xsl:
template match="dd"><
dd><
xsl:
apply-
templates select="*|@*|text()" /></
dd></
xsl:
template>
<
xsl:
template match="em"><
em><
xsl:
apply-
templates select="*|@*|text()" /></
em></
xsl:
template>
<
xsl:
template match="strong"><
strong><
xsl:
apply-
templates select="*|@*|text()" /></
strong></
xsl:
template>
<
xsl:
template match="pre"><
pre><
xsl:
apply-
templates select="*|@*|text()" /></
pre></
xsl:
template>
<
xsl:
template match="code"><
code><
xsl:
apply-
templates select="*|@*|text()" /></
code></
xsl:
template>
<
xsl:
template match="var"><
var><
xsl:
apply-
templates select="*|@*|text()" /></
var></
xsl:
template>
<
xsl:
template match="dfn"><
dfn><
xsl:
apply-
templates select="*|@*|text()" /></
dfn></
xsl:
template>
<
xsl:
template match="blockquote"><
blockquote><
xsl:
apply-
templates select="*|@*|text()" /></
blockquote></
xsl:
template>
<
xsl:
template match="q"><
q><
xsl:
apply-
templates select="*|@*|text()" /></
q></
xsl:
template>
<
xsl:
template match="cite"><
cite><
xsl:
apply-
templates select="*|@*|text()" /></
cite></
xsl:
template>
<
xsl:
template match="img"><
img><
xsl:
apply-
templates select="*|@*|text()" /></
img></
xsl:
template>
<!-- ==================================================================== --> <!-- create a letter bar --> <!-- ==================================================================== --> <
xsl:
template name="letter-bar">
<
xsl:
param name="letters" />
<
xsl:
param name="first" />
<
xsl:
if test="not($first)">
<
a href="#{substring($letters,1,1)}">
<
xsl:
value-
of select="substring($letters, 1, 1)" />
<
xsl:
if test="string-length($letters) > 1">
<
xsl:
call-
template name="letter-bar">
<
xsl:
with-
param name="letters" select="substring($letters, 2)" />
<
xsl:
with-
param name="first" select="false()" />
<!-- ==================================================================== --> <!-- template(s) for collecting all start letters of directives --> <!-- ==================================================================== --> <
xsl:
template name="directive-startletters">
<
xsl:
param name="directives" />
<
xsl:
call-
template name="_squeeze-letters">
<
xsl:
with-
param name="lastletter" select="''" />
<
xsl:
with-
param name="letters">
<
xsl:
for-
each select="$directives">
<
xsl:
sort select="name"/>
select="translate(substring(normalize-space(name), 1, 1), $lowercase, $uppercase)" />
<!-- /directive-startletters --> <!-- ==================================================================== --> <!-- squeeze subsequent letters in a string --> <!-- ==================================================================== --> <
xsl:
template name="_squeeze-letters">
<
xsl:
param name="letters"/>
<
xsl:
param name="lastletter"/>
<
xsl:
variable name="current" select="substring($letters, 1, 1)" />
<
xsl:
if test="not($lastletter = $current)">
<
xsl:
value-
of select="$current" />
<
xsl:
if test="string-length($letters) > 1">
<
xsl:
call-
template name="_squeeze-letters">
<
xsl:
with-
param name="letters" select="substring($letters, 2)" />
<
xsl:
with-
param name="lastletter" select="$current"/>
<!-- /_squeeze-letters --> <!-- ==================================================================== --> <!-- fix href and target attribute of an element. --> <!-- ==================================================================== --> <!-- lame is_absolute_uri test --> <
xsl:
when test=" contains($uri, ':') and string-length(substring-before($uri, ':')) < 7">
<
xsl:
if test="$ext-target">
<
xsl:
attribute name="target">_blank</
xsl:
attribute>
<
xsl:
variable name="fragment">
<
xsl:
if test="contains($uri, '#')">
<
xsl:
value-
of select="concat('#', substring-after($uri, '#'))"/>
<
xsl:
variable name="absuri">
<
xsl:
when test="contains($uri, '#')">
<
xsl:
value-
of select="concat('#', substring-before($uri, '#'))"/>
<
xsl:
value-
of select="$uri"/>
<
xsl:
if test="substring($absuri, string-length($uri), 1) = '/'">
<
xsl:
attribute name="href">
<
xsl:
value-
of select="concat($absuri, $index-file, $fragment)"/>
<!-- ==================================================================== --> <!-- Ignore table hints used for latex --> <!-- ==================================================================== --> <
xsl:
template match="columnspec">
<
xsl:
template match="column">