1605N/A Licensed to the Apache Software Foundation (ASF) under one or more 1605N/A contributor license agreements. See the NOTICE file distributed with 1605N/A this work for additional information regarding copyright ownership. 1605N/A The ASF licenses this file to You under the Apache License, Version 2.0 1605N/A (the "License"); you may not use this file except in compliance with 1605N/A the License. You may obtain a copy of the License at 1605N/A Unless required by applicable law or agreed to in writing, software 1605N/A distributed under the License is distributed on an "AS IS" BASIS, 1605N/A WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1605N/A See the License for the specific language governing permissions and 1605N/A limitations under the License. 1605N/A<
xsl:
stylesheet version="1.0" 1605N/A<!-- Please, don't hard-code output strings! Use the language --> 1605N/A<!-- files and the translation "stuff"... --> 1605N/A<!-- Injected variables: --> 1605N/A<!-- $is-retired - (boolean) Is this httpd version retired? --> 1605N/A<!-- $is-chm - (boolean) target is for CHM generation or not --> 1605N/A<!-- $is-zip - (boolean) target is for ZIP generation or not --> 1605N/A<!-- $message - (node-set) localized common text snippets --> 1605N/A<!-- $doclang - (string) document language --> 1605N/A<!-- $output-encoding - (string) MIME charset name of the output --> 1605N/A<!-- Constants used for case translation --> 1605N/A<
xsl:
variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
1605N/A<
xsl:
variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
1605N/A<!-- used for inline content catching in <example>s --> 1605N/A<
xsl:
variable name="blockelements">
1605N/A p example note table ul ol dl pre highlight img blockquote
1605N/A<!-- relative path to /manual/ --> 1605N/A<
xsl:
variable name="metafile" select="document(/*/@metafile)/metafile" />
<!-- load outsourced page types --> <!-- load utility snippets --> <!-- make sure, we set relative anchors only, if we're actually --> <!-- transforming a modulefile (see <directive> template) --> <
xsl:
variable name="in-modulesynopsis" select="boolean(/modulesynopsis)" />
<
xsl:
variable name="upgrade" select="boolean(/*/@upgrade)" />
<!-- when referencing to a directory, we may need to complete the path --> <!-- with the index file (for offline applications like *.chm files) --> <
xsl:
variable name="index-file">
<
xsl:
if test="$is-chm or $is-zip">
index.html</
xsl:
if>
<!-- it may be desired to open external targets in a new window --> <
xsl:
variable name="ext-target" select="boolean($is-chm)" />
<
xsl:
if test="not($metafile/@reference)">
<
xsl:
message terminate="yes">
Invalid metafile. Probably your build system is not up-to-date.
Get a current version and try again.
<!-- #################################################################### --> <!-- Utility templates for constructing pages --> <!-- #################################################################### --> <!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template name="head">
<!-- the meta element is necessary for offline handling like CHM --> <
xsl:
when test="$is-chm or $is-zip">
<
meta http-
equiv="Content-Type" content="text/html; charset={$output-encoding}" />
<
xsl:
text>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</
xsl:
text>
<
xsl:
text>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</
xsl:
text>
<
xsl:
text>This file is generated from xml source: </
xsl:
text>
<
xsl:
text>DO NOT EDIT</
xsl:
text>
<
xsl:
text>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</
xsl:
text>
<
xsl:
text>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</
xsl:
text>
<
xsl:
value-
of select="name"/>
<
xsl:
value-
of select="title"/>
<
xsl:
value-
of select="normalize-space($message[@id='apachetitle'])"/>
<!-- chm files get a slightly different stylesheet --> <
xsl:
when test="$is-chm">
<
link type="text/css" rel="stylesheet" media="all" <!-- zip packages do also --> <
xsl:
when test="$is-zip">
<
link title="Main stylesheet" type="text/css" media="all" <
link title="No Sidebar - Default font size" type="text/css" media="all" rel="alternate stylesheet" <
link title="Main stylesheet" type="text/css" media="all" <
link title="No Sidebar - Default font size" type="text/css" media="all" rel="alternate stylesheet" <
link type="text/css" media="print" <!-- chm files do not need a favicon --> <
xsl:
if test="not($is-chm or $is-zip)">&lf;
<
xsl:
if test="$is-retired">
<
xsl:
when test="$upgrade">
<
xsl:
if test="not(/*/@upgrade = '')">
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template name="top">
<
div id="page-header">&lf;
<
xsl:
call-
template name="super-menu" />&lf;
<
xsl:
value-
of select="normalize-space($message [@id='apachehttpserver'])"/>
</
div>&lf;
<!-- /page-header --> <
a href="./{$index-file}">
<
xsl:
if test="parentdocument">
<
xsl:
attribute name="href">
<
xsl:
value-
of select="parentdocument/@href"/>
<
xsl:
with-
param name="uri" select="parentdocument/@href" />
<
xsl:
if test="$ext-target">
<
xsl:
attribute name="target">_blank</
xsl:
attribute>
<
xsl:
value-
of select="$message[@id='apache']" />
<
xsl:
text> > </
xsl:
text>
<
xsl:
if test="$ext-target">
<
xsl:
attribute name="target">_blank</
xsl:
attribute>
<
xsl:
value-
of select="$message[@id='http-server']" />
<
xsl:
text> > </
xsl:
text>
<
xsl:
if test="$ext-target">
<
xsl:
attribute name="target">_blank</
xsl:
attribute>
<
xsl:
value-
of select="$message[@id='documentation']" />
<
xsl:
text> > </
xsl:
text>
<
a href="{$path}/{$index-file}">
<
xsl:
value-
of select="$message[@id='version']"/>
<
xsl:
text> > </
xsl:
text>
<
a href="./{$index-file}">
<
xsl:
value-
of select="$message[@id='modules']"/>
<
xsl:
text> > </
xsl:
text>
<
a href="{parentdocument/@href}">
<
xsl:
with-
param name="uri" select="parentdocument/@href"/>
<
xsl:
value-
of select="parentdocument"/>
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template name="retired">
<
xsl:
if test="$is-retired">
<
xsl:
variable name="base">
<
xsl:
when test="$upgrade">
<
xsl:
if test="not(/*/@upgrade = '')">
<
xsl:
value-
of select="/*/@upgrade" />
<
xsl:
variable name="future">
<
xsl:
when test="$base = 'index'">
<
xsl:
when test="$base = ''">
<
xsl:
value-
of select="concat($metafile/path, $base, '.html')" />
<
xsl:
if test="not($future = '')">
<
p><
xsl:
apply-
templates select="$message[@id='retired.document']" mode="retired" /></
p>
<
xsl:
template match="message">
<
xsl:
template match="link" mode="retired">
<
xsl:
variable name="base">
<
xsl:
when test="$upgrade">
<
xsl:
if test="not(/*/@upgrade = '')">
<
xsl:
value-
of select="/*/@upgrade" />
<
xsl:
variable name="future">
<
xsl:
when test="$base = 'index'">
<
xsl:
when test="$base = ''">
<
xsl:
value-
of select="concat($metafile/path, $base, '.html')" />
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template name="outofdate">
<
xsl:
value-
of select="$message[@id='outofdate']"/>
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template name="bottom">
<
xsl:
call-
template name="langavail">
<
xsl:
with-
param name="position" select="'bottom'" />
<
div class="top"><
a href="#page-header"><
img alt="top" src="{$path}/images/up.gif" /></
a></
div>
<
h2><
a name="comments_section" id="comments_section"><
xsl:
value-
of select="$message[@id='comments']" /></
a></
h2>
<
div class="warning"><
strong>Notice:</
strong><
br/>This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered
invalid/
off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <
a href="http://httpd.apache.org/lists.html">mailing lists</
a>.</
div>&lf;
<
xsl:
text disable-
output-
escaping="yes"><
![CDATA[<!--//--><![CDATA[//><!--var comments_shortname = 'httpd'; d.write('<div id="comments_thread"><\/div>'); d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); //--><!]]]]>></
xsl:
text></
script>
<
xsl:
text>Copyright 2014 The Apache Software Foundation.</
xsl:
text><
br />
<
xsl:
if test="normalize-space($message[@id='before-license'])">
<
xsl:
value-
of select="$message[@id='before-license']"/>
<
xsl:
if test="$ext-target">
<
xsl:
attribute name="target">_blank</
xsl:
attribute>
<
xsl:
text>Apache License, Version 2.0</
xsl:
text>
<
xsl:
if test="normalize-space($message[@id='after-license'])">
<
xsl:
value-
of select="$message[@id='after-license']"/>
<
xsl:
call-
template name="super-menu"/>
<
xsl:
text disable-
output-
escaping="yes"><
![CDATA[<!--//--><![CDATA[//><!--if (typeof(prettyPrint) !== 'undefined') { //--><!]]]]>></
xsl:
text></
script>
<!-- ==================================================================== --> <!-- build an "available languages" section --> <!-- ==================================================================== --> <
xsl:
template name="langavail">
<
xsl:
param name="position" select="'top'" />
<
xsl:
if test="not($is-chm or $is-zip)">
<
div class="{$position}lang">&lf;
<
xsl:
value-
of select="$message[@id='langavail']" />
<
xsl:
attribute name="href">
<
xsl:
if test="$doclang != .">
<
xsl:
attribute name="hreflang">
<
xsl:
value-
of select="." />
<
xsl:
attribute name="rel">alternate</
xsl:
attribute>
<
xsl:
attribute name="title">
<
xsl:
value-
of select="document(concat('/lang/', ., <
xsl:
value-
of select="." />
<
xsl:
if test="position() != last()">
<
xsl:
text> |
</
xsl:
text>
</
div>
<!-- /.{$position}lang --><
xsl:
if test="$position = 'top'">
<
xsl:
call-
template name="outofdate" />
<!-- ==================================================================== --> <!-- Process a documentation section --> <!-- ==================================================================== --> <
xsl:
template match="section">
<
xsl:
call-
template name="toplink" />&lf;
<
div class="section">&lf;
<
a id="{@id}" name="{@id}">
<
xsl:
apply-
templates select="title" mode="print" />
<
xsl:
apply-
templates select="title" mode="print" />
</
div>
<!-- /.section --><!-- ==================================================================== --> <!-- handle subsections (lower level headings) --> <!-- ==================================================================== --> <
a id="{@id}" name="{@id}">
<
xsl:
apply-
templates select="title" mode="print" />
<
xsl:
apply-
templates select="title" mode="print" />
<!-- ==================================================================== --> <!-- handle subsubsections (h4) --> <!-- ==================================================================== --> <
a id="{@id}" name="{@id}">
<
xsl:
apply-
templates select="title" mode="print" />
<
xsl:
apply-
templates select="title" mode="print" />
<!-- ==================================================================== --> <!-- section nesting > h4 is not supported for now --> <!-- ==================================================================== --> <
xsl:
message terminate="yes">
<
xsl:
text>FATAL: exceeding maximum section nesting level.</
xsl:
text>
<
xsl:
text>Perhaps you should consider to split your document into</
xsl:
text>
<
xsl:
text>several ones...</
xsl:
text>
<!-- O(log(n)) (stack usage!) string reverter --> <
xsl:
template name="string-reverse">
<
xsl:
param name="string"/>
<
xsl:
variable name="length" select="string-length($string)"/>
<
xsl:
when test="$length < 2">
<
xsl:
value-
of select="$string"/>
<
xsl:
when test="$length = 2">
<
xsl:
value-
of select="concat(substring($string, 2, 1), substring($string, 1, 1))"/>
<
xsl:
variable name="middle" select="floor($length div 2)"/>
<
xsl:
call-
template name="string-reverse">
<
xsl:
with-
param name="string" select="substring($string, $middle + 1, $middle + 1)"/>
<
xsl:
call-
template name="string-reverse">
<
xsl:
with-
param name="string" select="substring($string, 1, $middle)"/>
<!-- strip empty lines at the beginning --> <
xsl:
template name="pre-ltrim">
<
xsl:
param name="string" />
<
xsl:
variable name="lspace">
<
xsl:
call-
template name="string-reverse">
<
xsl:
with-
param name="string" select="substring-before($string, substring(normalize-space($string), 1, 1))" />
<
xsl:
when test="contains($lspace, '
')">
<
xsl:
value-
of select="substring( 1 + string-length($lspace) - string-length(substring-before($lspace, '
')), <
xsl:
value-
of select="$string" />
<!-- strip whitespace at the end --> <
xsl:
template name="pre-rtrim">
<
xsl:
param name="string" />
<
xsl:
variable name="rev">
<
xsl:
call-
template name="string-reverse">
<
xsl:
with-
param name="string" select="$string" />
<
xsl:
call-
template name="string-reverse">
<
xsl:
with-
param name="string" select="substring( 1 + string-length(substring-before( $rev, substring(normalize-space($rev), 1, 1) <!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template name="pre">
<!-- Simple case: only one text node --> <
xsl:
when test="node()[position() = 1 and self::text()] and count(node()) = 1">
<
xsl:
call-
template name="pre-rtrim">
<
xsl:
with-
param name="string">
<
xsl:
call-
template name="pre-ltrim">
<
xsl:
with-
param name="string" select="node()[position() = 1 and self::text()]" />
<
xsl:
variable name="from">
<
xsl:
when test="node()[position() = 1 and self::text()]">
<
xsl:
value-
of select="2" />
<
xsl:
value-
of select="1" />
<
xsl:
when test="node()[position() = last() and self::text()]">
<
xsl:
value-
of select="count(node()) - 1" />
<
xsl:
value-
of select="count(node())" />
<
xsl:
if test="$from = 2">
<
xsl:
call-
template name="pre-ltrim">
<
xsl:
with-
param name="string" select="node()[position() = 1 and self::text()]" />
<
xsl:
apply-
templates select="node()[position() >= $from and position() <= $to]" />
<
xsl:
if test="$to < count(node())">
<
xsl:
call-
template name="pre-rtrim">
<
xsl:
with-
param name="string" select="node()[position() = last() and self::text()]" />
<!-- ==================================================================== --> <!-- Process source code highlighting --> <!-- ==================================================================== --> <
xsl:
template match="highlight">
<
pre class="prettyprint lang-{@language}">
<
xsl:
call-
template name="pre" />
</
pre>&lf;
<!-- /.highlight --><!-- ==================================================================== --> <!-- (sub)section titles --> <!-- ==================================================================== --> <!-- ==================================================================== --> <!-- generate section index --> <!-- ==================================================================== --> <
xsl:
template match="section" mode="index">
<
xsl:
apply-
templates select="title" mode="print" />
<
xsl:
apply-
templates select="title" mode="print" />
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template name="super-menu">
<
a href="{$path}/mod/{$index-file}">
<
xsl:
value-
of select="$message[@id='modules']" />
<
xsl:
value-
of select="$message[@id='directives']" />
<
xsl:
value-
of select="$message[@id='faq']" />
<
xsl:
value-
of select="$message[@id='glossary']" />
<
xsl:
value-
of select="$message[@id='sitemap']" />
<!-- ==================================================================== --> <!-- iterate over *all* nodes; bare text and other inline stuff is --> <!-- wrapped into <p><code>, block level elements (defined in --> <!-- $blockelements) are applied "as is" --> <!-- ==================================================================== --> <
xsl:
variable name="blocks" select="concat(' ', normalize-space($blockelements), ' ')" />
<
xsl:
template match="example">
<
xsl:
apply-
templates select="title" mode="print" />
<
xsl:
for-
each select="/node()">
<
xsl:
variable name="is-block-node" select="boolean(contains($blocks, concat(' ', local-name(), ' ')))"/>
<!-- bb = (number of) blocks nodes before (the current) --> select="count(preceding-sibling::*[ concat(' ', local-name(), ' '))])" />
<
xsl:
if test="$is-block-node or position()=last()">
<
xsl:
variable name="content">
<!-- phew. short explanation, what happens here: --> <!-- We want to get the inline stuff between the last --> <!-- block node and the current node. --> <!-- So filter all previous nodes for the condition --> <!-- that the number of block nodes of all of *their* --> <!-- previous nodes is >= $bb. Hope that helps ;-) --> select="preceding-sibling::node()[ count(preceding-sibling::*[ concat(' ', local-name(), ' '))]) select="self::node()[not($is-block-node)]" />
<!-- apply bare text only, if it's not only \s or empty --> <
xsl:
if test="not(normalize-space($content) = '')">
<!-- same as $content above. xsl:copy-of seems to make --> <!-- thread problems with xalan-j ... --> select="preceding-sibling::node()[ count(preceding-sibling::*[ concat(' ', local-name(), select="self::node()[not($is-block-node)]" />
<
xsl:
apply-
templates select="self::node()[$is-block-node]" />
</
div>
<!-- /.example --><!-- ==================================================================== --> <!-- ==================================================================== --> <!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template match="indent">
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template match="note">
<
xsl:
if test="@type='warning'">
<
xsl:
attribute name="class">warning</
xsl:
attribute>
<!-- ==================================================================== --> <!-- ==================================================================== --> <!-- ==================================================================== --> <!-- Inserts link to another directive, which might be in another module. --> <!-- References are converted into lower case. --> <!-- ==================================================================== --> <
xsl:
template match="directive" name="directive">
<
xsl:
when test="@module">
<
xsl:
variable name="lowerdirective">
<
xsl:
value-
of select="normalize-space(translate(@name, $uppercase, $lowercase))" />
<
xsl:
value-
of select="normalize-space(translate(., $uppercase, $lowercase))" />
<
a href="#{$lowerdirective}">
<
xsl:
if test="@type='section'"><</
xsl:
if>
<
xsl:
value-
of select="."/>
<
xsl:
if test="@type='section'">></
xsl:
if>
<
a href="{$path}/mod/{normalize-space(@module)}.html#{$lowerdirective}">
<
xsl:
if test="@type='section'"><</
xsl:
if>
<
xsl:
value-
of select="."/>
<
xsl:
if test="@type='section'">></
xsl:
if>
<
xsl:
if test="@type='section'"><</
xsl:
if>
<
xsl:
value-
of select="."/>
<
xsl:
if test="@type='section'">></
xsl:
if>
<!-- ==================================================================== --> <!-- Inserts a link to refereed module --> <!-- ==================================================================== --> <
xsl:
template match="module" name="module">
<
xsl:
when test="@outdated = 'true'">
<
xsl:
value-
of select="."/>
<
a href="{$path}/mod/{normalize-space(.)}.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:
call-
template name="pre" /></
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">