common.xsl revision 147316c371bf8c6338778387b7269f9b24050329
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<?xml version="1.0"?>
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd<!--
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd Licensed to the Apache Software Foundation (ASF) under one or more
a7835c7a8cf86045fdaee65dc2839bfe6314fb1end contributor license agreements. See the NOTICE file distributed with
a7835c7a8cf86045fdaee65dc2839bfe6314fb1end this work for additional information regarding copyright ownership.
db878466c5e95073429dda0bdd001f45e9486e16fielding The ASF licenses this file to You under the Apache License, Version 2.0
db878466c5e95073429dda0bdd001f45e9486e16fielding (the "License"); you may not use this file except in compliance with
db878466c5e95073429dda0bdd001f45e9486e16fielding the License. You may obtain a copy of the License at
db878466c5e95073429dda0bdd001f45e9486e16fielding
db878466c5e95073429dda0bdd001f45e9486e16fielding http://www.apache.org/licenses/LICENSE-2.0
db878466c5e95073429dda0bdd001f45e9486e16fielding
a7835c7a8cf86045fdaee65dc2839bfe6314fb1end Unless required by applicable law or agreed to in writing, software
a7835c7a8cf86045fdaee65dc2839bfe6314fb1end distributed under the License is distributed on an "AS IS" BASIS,
a7835c7a8cf86045fdaee65dc2839bfe6314fb1end WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
a7835c7a8cf86045fdaee65dc2839bfe6314fb1end See the License for the specific language governing permissions and
a7835c7a8cf86045fdaee65dc2839bfe6314fb1end limitations under the License.
a7835c7a8cf86045fdaee65dc2839bfe6314fb1end-->
a7835c7a8cf86045fdaee65dc2839bfe6314fb1end
a7835c7a8cf86045fdaee65dc2839bfe6314fb1end<!DOCTYPE xsl:stylesheet [
a7835c7a8cf86045fdaee65dc2839bfe6314fb1end <!ENTITY nbsp SYSTEM "util/nbsp.xml">
a7835c7a8cf86045fdaee65dc2839bfe6314fb1end <!ENTITY lf SYSTEM "util/lf.xml">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <!ENTITY % HTTPD-VERSION SYSTEM "/version.ent">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive %HTTPD-VERSION;
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive]>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:stylesheet version="1.0"
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
f0528cfc93da36692a5fb7898d7e4a9e95150318nd xmlns="http://www.w3.org/1999/xhtml">
b93889871ef8513dd6bb00a0f05bfb7df326a21bnd
f0528cfc93da36692a5fb7898d7e4a9e95150318nd<!-- -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- Please, don't hard-code output strings! Use the language -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- files and the translation "stuff"... -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- Injected variables: -->
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd<!-- $is-chm - (boolean) target is for CHM generation or not -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- $is-zip - (boolean) target is for ZIP generation or not -->
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd<!-- $message - (node-set) localized common text snippets -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- $doclang - (string) document language -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- $output-encoding - (string) MIME charset name of the output -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- encoding -->
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- Constants used for case translation -->
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- space separated list of blockelements defined in common.dtd -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- used for inline content catching in <example>s -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:variable name="blockelements">
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd p example note table ul ol dl pre highlight img blockquote
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive</xsl:variable>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- relative path to /manual/ -->
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd<xsl:variable name="metafile" select="document(/*/@metafile)/metafile" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:variable name="path" select="$metafile/relpath" />
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- load outsourced page types -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:include href="moduleindex.xsl" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:include href="directiveindex.xsl" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:include href="manualpage.xsl" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:include href="synopsis.xsl" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:include href="sitemap.xsl" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:include href="indexpage.xsl" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:include href="quickreference.xsl" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:include href="faq.xsl" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- load utility snippets -->
97d4d9527b64d7491543a12a3d21134b857cbe4bnd<xsl:include href="util/modtrans.xsl" />
97d4d9527b64d7491543a12a3d21134b857cbe4bnd
97d4d9527b64d7491543a12a3d21134b857cbe4bnd<!-- make sure, we set relative anchors only, if we're actually -->
97d4d9527b64d7491543a12a3d21134b857cbe4bnd<!-- transforming a modulefile (see <directive> template) -->
97d4d9527b64d7491543a12a3d21134b857cbe4bnd<xsl:variable name="in-modulesynopsis" select="boolean(/modulesynopsis)" />
97d4d9527b64d7491543a12a3d21134b857cbe4bnd
97d4d9527b64d7491543a12a3d21134b857cbe4bnd<!-- when referencing to a directory, we may need to complete the path -->
97d4d9527b64d7491543a12a3d21134b857cbe4bnd<!-- with the index file (for offline applications like *.chm files) -->
97d4d9527b64d7491543a12a3d21134b857cbe4bnd<xsl:variable name="index-file">
97d4d9527b64d7491543a12a3d21134b857cbe4bnd <xsl:if test="$is-chm or $is-zip">index.html</xsl:if>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd</xsl:variable>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- it may be desired to open external targets in a new window -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:variable name="ext-target" select="boolean($is-chm)" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
97d4d9527b64d7491543a12a3d21134b857cbe4bnd<xsl:template match="/">
97d4d9527b64d7491543a12a3d21134b857cbe4bnd <xsl:if test="not($metafile/@reference)">
97d4d9527b64d7491543a12a3d21134b857cbe4bnd <xsl:message terminate="yes">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive Invalid metafile. Probably your build system is not up-to-date.
58842e03db54033d15cc224d997f467abc88a97aslive Get a current version and try again.
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive </xsl:message>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive </xsl:if>
58842e03db54033d15cc224d997f467abc88a97aslive <xsl:apply-templates />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive</xsl:template>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- #################################################################### -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- Utility templates for constructing pages -->
5e9423b4ca454c6416a2dc465dea1b1d34cec7a9slive<!-- #################################################################### -->
5e9423b4ca454c6416a2dc465dea1b1d34cec7a9slive
97d4d9527b64d7491543a12a3d21134b857cbe4bnd<!-- ==================================================================== -->
97d4d9527b64d7491543a12a3d21134b857cbe4bnd<!-- HTML head -->
5e9423b4ca454c6416a2dc465dea1b1d34cec7a9slive<!-- ==================================================================== -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:template name="head">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<head>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <!-- the meta element is necessary for offline handling like CHM -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:choose>
5e9423b4ca454c6416a2dc465dea1b1d34cec7a9slive <xsl:when test="$is-chm or $is-zip">
5e9423b4ca454c6416a2dc465dea1b1d34cec7a9slive <meta http-equiv="Content-Type"
97d4d9527b64d7491543a12a3d21134b857cbe4bnd content="text/html; charset={$output-encoding}" />
97d4d9527b64d7491543a12a3d21134b857cbe4bnd </xsl:when>
5e9423b4ca454c6416a2dc465dea1b1d34cec7a9slive <xsl:otherwise>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:comment>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive &lf;
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:text> </xsl:text>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:text>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</xsl:text>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:text>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</xsl:text>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive &lf;
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd <xsl:text> </xsl:text>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:text>This file is generated from xml source: </xsl:text>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:text>DO NOT EDIT</xsl:text>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd &lf;
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:text> </xsl:text>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:text>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</xsl:text>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:text>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</xsl:text>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive &lf;
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:text> </xsl:text>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd </xsl:comment>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd </xsl:otherwise>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd </xsl:choose>&lf;
97d4d9527b64d7491543a12a3d21134b857cbe4bnd
97d4d9527b64d7491543a12a3d21134b857cbe4bnd <title>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd <xsl:choose>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:when test="name">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:value-of select="name"/>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive </xsl:when>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:otherwise>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:value-of select="title"/>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd </xsl:otherwise>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd </xsl:choose>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd
97d4d9527b64d7491543a12a3d21134b857cbe4bnd <xsl:text> </xsl:text>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd <xsl:value-of select="normalize-space($message[@id='apachetitle'])"/>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd </title>&lf;
97d4d9527b64d7491543a12a3d21134b857cbe4bnd
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <!-- chm files get a slightly different stylesheet -->
97d4d9527b64d7491543a12a3d21134b857cbe4bnd <xsl:choose>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:when test="$is-chm">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <link type="text/css" rel="stylesheet" media="all"
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive href="{$path}/style/css/manual-chm.css" />
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd </xsl:when>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <!-- zip packages do also -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:when test="$is-zip">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <link title="Main stylesheet" type="text/css" media="all"
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd rel="stylesheet"
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd href="{$path}/style/css/manual-zip.css" />&lf;
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd <link title="No Sidebar - Default font size" type="text/css" media="all"
b93889871ef8513dd6bb00a0f05bfb7df326a21bnd rel="alternate stylesheet"
b93889871ef8513dd6bb00a0f05bfb7df326a21bnd href="{$path}/style/css/manual-zip-100pc.css"/>
b93889871ef8513dd6bb00a0f05bfb7df326a21bnd </xsl:when>
b93889871ef8513dd6bb00a0f05bfb7df326a21bnd <xsl:otherwise>
b93889871ef8513dd6bb00a0f05bfb7df326a21bnd <link title="Main stylesheet" type="text/css" media="all"
b93889871ef8513dd6bb00a0f05bfb7df326a21bnd rel="stylesheet"
b93889871ef8513dd6bb00a0f05bfb7df326a21bnd href="{$path}/style/css/manual.css" />&lf;
b93889871ef8513dd6bb00a0f05bfb7df326a21bnd <link title="No Sidebar - Default font size" type="text/css" media="all"
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd rel="alternate stylesheet"
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd href="{$path}/style/css/manual-loose-100pc.css"/>
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive </xsl:otherwise>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive </xsl:choose>&lf;
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd <link type="text/css" media="print"
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive rel="stylesheet"
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd href="{$path}/style/css/manual-print.css"/>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <link href="{$path}/style/css/prettify.css" type="text/css" rel="stylesheet" />&lf;
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <script type="text/javascript" src="{$path}/style/scripts/prettify.js">&lf;</script>&lf;
39926890ef5576499f1bd78a1412b43e79f2f694slive <!-- chm files do not need a favicon -->
39926890ef5576499f1bd78a1412b43e79f2f694slive <xsl:if test="not($is-chm or $is-zip)">&lf;
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <link rel="shortcut icon" href="{$path}/images/favicon.ico" />
368bcafaedaee463f769c1b5f3547b9970df90d0slive </xsl:if>
368bcafaedaee463f769c1b5f3547b9970df90d0slive</head>
368bcafaedaee463f769c1b5f3547b9970df90d0slive</xsl:template>
368bcafaedaee463f769c1b5f3547b9970df90d0slive<!-- /head -->
368bcafaedaee463f769c1b5f3547b9970df90d0slive
368bcafaedaee463f769c1b5f3547b9970df90d0slive
368bcafaedaee463f769c1b5f3547b9970df90d0slive<!-- ==================================================================== -->
368bcafaedaee463f769c1b5f3547b9970df90d0slive<!-- page top -->
368bcafaedaee463f769c1b5f3547b9970df90d0slive<!-- ==================================================================== -->
39926890ef5576499f1bd78a1412b43e79f2f694slive<xsl:template name="top">
39926890ef5576499f1bd78a1412b43e79f2f694slive<div id="page-header">&lf;
39926890ef5576499f1bd78a1412b43e79f2f694slive <xsl:call-template name="super-menu" />&lf;
39926890ef5576499f1bd78a1412b43e79f2f694slive
87ea898bcffe2ef490e833dc246a1cc0465d783fslive <p class="apache">
87ea898bcffe2ef490e833dc246a1cc0465d783fslive <xsl:value-of select="normalize-space($message
87ea898bcffe2ef490e833dc246a1cc0465d783fslive [@id='apachehttpserver'])"/>
39926890ef5576499f1bd78a1412b43e79f2f694slive </p>&lf;
39926890ef5576499f1bd78a1412b43e79f2f694slive
39926890ef5576499f1bd78a1412b43e79f2f694slive <img src="{$path}/images/feather.gif" alt="" />
39926890ef5576499f1bd78a1412b43e79f2f694slive</div>&lf; <!-- /page-header -->
39926890ef5576499f1bd78a1412b43e79f2f694slive
87ea898bcffe2ef490e833dc246a1cc0465d783fslive<div class="up">
87ea898bcffe2ef490e833dc246a1cc0465d783fslive <a href="./{$index-file}">
87ea898bcffe2ef490e833dc246a1cc0465d783fslive <xsl:if test="parentdocument">
39926890ef5576499f1bd78a1412b43e79f2f694slive <xsl:attribute name="href">
39926890ef5576499f1bd78a1412b43e79f2f694slive <xsl:value-of select="parentdocument/@href"/>
39926890ef5576499f1bd78a1412b43e79f2f694slive </xsl:attribute>
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd
04ff03c2d7e0ff45ee181eb1fa5bf7649ffcf6bfslive <xsl:call-template name="helper.uri.fix">
368bcafaedaee463f769c1b5f3547b9970df90d0slive <xsl:with-param name="uri" select="parentdocument/@href" />
368bcafaedaee463f769c1b5f3547b9970df90d0slive </xsl:call-template>
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd </xsl:if>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <img src="{$path}/images/left.gif" alt="&lt;-" title="&lt;-" />
04ff03c2d7e0ff45ee181eb1fa5bf7649ffcf6bfslive </a>
87ea898bcffe2ef490e833dc246a1cc0465d783fslive</div>&lf;
87ea898bcffe2ef490e833dc246a1cc0465d783fslive
87ea898bcffe2ef490e833dc246a1cc0465d783fslive<div id="path">&lf;
87ea898bcffe2ef490e833dc246a1cc0465d783fslive <a href="http://www.apache.org/">
87ea898bcffe2ef490e833dc246a1cc0465d783fslive <xsl:if test="$ext-target">
8794d6ba53e0d88bb9d6bee4d7e79c1a8b265444nd <xsl:attribute name="target">_blank</xsl:attribute>
04ff03c2d7e0ff45ee181eb1fa5bf7649ffcf6bfslive </xsl:if>
04ff03c2d7e0ff45ee181eb1fa5bf7649ffcf6bfslive <xsl:value-of select="$message[@id='apache']" />
58842e03db54033d15cc224d997f467abc88a97aslive </a>
04ff03c2d7e0ff45ee181eb1fa5bf7649ffcf6bfslive
39926890ef5576499f1bd78a1412b43e79f2f694slive <xsl:text> &gt; </xsl:text>
39926890ef5576499f1bd78a1412b43e79f2f694slive
39926890ef5576499f1bd78a1412b43e79f2f694slive <a href="http://httpd.apache.org/">
39926890ef5576499f1bd78a1412b43e79f2f694slive <xsl:if test="$ext-target">
39926890ef5576499f1bd78a1412b43e79f2f694slive <xsl:attribute name="target">_blank</xsl:attribute>
39926890ef5576499f1bd78a1412b43e79f2f694slive </xsl:if>
58842e03db54033d15cc224d997f467abc88a97aslive <xsl:value-of select="$message[@id='http-server']" />
39926890ef5576499f1bd78a1412b43e79f2f694slive </a>
39926890ef5576499f1bd78a1412b43e79f2f694slive
1cb160a981947e75a8353da3fe40a653aa87100eslive <xsl:text> &gt; </xsl:text>
58842e03db54033d15cc224d997f467abc88a97aslive
58842e03db54033d15cc224d997f467abc88a97aslive <a href="http://httpd.apache.org/docs/">
58842e03db54033d15cc224d997f467abc88a97aslive <xsl:if test="$ext-target">
58842e03db54033d15cc224d997f467abc88a97aslive <xsl:attribute name="target">_blank</xsl:attribute>
58842e03db54033d15cc224d997f467abc88a97aslive </xsl:if>
58842e03db54033d15cc224d997f467abc88a97aslive <xsl:value-of select="$message[@id='documentation']" />
58842e03db54033d15cc224d997f467abc88a97aslive </a>
58842e03db54033d15cc224d997f467abc88a97aslive
58842e03db54033d15cc224d997f467abc88a97aslive <xsl:if test="not(/indexpage)">
58842e03db54033d15cc224d997f467abc88a97aslive <xsl:text> &gt; </xsl:text>
58842e03db54033d15cc224d997f467abc88a97aslive
58842e03db54033d15cc224d997f467abc88a97aslive <a href="{$path}/{$index-file}">
58842e03db54033d15cc224d997f467abc88a97aslive <xsl:value-of select="$message[@id='version']"/>
58842e03db54033d15cc224d997f467abc88a97aslive </a>
58842e03db54033d15cc224d997f467abc88a97aslive </xsl:if>
58842e03db54033d15cc224d997f467abc88a97aslive
58842e03db54033d15cc224d997f467abc88a97aslive <xsl:if test="/modulesynopsis or /directiveindex or /quickreference">
58842e03db54033d15cc224d997f467abc88a97aslive <xsl:text> &gt; </xsl:text>
1cb160a981947e75a8353da3fe40a653aa87100eslive
04ff03c2d7e0ff45ee181eb1fa5bf7649ffcf6bfslive <a href="./{$index-file}">
04ff03c2d7e0ff45ee181eb1fa5bf7649ffcf6bfslive <xsl:value-of select="$message[@id='modules']"/>
04ff03c2d7e0ff45ee181eb1fa5bf7649ffcf6bfslive </a>
04ff03c2d7e0ff45ee181eb1fa5bf7649ffcf6bfslive </xsl:if>
04ff03c2d7e0ff45ee181eb1fa5bf7649ffcf6bfslive
04ff03c2d7e0ff45ee181eb1fa5bf7649ffcf6bfslive <xsl:if test="parentdocument/text()">
04ff03c2d7e0ff45ee181eb1fa5bf7649ffcf6bfslive <xsl:text> &gt; </xsl:text>
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive <a href="{parentdocument/@href}">
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive <xsl:call-template name="helper.uri.fix">
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive <xsl:with-param name="uri" select="parentdocument/@href"/>
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive </xsl:call-template>
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive <xsl:value-of select="parentdocument"/>
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive </a>
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive </xsl:if>
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive</div> <!-- /path -->
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive</xsl:template>
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive<!-- /top -->
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive<!-- ==================================================================== -->
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive<!-- out of date -->
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive<!-- ==================================================================== -->
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive<xsl:template name="outofdate">
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive<xsl:if test="$metafile/variants/variant[.=$doclang]/@outdated = 'yes'">
97d4d9527b64d7491543a12a3d21134b857cbe4bnd &lf;
97d4d9527b64d7491543a12a3d21134b857cbe4bnd <div class="outofdate">
97d4d9527b64d7491543a12a3d21134b857cbe4bnd <xsl:value-of select="$message[@id='outofdate']"/>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd </div>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd</xsl:if>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive</xsl:template>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
97d4d9527b64d7491543a12a3d21134b857cbe4bnd
97d4d9527b64d7491543a12a3d21134b857cbe4bnd<!-- ==================================================================== -->
97d4d9527b64d7491543a12a3d21134b857cbe4bnd<!-- page bottom -->
97d4d9527b64d7491543a12a3d21134b857cbe4bnd<!-- ==================================================================== -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:template name="bottom">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:call-template name="langavail">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:with-param name="position" select="'bottom'" />
16e03b5486a143424f332b912df99c0ef6e10130nd</xsl:call-template>
16e03b5486a143424f332b912df99c0ef6e10130nd<xsl:choose>
16e03b5486a143424f332b912df99c0ef6e10130nd<xsl:when test="not($is-chm or $is-zip or $metafile/basename = 'index')">
16e03b5486a143424f332b912df99c0ef6e10130nd<div class="top"><a href="#page-header"><img alt="top" src="{$path}/images/up.gif" /></a></div>
16e03b5486a143424f332b912df99c0ef6e10130nd<div class="section">
16e03b5486a143424f332b912df99c0ef6e10130nd<h2><a name="comments_section" id="comments_section"><xsl:value-of select="$message[@id='comments']" /></a></h2>
16e03b5486a143424f332b912df99c0ef6e10130nd<div class="warning"><strong>Notice:</strong><br/>This is not a Q&amp;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;
16e03b5486a143424f332b912df99c0ef6e10130nd<script type="text/javascript">
16e03b5486a143424f332b912df99c0ef6e10130nd<xsl:text disable-output-escaping="yes"><![CDATA[<!--//--><![CDATA[//><!--
16e03b5486a143424f332b912df99c0ef6e10130ndvar comments_shortname = 'httpd';
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslivevar comments_identifier = 'http://httpd.apache.org/docs/]]></xsl:text>&httpd.comments;<xsl:value-of select="concat($metafile/path, $metafile/basename, '.html')" disable-output-escaping="yes" /><xsl:text disable-output-escaping="yes"><![CDATA[';
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive(function(w, d) {
16e03b5486a143424f332b912df99c0ef6e10130nd if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
16e03b5486a143424f332b912df99c0ef6e10130nd d.write('<div id="comments_thread"><\/div>');
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive var s = d.createElement('script');
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive s.type = 'text/javascript';
16e03b5486a143424f332b912df99c0ef6e10130nd s.async = true;
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive }
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive else {
39926890ef5576499f1bd78a1412b43e79f2f694slive d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
05bc0ffcc324385e6110d3f3fd0e17e172378343nd }
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive})(window, document);
39926890ef5576499f1bd78a1412b43e79f2f694slive//--><!]]]]>></xsl:text></script>
39926890ef5576499f1bd78a1412b43e79f2f694slive</div>
58842e03db54033d15cc224d997f467abc88a97aslive</xsl:when>
9effaa6977a494fc6477fed772df0377b65db169nd</xsl:choose>
9effaa6977a494fc6477fed772df0377b65db169nd<div id="footer">&lf;
9effaa6977a494fc6477fed772df0377b65db169nd <p class="apache">
9effaa6977a494fc6477fed772df0377b65db169nd <xsl:text>Copyright 2014 The Apache Software Foundation.</xsl:text><br />
9effaa6977a494fc6477fed772df0377b65db169nd <xsl:if test="normalize-space($message[@id='before-license'])">
9effaa6977a494fc6477fed772df0377b65db169nd <xsl:value-of select="$message[@id='before-license']"/>
9effaa6977a494fc6477fed772df0377b65db169nd <xsl:text> </xsl:text>
9effaa6977a494fc6477fed772df0377b65db169nd </xsl:if>
9effaa6977a494fc6477fed772df0377b65db169nd
9effaa6977a494fc6477fed772df0377b65db169nd <a href="http://www.apache.org/licenses/LICENSE-2.0">
9effaa6977a494fc6477fed772df0377b65db169nd <xsl:if test="$ext-target">
9effaa6977a494fc6477fed772df0377b65db169nd <xsl:attribute name="target">_blank</xsl:attribute>
9effaa6977a494fc6477fed772df0377b65db169nd </xsl:if>
9effaa6977a494fc6477fed772df0377b65db169nd <xsl:text>Apache License, Version 2.0</xsl:text>
9effaa6977a494fc6477fed772df0377b65db169nd </a>
58842e03db54033d15cc224d997f467abc88a97aslive <xsl:if test="normalize-space($message[@id='after-license'])">
39926890ef5576499f1bd78a1412b43e79f2f694slive <xsl:text> </xsl:text>
87ea898bcffe2ef490e833dc246a1cc0465d783fslive <xsl:value-of select="$message[@id='after-license']"/>
39926890ef5576499f1bd78a1412b43e79f2f694slive </xsl:if>
39926890ef5576499f1bd78a1412b43e79f2f694slive
46d1ef8cb385aa2f519ce7d355afc51f144bd938slive <xsl:text>.</xsl:text>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive </p>&lf;
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:call-template name="super-menu"/>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive</div> <!-- /footer -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<script type="text/javascript">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:text disable-output-escaping="yes"><![CDATA[<!--//--><![CDATA[//><!--
3fa58e00171aebf3b2cfa90035ed530f5b1f651dsliveif (typeof(prettyPrint) !== 'undefined') {
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive prettyPrint();
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive}
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive//--><!]]]]>></xsl:text></script>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive</xsl:template>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- /bottom -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- ==================================================================== -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- build an "available languages" section -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<!-- ==================================================================== -->
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:template name="langavail">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:param name="position" select="'top'" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<xsl:if test="not($is-chm or $is-zip)">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive<div class="{$position}lang">&lf;
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <p>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <span>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:value-of select="$message[@id='langavail']" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:text>: </xsl:text>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive </span>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:for-each select="$metafile/variants/variant">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:sort select="." />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <a href="{$path}/{.}{$metafile/path}{$metafile/basename}.html">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:if test="$metafile/basename = 'index'">
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:attribute name="href">
97d4d9527b64d7491543a12a3d21134b857cbe4bnd <xsl:value-of
97d4d9527b64d7491543a12a3d21134b857cbe4bnd select="concat($path, '/', ., $metafile/path)" />
97d4d9527b64d7491543a12a3d21134b857cbe4bnd </xsl:attribute>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd </xsl:if>
97d4d9527b64d7491543a12a3d21134b857cbe4bnd <xsl:if test="$doclang != .">
97d4d9527b64d7491543a12a3d21134b857cbe4bnd <xsl:attribute name="hreflang">
97d4d9527b64d7491543a12a3d21134b857cbe4bnd <xsl:value-of select="." />
97d4d9527b64d7491543a12a3d21134b857cbe4bnd </xsl:attribute>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive <xsl:attribute name="rel">alternate</xsl:attribute>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive </xsl:if>
0097a4f3e468c0192a2ce52ffee7bc8cea0a620bslive <xsl:attribute name="title">
0097a4f3e468c0192a2ce52ffee7bc8cea0a620bslive <xsl:value-of select="document(concat('/lang/', .,
0097a4f3e468c0192a2ce52ffee7bc8cea0a620bslive '.xml'))
0097a4f3e468c0192a2ce52ffee7bc8cea0a620bslive /language/messages/message
0097a4f3e468c0192a2ce52ffee7bc8cea0a620bslive [@id='nativename']" />
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive </xsl:attribute>
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive
3fa58e00171aebf3b2cfa90035ed530f5b1f651dslive &nbsp;
a7835c7a8cf86045fdaee65dc2839bfe6314fb1end <xsl:value-of select="." />
&nbsp;
</a>
<xsl:if test="position() != last()">
<xsl:text> |&#xA;</xsl:text>
</xsl:if>
</xsl:for-each>
</p>&lf;
</div> <!-- /.{$position}lang -->
</xsl:if>
<xsl:if test="$position = 'top'">
<xsl:call-template name="outofdate" />
</xsl:if>
</xsl:template>
<!-- /langavail -->
<!-- ==================================================================== -->
<!-- Process a documentation section -->
<!-- ==================================================================== -->
<xsl:template match="section">
<xsl:call-template name="toplink" />&lf;
<div class="section">&lf;
<!-- Section heading -->
<h2>
<xsl:choose>
<xsl:when test="@id">
<a id="{@id}" name="{@id}">
<xsl:apply-templates select="title" mode="print" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="title" mode="print" />
</xsl:otherwise>
</xsl:choose>
</h2>
<!-- Section body -->
<xsl:apply-templates />
</div> <!-- /.section -->
</xsl:template>
<!-- /section -->
<!-- ==================================================================== -->
<!-- handle subsections (lower level headings) -->
<!-- ==================================================================== -->
<xsl:template match="section/section">
<!-- Section heading -->
<h3>
<xsl:choose>
<xsl:when test="@id">
<a id="{@id}" name="{@id}">
<xsl:apply-templates select="title" mode="print" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="title" mode="print" />
</xsl:otherwise>
</xsl:choose>
</h3>
<!-- Section body -->
<xsl:apply-templates />
</xsl:template>
<!-- /section/section -->
<!-- ==================================================================== -->
<!-- handle subsubsections (h4) -->
<!-- ==================================================================== -->
<xsl:template match="section/section/section">
<!-- Section heading -->
<h4>
<xsl:choose>
<xsl:when test="@id">
<a id="{@id}" name="{@id}">
<xsl:apply-templates select="title" mode="print" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="title" mode="print" />
</xsl:otherwise>
</xsl:choose>
</h4>
<!-- Section body -->
<xsl:apply-templates/>
</xsl:template>
<!-- /section/section/section -->
<!-- ==================================================================== -->
<!-- section nesting > h4 is not supported for now -->
<!-- ==================================================================== -->
<xsl:template match="section/section/section/section">
<xsl:message terminate="yes">
<xsl:text>FATAL: exceeding maximum section nesting level.</xsl:text>
&lf;&lf;
<xsl:text>Perhaps you should consider to split your document into</xsl:text>
&lf;
<xsl:text>several ones...</xsl:text>
&lf;
</xsl:message>
</xsl:template>
<!-- /section/section/section/section -->
<!-- ==================================================================== -->
<!-- Process source code highlighting -->
<!-- ==================================================================== -->
<xsl:template match="highlight">
<pre class="prettyprint lang-{@language}">
<!-- highlight body -->
<xsl:apply-templates />
</pre>&lf; <!-- /.highlight -->
</xsl:template>
<!-- /higlight -->
<!-- ==================================================================== -->
<!-- (sub)section titles -->
<!-- ==================================================================== -->
<xsl:template match="section/title" mode="print">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="section/title" />
<!-- /section/title -->
<!-- ==================================================================== -->
<!-- generate section index -->
<!-- ==================================================================== -->
<xsl:template match="section" mode="index">
<li>
<img src="{$path}/images/down.gif" alt="" />
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="@id">
<a href="#{@id}">
<xsl:apply-templates select="title" mode="print" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="title" mode="print" />
</xsl:otherwise>
</xsl:choose>
</li>&lf;
</xsl:template>
<!-- /section index -->
<!-- ==================================================================== -->
<!-- docs super menu -->
<!-- ==================================================================== -->
<xsl:template name="super-menu">
<p class="menu">
<a href="{$path}/mod/{$index-file}">
<xsl:value-of select="$message[@id='modules']" />
</a>
<xsl:text> | </xsl:text>
<a href="{$path}/mod/quickreference.html">
<xsl:value-of select="$message[@id='directives']" />
</a>
<xsl:text> | </xsl:text>
<a href="http://wiki.apache.org/httpd/FAQ">
<xsl:value-of select="$message[@id='faq']" />
</a>
<xsl:text> | </xsl:text>
<a href="{$path}/glossary.html">
<xsl:value-of select="$message[@id='glossary']" />
</a>
<xsl:text> | </xsl:text>
<a href="{$path}/sitemap.html">
<xsl:value-of select="$message[@id='sitemap']" />
</a>
</p>
</xsl:template>
<!-- /super-menu -->
<!-- ==================================================================== -->
<!-- <example> -->
<!-- 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">
<div class="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) -->
<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">
<!-- 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 ;-) -->
<xsl:apply-templates
select="preceding-sibling::node()[
count(preceding-sibling::*[
contains($blocks,
concat(' ', local-name(), ' '))])
&gt;= $bb]" />
<xsl:apply-templates
select="self::node()[not($is-block-node)]" />
</xsl:variable>
<!-- apply bare text only, if it's not only \s or empty -->
<xsl:if test="not(normalize-space($content) = '')">
<p><code>
<!-- same as $content above. xsl:copy-of seems to make -->
<!-- thread problems with xalan-j ... -->
<xsl:apply-templates
select="preceding-sibling::node()[
count(preceding-sibling::*[
contains($blocks,
concat(' ', local-name(),
' '))])
&gt;= $bb]" />
<xsl:apply-templates
select="self::node()[not($is-block-node)]" />
</code></p>
</xsl:if>
<xsl:apply-templates select="self::node()[$is-block-node]" />
</xsl:if>
</xsl:for-each>
<!-- /node() -->
</div> <!-- /.example -->
</xsl:template>
<!-- /example -->
<!-- ==================================================================== -->
<!-- example/title -->
<!-- ==================================================================== -->
<xsl:template match="example/title" mode="print">
<h3>
<xsl:apply-templates/>
</h3>
</xsl:template>
<xsl:template match="example/title" />
<!-- /example/title -->
<!-- ==================================================================== -->
<!-- indentations -->
<!-- ==================================================================== -->
<xsl:template match="indent">
<span class="indent">
<xsl:apply-templates/>
</span>
</xsl:template>
<!-- /indent -->
<!-- ==================================================================== -->
<!-- <note> -->
<!-- ==================================================================== -->
<xsl:template match="note">
<div class="note">
<xsl:if test="@type='warning'">
<xsl:attribute name="class">warning</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</div>
</xsl:template>
<!-- /note -->
<!-- ==================================================================== -->
<!-- <note><title> -->
<!-- ==================================================================== -->
<xsl:template match="note/title">
<h3>
<xsl:apply-templates/>
</h3>
</xsl:template>
<!-- /note/title -->
<!-- ==================================================================== -->
<!-- <directive> -->
<!-- Inserts link to another directive, which might be in another module. -->
<!-- References are converted into lower case. -->
<!-- ==================================================================== -->
<xsl:template match="directive" name="directive">
<code class="directive">
<xsl:choose>
<xsl:when test="@module">
<xsl:variable name="lowerdirective">
<xsl:choose>
<xsl:when test="@name">
<xsl:value-of select="normalize-space(translate(@name,
$uppercase, $lowercase))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space(translate(.,
$uppercase, $lowercase))" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$in-modulesynopsis and normalize-space(@module) = /modulesynopsis/name">
<a href="#{$lowerdirective}">
<xsl:if test="@type='section'">&lt;</xsl:if>
<xsl:value-of select="."/>
<xsl:if test="@type='section'">&gt;</xsl:if>
</a>
</xsl:when>
<xsl:otherwise>
<a href="{$path}/mod/{normalize-space(@module)}.html#{$lowerdirective}">
<xsl:if test="@type='section'">&lt;</xsl:if>
<xsl:value-of select="."/>
<xsl:if test="@type='section'">&gt;</xsl:if>
</a>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:if test="@type='section'">&lt;</xsl:if>
<xsl:value-of select="."/>
<xsl:if test="@type='section'">&gt;</xsl:if>
</xsl:otherwise>
</xsl:choose>
</code>
</xsl:template>
<!-- /directive -->
<!-- ==================================================================== -->
<!-- <module> -->
<!-- Inserts a link to refereed module -->
<!-- ==================================================================== -->
<xsl:template match="module" name="module">
<code class="module">
<xsl:choose>
<xsl:when test="@outdated = 'true'">
<xsl:value-of select="."/>
</xsl:when>
<xsl:otherwise>
<a href="{$path}/mod/{normalize-space(.)}.html">
<xsl:value-of select="."/>
</a>
</xsl:otherwise>
</xsl:choose>
</code>
</xsl:template>
<!-- /module -->
<!-- ==================================================================== -->
<!-- <program> -->
<!-- Inserts a link to referred program -->
<!-- ==================================================================== -->
<xsl:template match="program">
<code class="program">
<a href="{$path}/programs/{normalize-space(.)}.html">
<xsl:value-of select="normalize-space(.)" />
</a>
</code>
</xsl:template>
<!-- /program -->
<!-- ==================================================================== -->
<!-- <related> -->
<!-- ==================================================================== -->
<xsl:template match="related">
<table class="related">
<tr>
<th>
<xsl:value-of select="$message[@id='relatedmodules']" />
</th>
<th>
<xsl:value-of select="$message[@id='relateddirectives']" />
</th>
</tr>
<tr>
<td>
<xsl:if test="count(modulelist/*) &gt; 0">
<ul>
<xsl:apply-templates select="modulelist" />
</ul>
</xsl:if>
</td>
<td>
<xsl:if test="count(directivelist/*) &gt; 0">
<ul>
<xsl:apply-templates select="directivelist"/>
</ul>
</xsl:if>
</td>
</tr>
</table>
</xsl:template>
<!-- /related -->
<!-- ==================================================================== -->
<!-- related/modulelist -->
<!-- ==================================================================== -->
<xsl:template match="related/modulelist">
<xsl:for-each select="module">
<li>
<xsl:call-template name="module"/>
</li>
</xsl:for-each>
</xsl:template>
<!-- /related/modulelist -->
<!-- ==================================================================== -->
<!-- related/directivelist -->
<!-- ==================================================================== -->
<xsl:template match="related/directivelist">
<xsl:for-each select="directive">
<li>
<xsl:call-template name="directive"/>
</li>
</xsl:for-each>
</xsl:template>
<!-- /related/directivelist -->
<!-- ==================================================================== -->
<!-- <table> -->
<!-- ==================================================================== -->
<xsl:template match="table">
<table>
<!-- existing border attribute will result in <table class="bordered"> -->
<xsl:if test="@border">
<xsl:attribute name="class">bordered</xsl:attribute>
</xsl:if>
<xsl:choose>
<xsl:when test="@style = 'zebra'">
<xsl:apply-templates select="tr" mode="zebra-table" />
</xsl:when>
<xsl:when test="@style = 'data'">
<xsl:apply-templates select="tr" mode="data-table" />
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates />
</xsl:otherwise>
</xsl:choose>
</table>
</xsl:template>
<!-- /table -->
<!-- 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])" />
<tr>
<xsl:for-each select="node()">
<xsl:choose>
<xsl:when test="local-name() = 'td'">
<td class="data">
<xsl:apply-templates select="*|@*|text()" />
</td>
</xsl:when>
<xsl:when test="local-name() = 'th' and
(not($cross-table) or
count(preceding-sibling::*) &gt; 0)">
<th class="data">
<xsl:apply-templates select="*|@*|text()" />
</th>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="self::node()" />
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</tr>&lf;
</xsl:template>
<!-- zebra-table -->
<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. -->
<tr>
<xsl:choose>
<xsl:when test="count(td) = 0">
<xsl:attribute name="class">header</xsl:attribute>
</xsl:when>
<xsl:when test="position() mod 2 = (count(preceding-sibling::tr[count(td) = 0]) mod 2)">
<xsl:attribute name="class">odd</xsl:attribute>
</xsl:when>
</xsl:choose>
<xsl:apply-templates />
</tr>&lf;
</xsl:template>
<!-- /zebra-table -->
<!-- ==================================================================== -->
<!-- <ol> -->
<!-- ==================================================================== -->
<xsl:template match="ol">
<ol>
<!-- A. B. C. D. (list-style-type="upper-alpha") -->
<xsl:choose>
<xsl:when test="@type = 'A'">
<xsl:attribute name="class">up-A</xsl:attribute>
</xsl:when>
<xsl:when test="@type = 'a'">
<xsl:attribute name="class">lo-A</xsl:attribute>
</xsl:when>
</xsl:choose>
<xsl:apply-templates/>
</ol>
</xsl:template>
<!-- /ol -->
<!-- ==================================================================== -->
<!-- diverse elements -->
<!-- Passes through content -->
<!-- ==================================================================== -->
<xsl:template match="summary|description|usage|syntax|default">
<xsl:apply-templates/>
</xsl:template>
<!-- /diverse -->
<!-- ==================================================================== -->
<!-- <a> -->
<!-- ==================================================================== -->
<xsl:template match="a">
<xsl:choose>
<xsl:when test="not(@href)">
<xsl:copy>
<xsl:apply-templates select="@*|*|text()"/>
</xsl:copy>
</xsl:when>
<xsl:otherwise>
<a href="@href">
<xsl:apply-templates select="@*"/>
<xsl:call-template name="helper.uri.fix">
<xsl:with-param name="uri" select="@href"/>
</xsl:call-template>
<xsl:apply-templates select="*|text()"/>
</a>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- /a -->
<!-- ==================================================================== -->
<!-- toplink -->
<!-- ==================================================================== -->
<xsl:template name="toplink">
<div class="top">
<a href="#page-header"><img src="{$path}/images/up.gif" alt="top" /></a>
</div>
</xsl:template>
<!-- /toplink -->
<!-- ==================================================================== -->
<!-- <transnote> -->
<!-- translator's notes are displayed in a different color -->
<!-- ==================================================================== -->
<xsl:template match="transnote">
<span class="transnote">
<xsl:text>(</xsl:text>
<em>
<xsl:value-of select="$message[@id='transnote']" />
</em>
<xsl:text> </xsl:text>
<xsl:apply-templates />
<xsl:text>)</xsl:text>
</span>
</xsl:template>
<!-- /transnote -->
<!-- ==================================================================== -->
<!-- <phonetic> -->
<!-- phonetics are enclosed in square brackets and displayed in a -->
<!-- different color -->
<!-- ==================================================================== -->
<xsl:template match="phonetic">
<span class="phonetic">
<xsl:text>[</xsl:text>
<xsl:apply-templates />
<xsl:text>]</xsl:text>
</span>
</xsl:template>
<!-- /phonetic -->
<!-- ==================================================================== -->
<!-- <glossary> -->
<!-- link to a glossary anchor -->
<!-- ==================================================================== -->
<xsl:template match="glossary">
<xsl:variable name="glosslink">
<xsl:choose>
<xsl:when test="@ref">
<xsl:value-of select="@ref"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="translate(., $uppercase, $lowercase)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<a href="{$path}/glossary.html#{$glosslink}" class="glossarylink">
<xsl:attribute name="title">
<xsl:value-of select="$message[@id='glossarylink']" />
</xsl:attribute>
<xsl:apply-templates />
</a>
</xsl:template>
<!-- /glossary -->
<!-- ==================================================================== -->
<!-- Filter &#160; in text() nodes. -->
<!-- In some environments this character won't be transformed correctly, -->
<!-- so we just write it explicitely as "&nbsp;" into the output. -->
<!-- ==================================================================== -->
<xsl:template match="text()" name="filter.nbsp">
<xsl:param name="text" select="." />
<xsl:choose>
<xsl:when test="contains($text, '&#160;')">
<xsl:value-of select="substring-before($text, '&#160;')" />
&nbsp;
<xsl:call-template name="filter.nbsp">
<xsl:with-param name="text" select="substring-after($text, '&#160;')" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- /filter.nbsp -->
<!-- ==================================================================== -->
<!-- Process everything else by just passing it through -->
<!-- ==================================================================== -->
<xsl:template match="*">
<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:message>
</xsl:template>
<xsl:template match="@*">
<xsl:copy>
<xsl:apply-templates select="*|@*|text()" />
</xsl:copy>
</xsl:template>
<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>
<!-- /pass through -->
<!-- ==================================================================== -->
<!-- create a letter bar -->
<!-- ==================================================================== -->
<xsl:template name="letter-bar">
<xsl:param name="letters" />
<xsl:param name="first" />
<xsl:if test="not($first)">
<xsl:text> | </xsl:text>
</xsl:if>
<a href="#{substring($letters,1,1)}">
&nbsp;
<xsl:value-of select="substring($letters, 1, 1)" />
&nbsp;
</a>
<xsl:if test="string-length($letters) &gt; 1">
<xsl:call-template name="letter-bar">
<xsl:with-param name="letters" select="substring($letters, 2)" />
<xsl:with-param name="first" select="false()" />
</xsl:call-template>
</xsl:if>
</xsl:template>
<!-- /letter-bar -->
<!-- ==================================================================== -->
<!-- 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"/>
<xsl:value-of
select="translate(substring(normalize-space(name), 1, 1),
$lowercase, $uppercase)" />
</xsl:for-each>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<!-- /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>
<xsl:if test="string-length($letters) &gt; 1">
<xsl:call-template name="_squeeze-letters">
<xsl:with-param name="letters" select="substring($letters, 2)" />
<xsl:with-param name="lastletter" select="$current"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<!-- /_squeeze-letters -->
<!-- ==================================================================== -->
<!-- fix href and target attribute of an element. -->
<!-- ==================================================================== -->
<xsl:template name="helper.uri.fix">
<xsl:param name="uri"/>
<xsl:choose>
<!-- lame is_absolute_uri test -->
<xsl:when test=" contains($uri, ':')
and string-length(substring-before($uri, ':')) &lt; 7">
<xsl:if test="$ext-target">
<xsl:attribute name="target">_blank</xsl:attribute>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="fragment">
<xsl:if test="contains($uri, '#')">
<xsl:value-of select="concat('#', substring-after($uri, '#'))"/>
</xsl:if>
</xsl:variable>
<xsl:variable name="absuri">
<xsl:choose>
<xsl:when test="contains($uri, '#')">
<xsl:value-of select="concat('#', substring-before($uri, '#'))"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$uri"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="substring($absuri, string-length($uri), 1) = '/'">
<xsl:attribute name="href">
<xsl:value-of select="concat($absuri, $index-file, $fragment)"/>
</xsl:attribute>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- /helper.uri.fix -->
<!-- ==================================================================== -->
<!-- Ignore table hints used for latex -->
<!-- ==================================================================== -->
<xsl:template match="columnspec">
</xsl:template>
<xsl:template match="column">
</xsl:template>
</xsl:stylesheet>