latex.xsl revision 27b8489f5fe26106de6a15fd68928797939d6610
6ca0e6973c8176100f4a426444823ae5e777e28fsascha<?xml version="1.0" encoding="ISO-8859-1"?>
64185f9824e42f21ca7b9ae6c004484215c031a7rbb<!DOCTYPE xsl:stylesheet [
2915eb26d1a16c56cdd91fed07566557d42645bdfielding <!ENTITY % HTTPD-VERSION SYSTEM "/version.ent">
2915eb26d1a16c56cdd91fed07566557d42645bdfielding %HTTPD-VERSION;
2915eb26d1a16c56cdd91fed07566557d42645bdfielding]>
2915eb26d1a16c56cdd91fed07566557d42645bdfielding
6ca0e6973c8176100f4a426444823ae5e777e28fsascha<!--
6ca0e6973c8176100f4a426444823ae5e777e28fsascha Licensed to the Apache Software Foundation (ASF) under one or more
6ca0e6973c8176100f4a426444823ae5e777e28fsascha contributor license agreements. See the NOTICE file distributed with
6ca0e6973c8176100f4a426444823ae5e777e28fsascha this work for additional information regarding copyright ownership.
64185f9824e42f21ca7b9ae6c004484215c031a7rbb The ASF licenses this file to You under the Apache License, Version 2.0
6ca0e6973c8176100f4a426444823ae5e777e28fsascha (the "License"); you may not use this file except in compliance with
6ca0e6973c8176100f4a426444823ae5e777e28fsascha the License. You may obtain a copy of the License at
64185f9824e42f21ca7b9ae6c004484215c031a7rbb
6ca0e6973c8176100f4a426444823ae5e777e28fsascha http://www.apache.org/licenses/LICENSE-2.0
64185f9824e42f21ca7b9ae6c004484215c031a7rbb
64185f9824e42f21ca7b9ae6c004484215c031a7rbb Unless required by applicable law or agreed to in writing, software
64185f9824e42f21ca7b9ae6c004484215c031a7rbb distributed under the License is distributed on an "AS IS" BASIS,
64185f9824e42f21ca7b9ae6c004484215c031a7rbb WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2915eb26d1a16c56cdd91fed07566557d42645bdfielding See the License for the specific language governing permissions and
2915eb26d1a16c56cdd91fed07566557d42645bdfielding limitations under the License.
2915eb26d1a16c56cdd91fed07566557d42645bdfielding-->
2915eb26d1a16c56cdd91fed07566557d42645bdfielding
2915eb26d1a16c56cdd91fed07566557d42645bdfielding<xsl:stylesheet version="1.0"
2915eb26d1a16c56cdd91fed07566557d42645bdfielding xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
64185f9824e42f21ca7b9ae6c004484215c031a7rbb
2915eb26d1a16c56cdd91fed07566557d42645bdfielding<xsl:output
2915eb26d1a16c56cdd91fed07566557d42645bdfielding method="text"
2915eb26d1a16c56cdd91fed07566557d42645bdfielding encoding="ISO-8859-1"
2915eb26d1a16c56cdd91fed07566557d42645bdfielding indent="no"
64185f9824e42f21ca7b9ae6c004484215c031a7rbb/>
2915eb26d1a16c56cdd91fed07566557d42645bdfielding
2915eb26d1a16c56cdd91fed07566557d42645bdfielding<!-- Read the localized messages from the specified language file -->
64185f9824e42f21ca7b9ae6c004484215c031a7rbb<xsl:variable name="message" select="document('/lang/en.xml')
64185f9824e42f21ca7b9ae6c004484215c031a7rbb /language/messages/message"/>
2915eb26d1a16c56cdd91fed07566557d42645bdfielding<xsl:variable name="allmodules" select="document('/xsl/util/allmodules.xml')
2915eb26d1a16c56cdd91fed07566557d42645bdfielding /items/item[@lang='en']"/>
2915eb26d1a16c56cdd91fed07566557d42645bdfielding
2915eb26d1a16c56cdd91fed07566557d42645bdfielding<!-- Get the guts of the stylesheets -->
64185f9824e42f21ca7b9ae6c004484215c031a7rbb<xsl:include href="manualpage.xsl" />
2915eb26d1a16c56cdd91fed07566557d42645bdfielding<xsl:include href="common.xsl" />
2915eb26d1a16c56cdd91fed07566557d42645bdfielding<xsl:include href="html.xsl" />
2915eb26d1a16c56cdd91fed07566557d42645bdfielding<xsl:include href="synopsis.xsl" />
2915eb26d1a16c56cdd91fed07566557d42645bdfielding<xsl:include href="moduleindex.xsl" />
2915eb26d1a16c56cdd91fed07566557d42645bdfielding<xsl:include href="directiveindex.xsl" />
2915eb26d1a16c56cdd91fed07566557d42645bdfielding<xsl:include href="faq.xsl" />
2915eb26d1a16c56cdd91fed07566557d42645bdfielding<xsl:include href="quickreference.xsl" />
64185f9824e42f21ca7b9ae6c004484215c031a7rbb
64185f9824e42f21ca7b9ae6c004484215c031a7rbb<xsl:template match="sitemap">
64185f9824e42f21ca7b9ae6c004484215c031a7rbb<xsl:text>
2915eb26d1a16c56cdd91fed07566557d42645bdfielding\documentclass[10pt]{book}
2915eb26d1a16c56cdd91fed07566557d42645bdfielding\usepackage{times}
2915eb26d1a16c56cdd91fed07566557d42645bdfielding\usepackage{longtable}
64185f9824e42f21ca7b9ae6c004484215c031a7rbb\usepackage{style/latex/atbeginend}
64185f9824e42f21ca7b9ae6c004484215c031a7rbb\usepackage[pdftex]{graphicx}
6ca0e6973c8176100f4a426444823ae5e777e28fsascha\usepackage[colorlinks=true,letterpaper=true,linkcolor=blue,urlcolor=blue]{hyperref}
6ca0e6973c8176100f4a426444823ae5e777e28fsascha
6ca0e6973c8176100f4a426444823ae5e777e28fsascha% Let LaTeX be lenient about very-bad line wrapping.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha\tolerance=9999
6ca0e6973c8176100f4a426444823ae5e777e28fsascha\emergencystretch=60pt
6ca0e6973c8176100f4a426444823ae5e777e28fsascha
6ca0e6973c8176100f4a426444823ae5e777e28fsascha% Adjust margins to a reasonable level
6ca0e6973c8176100f4a426444823ae5e777e28fsascha\topmargin 0pt
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha\advance \topmargin by -\headheight
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha\advance \topmargin by -\headsep
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha\textheight 8.9in
b3aeccd394a91bef671438fa47b9ccd7cd6145a5sascha\oddsidemargin 0pt
b3aeccd394a91bef671438fa47b9ccd7cd6145a5sascha\evensidemargin \oddsidemargin
b3aeccd394a91bef671438fa47b9ccd7cd6145a5sascha\marginparwidth 0.5in
6ca0e6973c8176100f4a426444823ae5e777e28fsascha\textwidth 6.5in
6ca0e6973c8176100f4a426444823ae5e777e28fsascha
6ca0e6973c8176100f4a426444823ae5e777e28fsascha% Keep paragraphs flush left (rather than the default of indenting
10e6ce0b820b1cd90acd12655d6d98e799296524rbb% the first line) and put a space between paragraphs.
6ca0e6973c8176100f4a426444823ae5e777e28fsascha\setlength{\parindent}{0ex}
6ca0e6973c8176100f4a426444823ae5e777e28fsascha\addtolength{\parskip}{1.2ex}
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha% Shrink the inter-item spaces
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha\AfterBegin{itemize}{\setlength{\itemsep}{0em}}
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha\pagestyle{headings}
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha\hypersetup{
b3aeccd394a91bef671438fa47b9ccd7cd6145a5sascha pdftitle={</xsl:text>
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha<xsl:value-of select="$message[@id='apache']" />
b3aeccd394a91bef671438fa47b9ccd7cd6145a5sascha<xsl:text> </xsl:text>
b3aeccd394a91bef671438fa47b9ccd7cd6145a5sascha<xsl:value-of select="$message[@id='http-server']" />
b3aeccd394a91bef671438fa47b9ccd7cd6145a5sascha<xsl:text> </xsl:text>
b3aeccd394a91bef671438fa47b9ccd7cd6145a5sascha<xsl:value-of select="$message[@id='documentation']" />
b3aeccd394a91bef671438fa47b9ccd7cd6145a5sascha<xsl:text> </xsl:text>
b3aeccd394a91bef671438fa47b9ccd7cd6145a5sascha<xsl:value-of select="$message[@id='version']" />
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha<xsl:text>},
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha pdfauthor={Apache Software Foundation}
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha }
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha\title{</xsl:text>
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha<xsl:value-of select="$message[@id='apache']" />
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha<xsl:text> </xsl:text>
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha<xsl:value-of select="$message[@id='http-server']" />
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha<xsl:text> </xsl:text>
6ca0e6973c8176100f4a426444823ae5e777e28fsascha<xsl:value-of select="$message[@id='documentation']" />
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha<xsl:text> </xsl:text>
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha<xsl:value-of select="$message[@id='version']" />
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha<xsl:text>\\ \bigskip \bigskip
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha\includegraphics{images/feather}\\ \bigskip}
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha\author{Apache Software Foundation}
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha\date{\today}
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha\begin{document}
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha\frontmatter
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha\maketitle
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha\section*{About The PDF Documentation}
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{http://www.apache.org/licenses/LICENSE-2.0}
This version of the Apache HTTP Server Documentation is converted from
XML source files to \LaTeX\ using XSLT with the help of Apache Ant,
Apache XML Xalan, and Apache XML Xerces.
Since the HTML version of the documentation is more commonly checked
during development, the PDF version may contain some errors and
inconsistencies, especially in formatting. If you have difficulty
reading a part of this file, please consult the HTML version
of the documentation on the Apache HTTP Server website at
\href{http://httpd.apache.org/docs/&httpd.docs;/}{http://httpd.apache.org/docs/&httpd.docs;/}
The Apache HTTP Server Documentation is maintained by the Apache HTTP
Server Documentation Project. More information is available at
\href{http://httpd.apache.org/docs-project/}{http://httpd.apache.org/docs-project/}
\tableofcontents
\mainmatter
</xsl:text>
<xsl:for-each select="category">
<xsl:text>\chapter{</xsl:text>
<xsl:apply-templates select="title" mode="printcat"/>
<xsl:text>}
</xsl:text>
<xsl:apply-templates/>
<xsl:if test="@id = 'modules'">
<xsl:apply-templates select="document($allmodules)/modulefilelist" />
</xsl:if>
</xsl:for-each>
<xsl:text>\end{document}</xsl:text>
</xsl:template>
<xsl:template match="page">
<xsl:text>\include{</xsl:text>
<xsl:choose>
<xsl:when test="contains(@href,'.')">
<xsl:value-of select="substring-before(@href,'.')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(@href,'index')"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>}
</xsl:text>
</xsl:template>
<xsl:template match="category/title" mode="printcat">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="category/title"></xsl:template>
<xsl:template match="modulefilelist">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="modulefile">
<xsl:text>\include{mod/</xsl:text>
<xsl:value-of select="substring-before(.,'.')"/>
<xsl:text>}
</xsl:text>
</xsl:template>
<xsl:template match="summary">
<xsl:apply-templates/>
</xsl:template>
<xsl:template name="replace-string">
<xsl:param name="text"/>
<xsl:param name="replace"/>
<xsl:param name="with"/>
<xsl:choose>
<xsl:when test="not(contains($text,$replace))">
<xsl:value-of select="$text"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring-before($text,$replace)"/>
<xsl:value-of select="$with"/>
<xsl:call-template name="replace-string">
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
<xsl:with-param name="replace" select="$replace"/>
<xsl:with-param name="with" select="$with"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- ==================================================================== -->
<!-- Take care of all the LaTeX special characters. -->
<!-- Silly multi-variable technique used to avoid deep recursion. -->
<!-- ==================================================================== -->
<xsl:template match="text()">
<xsl:call-template name="ltescape">
<xsl:with-param name="string" select="."/>
</xsl:call-template>
</xsl:template>
<xsl:template name="ltescape">
<xsl:param name="string"/>
<xsl:variable name="result1">
<xsl:choose>
<xsl:when test="contains($string, '\')">
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="'\'"/>
<xsl:with-param name="with" select="'\textbackslash '"/>
<xsl:with-param name="text" select="normalize-space($string)"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="result2">
<xsl:choose>
<xsl:when test="contains($result1, '$')">
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="'$'"/>
<xsl:with-param name="with" select="'\$'"/>
<xsl:with-param name="text" select="$result1"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$result1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="result3">
<xsl:choose>
<xsl:when test="contains($result2, '{')">
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="'{'"/>
<xsl:with-param name="with" select="'\{'"/>
<xsl:with-param name="text" select="$result2"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$result2"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="result4">
<xsl:choose>
<xsl:when test="contains($result3, '}')">
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="'}'"/>
<xsl:with-param name="with" select="'\}'"/>
<xsl:with-param name="text" select="$result3"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$result3"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- The '[' and ']' characters don't, in general, need to be
escaped. But there are times when it is ambiguous whether
[ is the beginning of an optional argument or a literal '['.
Hence, it is safer to protect the literal ones with {}. -->
<xsl:variable name="result5">
<xsl:choose>
<xsl:when test="contains($result4, '[')">
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="'['"/>
<xsl:with-param name="with" select="'{[}'"/>
<xsl:with-param name="text" select="$result4"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$result4"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="result6">
<xsl:choose>
<xsl:when test="contains($result5, ']')">
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="']'"/>
<xsl:with-param name="with" select="'{]}'"/>
<xsl:with-param name="text" select="$result5"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$result5"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="result7">
<xsl:choose>
<xsl:when test="contains($result6, '&quot;')">
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="'&quot;'"/>
<xsl:with-param name="with" select="'\texttt{&quot;}'"/>
<xsl:with-param name="text" select="$result6"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$result6"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="'_'"/>
<xsl:with-param name="with" select="'\_'"/>
<xsl:with-param name="text">
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="'#'"/>
<xsl:with-param name="with" select="'\#'"/>
<xsl:with-param name="text">
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="'%'"/>
<xsl:with-param name="with" select="'\%'"/>
<xsl:with-param name="text">
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="'&gt;'"/>
<xsl:with-param name="with" select="'\textgreater{}'"/>
<xsl:with-param name="text">
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="'&lt;'"/>
<xsl:with-param name="with" select="'\textless{}'"/>
<xsl:with-param name="text">
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="'~'"/>
<xsl:with-param name="with" select="'\textasciitilde{}'"/>
<xsl:with-param name="text">
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="'^'"/>
<xsl:with-param name="with" select="'\^{}'"/>
<xsl:with-param name="text">
<xsl:call-template name="replace-string">
<xsl:with-param name="replace" select="'&amp;'"/>
<xsl:with-param name="with" select="'\&amp;'"/>
<xsl:with-param name="text" select="$result7"/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>