<
xsl:
variable name="path">
<
xsl:
when test="*/relativepath/@href">
<
xsl:
value-
of select="*/relativepath/@href"/>
<
xsl:
value-
of select="'..'"/>
<!-- load outsourced page types --> <!-- make sure, we set relative anchors only, if we're actually transforming a modulefile (see <directive>) --> <
xsl:
variable name="in-modulesynopsis"><
xsl:
choose>
<
xsl:
when test="/quickreference">0</
xsl:
when>
<
xsl:
otherwise>1</
xsl:
otherwise></
xsl:
choose>
<!-- Utility templates for constructing pages --> <
xsl:
template name="head">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This file is generated from xml source: DO NOT EDIT
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
</
xsl:
text>
<!-- insert line break --> <
xsl:
value-
of select="name"/>
<
xsl:
value-
of select="title"/>
</
xsl:
text>
<!-- insert line break --> <
link title="Main stylesheet" type="text/css" media="all" rel="stylesheet"</
xsl:
text>
<!-- insert line break --> <
link title="No Sidebar - Default font size" type="text/css" media="all" rel="alternate stylesheet" </
xsl:
text>
<!-- insert line break --> <
link type="text/css" media="print"</
xsl:
text>
<!-- insert line break --> <
xsl:
template name="top">
</
xsl:
text>
<!-- insert line break --> <
xsl:
call-
template name="super-menu" />
</
xsl:
text>
<!-- insert line break --></
xsl:
text>
<!-- insert line break --> </
div>
<!-- /page-header --></
xsl:
text>
<!-- insert line break --> <
xsl:
if test="parentdocument">
<
xsl:
attribute name="href"><
xsl:
value-
of select="parentdocument/@href"/></
xsl:
attribute>
</
xsl:
text>
<!-- insert line break --></
xsl:
text>
<!-- insert line break --> <
xsl:
text> > </
xsl:
text>
<
xsl:
text> > </
xsl:
text>
<
xsl:
text> > </
xsl:
text>
<
xsl:
text> > </
xsl:
text>
<
xsl:
text> > </
xsl:
text>
<
a href="{parentdocument/@href}">
<
xsl:
value-
of select="parentdocument"/>
<
xsl:
template name="bottom">
</
xsl:
text>
<!-- insert line break --> >Apache HTTP Server Documentation Project</
a>
</
xsl:
text>
<!-- insert line break --> <
xsl:
call-
template name="super-menu"/>
<!-- Process a documentation section --> <
xsl:
template match="section">
<
xsl:
call-
template name="toplink"/>
</
xsl:
text>
<!-- insert line break --></
xsl:
text>
<!-- insert line break --> <
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.
Perhaps you should consider to split your document into
<!-- (sub)section titles --> <!-- Don't print the title twice --> <!-- generate section index --> <
xsl:
template match="section" mode="index">
<
xsl:
apply-
templates select="title" mode="print"/>
</
xsl:
text>
<!-- insert line break --> <
xsl:
apply-
templates select="title" mode="print"/>
<xsl:apply-templates select="section" mode="index"/> </
xsl:
text>
<!-- insert line break --> <
xsl:
template name="super-menu">
<!-- iterate over *all* nodes; bare text and other --> <!-- inline stuff is wrapped into <p><code>, block --> <!-- level elements (defined in $blockelements) are --> <
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(),' ')))"/>
<
xsl:
variable name="bb" select="count(preceding-sibling::*[contains($blocks,concat(' ',local-name(),' '))])"/>
<
xsl:
if test="$is-block-node or position()=last()">
<
xsl:
variable name="content">
<
xsl:
apply-
templates select="preceding-sibling::node()[count(preceding-sibling::*[contains($blocks,concat(' ',local-name(),' '))]) >= $bb]"/>
<
xsl:
apply-
templates select="self::node()[not($is-block-node)]"/>
<!-- apply bare text only, if it's not only \s or empty --> <
xsl:
if test="normalize-space($content) != ''">
<
xsl:
copy-
of select="$content"/>
<
xsl:
apply-
templates select="self::node()[$is-block-node]"/>
</
div>
<!-- /.example --> <!-- don't print twice --> <
xsl:
template match="indent">
<!-- Notes are placed in a table. Uses different back- --> <!-- ground colors, depending on type of note. --> <
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 --> <
xsl:
template match="directive" name="directive">
<
xsl:
variable name="lowerdirective" select="translate(., $uppercase, $lowercase)"/>
<
a href="#{$lowerdirective}">
<
xsl:
if test="@type='section'"><</
xsl:
if>
<
xsl:
value-
of select="."/>
<
xsl:
if test="@type='section'">></
xsl:
if>
<
xsl:
variable name="obs_">
<
xsl:
if test="@status = 'obsolete'">obs_</
xsl:
if>
<
a href="{$path}/mod/{$obs_}{@module}.html#{$lowerdirective}">
<
xsl:
if test="@type='section'"><</
xsl:
if>
<
xsl:
value-
of select="."/>
<
xsl:
if test="@type='section'">></
xsl:
if>
<
xsl:
if test="not(@module)">
<
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:
variable name="obs_">
<
xsl:
if test="@status = 'obsolete'">obs_</
xsl:
if>
<
a href="{$path}/mod/{$obs_}{.}.html">
<
xsl:
value-
of select="."/>
<
xsl:
template match="related">
<
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">
<
xsl:
attribute name="class">bordered</
xsl:
attribute>
<
xsl:
when test="@style = 'zebra'">
<
xsl:
for-
each select="tr">
<
xsl:
when test="count(td) = 0">
<
xsl:
attribute name="class">header</
xsl:
attribute>
<
xsl:
when test="position() mod 2 = (count(preceding-sibling::*[count(td) = 0]) mod 2)">
<
xsl:
attribute name="class">odd</
xsl:
attribute>
</
xsl:
text>
<!-- insert line break --> <
xsl:
template match="ol">
<
xsl:
if test="@type = 'A'">
<
xsl:
attribute name="class">up-A</
xsl:
attribute>
<!-- Passes through content --> <
xsl:
template match="summary">
<!-- Passes through content --> <
xsl:
template match="description">
<!-- Passes through content --> <
xsl:
template match="hint">
<!-- Passes through content --> <
xsl:
template match="usage">
<!-- Passes through content --> <
xsl:
template match="syntax">
<
xsl:
template name="toplink">
<
a href="#page-header"><
img src="{$path}/images/up.gif" alt="top" /></
a>
<!-- Process everything else by just passing it through --> <
xsl:
template match="*|@*">
<
xsl:
apply-
templates select="@*|*|text()"/>
<!-- create a letter bar --> <!-- used in several documents --> <
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:
text> </
xsl:
text>
<
xsl:
value-
of select="substring($letters,1,1)"/>
<
xsl:
text> </
xsl:
text>
<
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 --> <!-- used in several documents --> <
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"/>
<
xsl:
value-
of select="translate(substring(normalize-space(name),1,1),$lowercase,$uppercase)"/>
<
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="$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"/>