<!-- Injected variables: -->
<!-- $is-chm - (boolean) target is for CHM generation or not -->
<!-- $is-zip - (boolean) target is for ZIP generation or not -->
-<!-- $messages - (node-set) localized common text snippets -->
+<!-- $message - (node-set) localized common text snippets -->
+<!-- $doclang - (string) document language -->
<!-- $output-encoding - (string) MIME charset name of the output -->
<!-- encoding -->
</xsl:choose>
<xsl:text> </xsl:text>
- <xsl:value-of select="$messages/message[@name='apachetitle']"/>
+ <xsl:value-of select="normalize-space($message[@id='apachetitle'])"/>
</title>&lf;
<!-- chm files get a slightly different stylesheet -->
<xsl:call-template name="super-menu" />&lf;
<p class="apache">
- <xsl:value-of select="$messages/message[@name='apachehttpserver']"/>
+ <xsl:value-of select="normalize-space($message
+ [@id='apachehttpserver'])"/>
</p>&lf;
<img src="{$path}/images/feather.gif" alt="" />
<xsl:if test="$ext-target">
<xsl:attribute name="target">_blank</xsl:attribute>
</xsl:if>
- <xsl:value-of select="$messages/message[@name='apache']" />
+ <xsl:value-of select="$message[@id='apache']" />
</a>
<xsl:text> > </xsl:text>
<xsl:if test="$ext-target">
<xsl:attribute name="target">_blank</xsl:attribute>
</xsl:if>
- <xsl:value-of select="$messages/message[@name='http-server']" />
+ <xsl:value-of select="$message[@id='http-server']" />
</a>
<xsl:text> > </xsl:text>
<xsl:if test="$ext-target">
<xsl:attribute name="target">_blank</xsl:attribute>
</xsl:if>
- <xsl:value-of select="$messages/message[@name='documentation']" />
+ <xsl:value-of select="$message[@id='documentation']" />
</a>
<xsl:if test="not(../indexpage)">
<xsl:text> > </xsl:text>
<a href="{$path}/{$index-file}">
- <xsl:value-of select="$messages/message[@name='version']"/>
+ <xsl:value-of select="$message[@id='version']"/>
</a>
</xsl:if>
<xsl:text> > </xsl:text>
<a href="./{$index-file}">
- <xsl:value-of select="$messages/message[@name='modules']"/>
+ <xsl:value-of select="$message[@id='modules']"/>
</a>
</xsl:if>
<!-- out of date -->
<!-- ==================================================================== -->
<xsl:template name="outofdate">
-<xsl:if test="$metafile/variants/variant[.=$messages/@lang]/@outdated = 'yes'">
+<xsl:if test="$metafile/variants/variant[.=$doclang]/@outdated = 'yes'">
&lf;
<div class="outofdate">
- <xsl:value-of select="$messages/message[@name='outofdate']"/>
+ <xsl:value-of select="$message[@id='outofdate']"/>
</div>
</xsl:if>
</xsl:template>
<p class="apache">
<xsl:text>Copyright 1999-2004 The Apache Software </xsl:text>
<xsl:text>Foundation.</xsl:text><br />
- <xsl:value-of select="$messages/message[@name='licensed']"/>
+ <xsl:value-of select="$message[@id='licensed']"/>
<xsl:text> </xsl:text>
<a href="http://www.apache.org/licenses/LICENSE-2.0">
<div class="{$position}lang">&lf;
<p>
<span>
- <xsl:value-of select="$messages/message[@name='langavail']" />
+ <xsl:value-of select="$message[@id='langavail']" />
<xsl:text>: </xsl:text>
</span>
select="concat($path, '/', ., $metafile/path)" />
</xsl:attribute>
</xsl:if>
- <xsl:if test="$messages/@lang != .">
+ <xsl:if test="$doclang != .">
<xsl:attribute name="hreflang">
<xsl:value-of select="." />
</xsl:attribute>
<xsl:attribute name="title">
<xsl:choose>
<xsl:when test=". != 'fr'"> <!-- no language file avail. -->
- <xsl:value-of select="document(concat('../lang/', ., '.xml'))
- /messages/@langname" />
+ <xsl:value-of select="document(concat('../lang/', .,
+ '.xml'))
+ /language/messages/message
+ [@id='nativename']" />
</xsl:when>
<xsl:otherwise>
<xsl:text>Français</xsl:text>
<xsl:template name="super-menu">
<p class="menu">
<a href="{$path}/mod/{$index-file}">
- <xsl:value-of select="$messages/message[@name='modules']" />
+ <xsl:value-of select="$message[@id='modules']" />
</a>
<xsl:text> | </xsl:text>
<a href="{$path}/mod/directives.html">
- <xsl:value-of select="$messages/message[@name='directives']" />
+ <xsl:value-of select="$message[@id='directives']" />
</a>
<xsl:text> | </xsl:text>
<a href="{$path}/faq/{$index-file}">
- <xsl:value-of select="$messages/message[@name='faq']" />
+ <xsl:value-of select="$message[@id='faq']" />
</a>
<xsl:text> | </xsl:text>
<a href="{$path}/glossary.html">
- <xsl:value-of select="$messages/message[@name='glossary']" />
+ <xsl:value-of select="$message[@id='glossary']" />
</a>
<xsl:text> | </xsl:text>
<a href="{$path}/sitemap.html">
- <xsl:value-of select="$messages/message[@name='sitemap']" />
+ <xsl:value-of select="$message[@id='sitemap']" />
</a>
</p>
</xsl:template>
<table class="related">
<tr>
<th>
- <xsl:value-of select="$messages/message[@name='relatedmodules']" />
+ <xsl:value-of select="$message[@id='relatedmodules']" />
</th>
<th>
- <xsl:value-of select="$messages/message[@name='relateddirectives']" />
+ <xsl:value-of select="$message[@id='relateddirectives']" />
</th>
</tr>
<tr>
<span class="transnote">
<xsl:text>(</xsl:text>
<em>
- <xsl:value-of select="$messages/message[@name='transnote']" />
+ <xsl:value-of select="$message[@id='transnote']" />
</em>
<xsl:text> </xsl:text>
<xsl:apply-templates />
<xsl:message terminate="yes">
<xsl:text>Unknown element: </xsl:text>
<xsl:value-of select="local-name()" />&lf;
- <xsl:text>Please fix style/xsl/common.xsl!</xsl:text>
+ <xsl:text>Is the document valid (try `build validate-xml`)?</xsl:text>
</xsl:message>
</xsl:template>
<xsl:template match="@*">
<!-- Builds the directive index page -->
<!-- ==================================================================== -->
<xsl:template match="directiveindex">
-<html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
+<html xml:lang="{$doclang}" lang="{$doclang}">
<xsl:call-template name="head"/>&lf;
<body id="directive-index">
<!-- Process an entire document into an HTML page -->
<!-- ==================================================================== -->
<xsl:template match="faq">
-<html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
+<html xml:lang="{$doclang}" lang="{$doclang}">
<xsl:call-template name="head"/>&lf;
<body id="manual-page">
<img src="{$path}/images/down.gif" alt="" />
<xsl:text> </xsl:text>
<a href="#topics">
- <xsl:value-of select="$messages/message
- [@name='topics']" />
+ <xsl:value-of select="$message
+ [@id='topics']" />
</a>
</li>&lf;
<xsl:if test="seealso">
<h3>
<xsl:value-of
- select="$messages/message[@name='seealso']" />
+ select="$message[@id='seealso']" />
</h3>
<ul class="seealso">
<!-- Section heading -->
<h2>
<a name="topics" id="topics">
- <xsl:value-of select="$messages/message[@name='topics']" />
+ <xsl:value-of select="$message[@id='topics']" />
</a>
</h2>&lf;
--- /dev/null
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2003-2004 The Apache Software Foundation
+
+ Licensed 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
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!DOCTYPE xsl:stylesheet [
+ <!ENTITY lf SYSTEM "../xsl/util/lf.xml">
+ <!ENTITY tab SYSTEM "../xsl/util/tab.xml">
+
+ <!ENTITY ul.start SYSTEM "../xsl/util/ul-start.xml">
+ <!ENTITY ul.end SYSTEM "../xsl/util/ul-end.xml" >
+ <!ENTITY li.start SYSTEM "../xsl/util/li-start.xml">
+ <!ENTITY li.end SYSTEM "../xsl/util/li-end.xml" >
+]>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="">
+
+<!-- -->
+<!-- WARNING! Do not touch anything, especially the whitespaces [1] -->
+<!-- unless you know, what you're doing. The HTML help compiler parses -->
+<!-- the TOC file not really as html instead of line by line and takes -->
+<!-- care of whitespace indentations etc. -->
+<!-- -->
+<!-- [1] Covered by the &lf; and &tab; entities. -->
+<!-- -->
+<!-- You have been warned. -->
+<!-- -->
+
+<!-- create nodeset for referencing later -->
+<xsl:variable name="not-exists" select="document('')/xsl:stylesheet/xsl:template
+ [@name='data']/not-exists/file" />
+
+<xsl:template name="data">
+<!-- documents not converted (yet?). -->
+<not-exists>
+<!-- example: <file>developer/API.xml</file> -->
+</not-exists>
+</xsl:template>
+
+<!-- Constants used for case translation -->
+<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
+<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
+
+<!-- document() works relative to the xsl (!) file -->
+<xsl:variable name="basedir" select="'../../'"/>
+
+<!-- icons -->
+<xsl:variable name="icon.document" select="'11'" />
+<xsl:variable name="icon.document.not-translated" select="'12'" />
+<xsl:variable name="icon.section" select="'35'" />
+<xsl:variable name="icon.directive" select="'41'" />
+<xsl:variable name="icon.commondirective" select="'19'" />
+<!-- this should not happen. this icon is only displayed within the
+ toc view of the help workshop (it's a question mark): -->
+<xsl:variable name="icon.no-anchor" select="'9'" />
+
+<!-- for module-translatename -->
+<xsl:include href="../xsl/util/modtrans.xsl"/>
+
+<!-- ==================================================================== -->
+<!-- <sitemap> -->
+<!-- Create CHM contents file (toc) from sitemap -->
+<!-- The file is an html style text file (see warning on top) -->
+<!-- ==================================================================== -->
+<xsl:template match="/sitemap">
+
+<!-- html head -->
+<xsl:text><html><head></xsl:text>
+<xsl:text><title>Apache HTTP Server Documentation</title></xsl:text>
+<xsl:text></head></xsl:text>&lf;
+
+<xsl:text><body></xsl:text>&lf;
+
+<!-- toc properties first -->
+<xsl:text><object type="text/site properties"></xsl:text>&lf;&tab;
+<!-- XXX: that magic value is still obfuscated. Research needed ... -->
+<xsl:text><param name="Window Styles" value="0x800027"></xsl:text>&lf;&tab;
+<xsl:text><param name="Font" value="</xsl:text>
+ <xsl:value-of select="$toc-font" />
+<xsl:text>"></xsl:text>&lf;
+<xsl:text></object></xsl:text>&lf;
+
+&ul.start; &lf;
+
+ <!-- index page on top. -->
+ &li.start;
+ <xsl:call-template name="object">
+ <xsl:with-param name="name"
+ select="normalize-space($message[@id='apachehttpserver'])" />
+ <xsl:with-param name="href" select="'index.html'" />
+ <xsl:with-param name="indent" select="'		'" />
+ </xsl:call-template>
+ &li.end; &lf;
+
+ <!-- iterate over the categories in document order -->
+ <xsl:for-each select="category">
+ &li.start;
+ <xsl:call-template name="folder">
+ <xsl:with-param name="name" select="normalize-space(title)" />
+ </xsl:call-template>&lf;&tab;
+
+ &ul.start; &lf;&tab;
+ <xsl:apply-templates select="page" />
+ <xsl:apply-templates select="modulefilelist" />
+ &ul.end; &lf;
+ &li.end; &lf;&tab;
+ </xsl:for-each>&lf;
+
+&ul.end; &lf;
+
+<xsl:text></body></html></xsl:text>&lf;
+</xsl:template>
+<!-- /sitemap -->
+
+
+<!-- ==================================================================== -->
+<!-- category/page -->
+<!-- ==================================================================== -->
+<xsl:template match="category/page">
+&li.start;
+
+<!-- document entry, if not href attribute, assume it means "sitemap" -->
+<xsl:call-template name="object">
+ <xsl:with-param name="name">
+ <xsl:choose>
+ <xsl:when test="@href">
+ <xsl:value-of select="normalize-space(.)" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="normalize-space($message[@id='sitemap'])" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ <xsl:with-param name="href">
+ <xsl:choose>
+ <xsl:when test="not(@href)">
+ <xsl:text>sitemap.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="contains(@href, '#')">
+ <xsl:value-of select="substring-before(@href, '#')" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@href"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ <xsl:with-param name="indent" select="'		'" />
+</xsl:call-template>
+
+<!-- now try to index the sections of the document -->
+<xsl:apply-templates select="self::page" mode="index" />
+
+&li.end; &lf;&tab;
+</xsl:template>
+<!-- /category/page -->
+
+
+<!-- ==================================================================== -->
+<!-- category/page, mode="index" -->
+<!-- display all section headings of one page -->
+<!-- ==================================================================== -->
+<xsl:template match="category/page" mode="index">
+<xsl:variable name="href.offline">
+ <xsl:choose>
+ <xsl:when test="string-length(@href) = 0">
+ <xsl:text>sitemap.html</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="helper.href.offline">
+ <xsl:with-param name="href" select="@href" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:variable>
+<xsl:variable name="xml"
+ select="concat(substring-before($href.offline, '.html'), '.xml')" />
+
+<xsl:if test="not($xml = $not-exists)">
+ <xsl:variable name="xmlfile">
+ <xsl:variable name="metafile"
+ select="document(document(concat($basedir, $xml))/*/@metafile)
+ /metafile" />
+ <xsl:choose>
+ <xsl:when test="$metafile/variants/variant[.=$doclang] and not
+ ($metafile/variants/variant[.=$doclang]
+ /@htmlonly = 'yes')">
+ <xsl:value-of select="concat($basedir,
+ substring-before($xml, '.xml'), $xml-ext)" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat($basedir, $xml)" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="current" select="document($xmlfile)" />
+
+ <xsl:if test="count($current/*/*[local-name()='section' or
+ local-name()='category']) > 1">
+ &lf;&tab;&tab;&tab;
+ &ul.start; &lf;&tab;&tab;&tab;
+
+ <xsl:for-each select="$current/*/*[local-name()='section' or
+ local-name()='category']">
+ &li.start;
+
+ <xsl:call-template name="object">
+ <xsl:with-param name="name" select="normalize-space(title)" />
+ <xsl:with-param name="href">
+ <xsl:if test="@id">
+ <xsl:value-of
+ select="concat(substring-before($xml, '.xml'),
+ '.html#', @id)" />
+ </xsl:if>
+ </xsl:with-param>
+ <xsl:with-param name="indent" select="'				'" />
+ </xsl:call-template>
+
+ &li.end; &lf;&tab;&tab;
+ </xsl:for-each>
+
+ &ul.end; &lf;&tab;
+ </xsl:if> <!-- count() > 1 -->
+</xsl:if> <!-- xml exists -->
+</xsl:template>
+<!-- /category/page, "index" -->
+
+
+<!-- ==================================================================== -->
+<!-- category/modulefilelist -->
+<!-- process all listed module files -->
+<!-- ==================================================================== -->
+<xsl:template match="category/modulefilelist">
+<!-- create a module name translation list for sorting -->
+<xsl:variable name="translist">
+ <xsl:text>-</xsl:text>
+
+ <xsl:for-each select="modulefile">
+ <xsl:variable name="current"
+ select="document(concat($basedir,'mod/',.))/modulesynopsis" />
+
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$current/name"/>
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="module-translatename">
+ <xsl:with-param name="name" select="$current/name"/>
+ </xsl:call-template>
+ <xsl:text> -</xsl:text>
+ </xsl:for-each>
+</xsl:variable>
+
+<!-- put core and mpm_common on top -->
+<xsl:call-template name="toc-entry.mpm">
+ <xsl:with-param name="current"
+ select="document(concat($basedir, 'mod/', modulefile[starts-with(.,
+ 'core.xml')]/text()))/modulesynopsis" />
+ <xsl:with-param name="name" select="'core'" />
+</xsl:call-template>
+
+<xsl:call-template name="toc-entry.mpm">
+ <xsl:with-param name="current"
+ select="document(concat($basedir, 'mod/', modulefile[starts-with(.,
+ 'mpm_common.xml')]/text()))/modulesynopsis" />
+ <xsl:with-param name="name" select="'common'" />
+</xsl:call-template>
+
+<!-- remaining MPMs -->
+<xsl:for-each select="modulefile">
+<xsl:sort select="substring-before(substring-after($translist, concat('- ',
+ document(concat($basedir, 'mod/', .))/modulesynopsis/name, ' ')), ' -')" />
+
+ <xsl:variable name="current"
+ select="document(concat($basedir, 'mod/', .))/modulesynopsis" />
+
+ <xsl:if test="$current/status='MPM' and not($current/name='mpm_common')">
+ <xsl:call-template name="toc-entry.mpm">
+ <xsl:with-param name="current" select="$current" />
+ <xsl:with-param name="name" select="substring-before(
+ substring-after($translist, concat('- ', $current/name, ' ')),
+ ' -')" />
+ </xsl:call-template>
+ </xsl:if>
+</xsl:for-each>
+
+<!-- normal modules -->
+<xsl:for-each select="modulefile">
+<xsl:sort select="substring-before(substring-after($translist, concat('- ',
+ document(concat($basedir, 'mod/', .))/modulesynopsis/name, ' ')), ' -')" />
+
+ <xsl:variable name="current"
+ select="document(concat($basedir, 'mod/', .))/modulesynopsis" />
+
+ <xsl:if test="not($current/status='MPM') and not($current/status='Core')">
+ <xsl:call-template name="toc-entry.module">
+ <xsl:with-param name="current" select="$current"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:for-each>
+</xsl:template>
+<!-- /category/modulefilelist -->
+
+
+<!-- ==================================================================== -->
+<!-- toc-entry.mpm -->
+<!-- create entry (and initiate subsection entries) of an mpm -->
+<!-- ==================================================================== -->
+<xsl:template name="toc-entry.mpm">
+<xsl:param name="current" />
+<xsl:param name="name" />
+
+&li.start;
+
+<xsl:call-template name="object">
+ <xsl:with-param name="name">
+ <xsl:choose>
+ <xsl:when test="$name='core'">
+ <xsl:value-of select="normalize-space($message[@id='apachecore'])" />
+ </xsl:when>
+ <xsl:when test="$name='common'">
+ <xsl:value-of select="normalize-space($message[@id='apachempmcommon'])" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="normalize-space($message[@id='apachempm'])" />
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$name" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ <xsl:with-param name="href"
+ select="concat('mod/', $current/name, '.html')" />
+ <xsl:with-param name="indent" select="'			'" />
+</xsl:call-template>
+
+<xsl:call-template name="sections-and-directives">
+ <xsl:with-param name="current" select="$current" />
+</xsl:call-template>
+
+&li.end; &lf;&tab;
+</xsl:template>
+<!-- /toc-entry.mpm -->
+
+
+<!-- ==================================================================== -->
+<!-- toc-entry.module -->
+<!-- create entry (and initiate subsection entries) of a module -->
+<!-- ==================================================================== -->
+<xsl:template name="toc-entry.module">
+<xsl:param name="current"/>
+
+&li.start;
+
+<xsl:call-template name="object">
+ <xsl:with-param name="name">
+ <xsl:value-of select="normalize-space($message[@id='apachemodule'])" />
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$current/name" />
+ </xsl:with-param>
+ <xsl:with-param name="href"
+ select="concat('mod/', $current/name, '.html')" />
+ <xsl:with-param name="indent" select="'			'" />
+</xsl:call-template>
+
+<xsl:call-template name="sections-and-directives">
+ <xsl:with-param name="current" select="$current" />
+</xsl:call-template>
+
+&li.end; &lf;&tab;
+</xsl:template>
+<!-- /toc-entry.module -->
+
+
+<!-- ==================================================================== -->
+<!-- sections-and-directives -->
+<!-- process sections and directives of a module file -->
+<!-- ==================================================================== -->
+<xsl:template name="sections-and-directives">
+<xsl:param name="current" />
+
+<xsl:if test="count($current/section) > 0 or
+ count($current/directivesynopsis) > 0">
+ &lf;&tab;&tab;
+
+ &ul.start; &lf;&tab;&tab;
+
+ <!-- sections -->
+ <xsl:for-each select="$current/section">
+ &li.start;
+
+ <xsl:call-template name="object">
+ <xsl:with-param name="name" select="normalize-space(title)" />
+ <xsl:with-param name="href">
+ <xsl:if test="@id">
+ <xsl:value-of
+ select="concat('mod/', $current/name, '.html#', @id)" />
+ </xsl:if>
+ </xsl:with-param>
+ <xsl:with-param name="indent" select="'				'" />
+ </xsl:call-template>
+
+ &li.end; &lf;&tab;&tab;
+ </xsl:for-each>
+
+ <!-- directives within the current document -->
+ <xsl:for-each select="$current/directivesynopsis[not(@location)]">
+ <xsl:sort select="name" />
+ &li.start;
+
+ <xsl:call-template name="object">
+ <xsl:with-param name="name">
+ <xsl:if test="@type='section'"><</xsl:if>
+ <xsl:value-of select="name"/>
+ <xsl:if test="@type='section'">></xsl:if>
+ <xsl:choose>
+ <xsl:when test="$message[@id='directive']
+ /@replace-space-with">
+ <xsl:value-of select="$message[@id='directive']
+ /@replace-space-with" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="normalize-space($message[@id='directive'])" />
+ </xsl:with-param>
+ <xsl:with-param name="href"
+ select="concat('mod/', $current/name, '.html#',
+ translate(name, $uppercase, $lowercase))" />
+ <xsl:with-param name="indent" select="'				'" />
+ <xsl:with-param name="icon" select="$icon.directive" />
+ </xsl:call-template>
+
+ &li.end; &lf;&tab;&tab;
+ </xsl:for-each>
+
+ <!-- directives described elsewhere -->
+ <xsl:for-each select="$current/directivesynopsis[@location]">
+ <xsl:sort select="name" />
+ &li.start;
+
+ <xsl:call-template name="object">
+ <xsl:with-param name="name">
+ <xsl:if test="@type='section'"><</xsl:if>
+ <xsl:value-of select="name"/>
+ <xsl:if test="@type='section'">></xsl:if>
+ <xsl:choose>
+ <xsl:when test="$message[@id='directive']
+ /@replace-space-with">
+ <xsl:value-of select="$message[@id='directive']
+ /@replace-space-with" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="normalize-space($message[@id='directive'])" />
+ </xsl:with-param>
+ <xsl:with-param name="href"
+ select="concat('mod/', @location, '.html#',
+ translate(name, $uppercase, $lowercase))" />
+ <xsl:with-param name="indent" select="'				'" />
+ <xsl:with-param name="icon" select="$icon.commondirective" />
+ </xsl:call-template>
+
+ &li.end; &lf;&tab;&tab;
+ </xsl:for-each>
+
+ &ul.end; &lf;&tab;
+</xsl:if> <!-- sections or directives present -->
+</xsl:template>
+<!-- /sections-and-directives -->
+
+
+<!-- ==================================================================== -->
+<!-- object -->
+<!-- display an <object> and do some magic to select the right content -->
+<!-- ==================================================================== -->
+<xsl:template name="object">
+<xsl:param name="name" select="'? unknown ?'" />
+<xsl:param name="href" />
+<xsl:param name="icon" select="$icon.section" />
+<xsl:param name="indent" />
+
+<xsl:variable name="href.offline">
+ <xsl:call-template name="helper.href.offline">
+ <xsl:with-param name="href" select="$href" />
+ </xsl:call-template>
+</xsl:variable>
+
+<!-- xml file is expected to have the same basename -->
+<xsl:variable name="xml"
+ select="concat(substring-before($href.offline, '.html'), '.xml')" />
+
+<xsl:text><object type="text/sitemap"></xsl:text>&lf;
+<xsl:value-of select="$indent" />
+
+<xsl:text><param name="Name" value="</xsl:text>
+ <xsl:call-template name="filter.attval">
+ <xsl:with-param name="text" select="$name" />
+ </xsl:call-template>
+<xsl:text>"></xsl:text>&lf;
+<xsl:value-of select="$indent" />
+
+<xsl:if test="string-length($href.offline) > 0">
+ <xsl:text><param name="Local" value="</xsl:text>
+ <xsl:call-template name="filter.attval">
+ <xsl:with-param name="text" select="$href.offline" />
+ </xsl:call-template>
+ <xsl:text>"></xsl:text>&lf;
+ <xsl:value-of select="$indent" />
+</xsl:if>
+
+<xsl:text><param name="ImageNumber" value="</xsl:text>
+ <xsl:choose>
+ <xsl:when test="string-length($href.offline) > 0">
+ <xsl:choose>
+ <xsl:when test="contains($href, '#')">
+ <xsl:value-of select="$icon" />
+ </xsl:when>
+ <xsl:when test="$doclang='en' or
+ (not($xml = $not-exists) and
+ (document(document(concat($basedir, $xml))
+ /*/@metafile)
+ /metafile/variants/variant
+ [.=$doclang and not(@htmlonly='yes')]))">
+ <xsl:value-of select="$icon.document" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$icon.document.not-translated" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$icon.no-anchor" />
+ </xsl:otherwise>
+ </xsl:choose>
+<xsl:text>"></xsl:text>&lf;
+<xsl:value-of select="substring($indent, 2)" />
+
+<xsl:text></object></xsl:text>
+</xsl:template>
+<!-- /object -->
+
+
+<!-- ==================================================================== -->
+<!-- folder -->
+<!-- ==================================================================== -->
+<xsl:template name="folder">
+<xsl:param name="name" select="'? unknown ?'" />
+
+<xsl:text><object type="text/sitemap"></xsl:text>&lf;&tab;&tab;
+<xsl:text><param name="Name" value="</xsl:text>
+ <xsl:call-template name="filter.attval">
+ <xsl:with-param name="text" select="$name" />
+ </xsl:call-template>
+<xsl:text>"></xsl:text>&lf;&tab;
+<xsl:text></object></xsl:text>
+</xsl:template>
+<!-- /folder -->
+
+
+<!-- ==================================================================== -->
+<!-- helper.href.offline -->
+<!-- change uri reference to work offline (/ -> /index.html) -->
+<!-- ==================================================================== -->
+<xsl:template name="helper.href.offline">
+<xsl:param name="href" />
+
+<xsl:choose>
+<xsl:when test="string-length($href) = 0" />
+<xsl:when test="contains($href, '#') and '/' = substring($href,
+ string-length(substring-before($href, '#')), 1)">
+ <xsl:value-of select="substring-before($href, '#')" />
+ <xsl:text>index.html#</xsl:text>
+ <xsl:value-of select="substring-after($href, '#')" />
+</xsl:when>
+<xsl:when test="substring($href, string-length($href), 1) = '/'">
+ <xsl:value-of select="$href" />
+ <xsl:text>index.html</xsl:text>
+</xsl:when>
+<xsl:otherwise>
+ <xsl:value-of select="$href" />
+</xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+<!-- /helper.href.offline -->
+
+
+<!-- ==================================================================== -->
+<!-- filter.attval -->
+<!-- escape special characters for being valid within an attribute -->
+<!-- ==================================================================== -->
+<xsl:template name="filter.attval">
+<xsl:param name="text" />
+
+<xsl:choose>
+<xsl:when test="contains($text, '&')">
+ <xsl:call-template name="filter.attval.special">
+ <xsl:with-param name="text" select="substring-before($text, '&')" />
+ </xsl:call-template>
+ <xsl:text>&amp;</xsl:text>
+ <xsl:call-template name="filter.attval">
+ <xsl:with-param name="text" select="substring-after($text, '&')" />
+ </xsl:call-template>
+</xsl:when>
+<xsl:otherwise>
+ <xsl:call-template name="filter.attval.special">
+ <xsl:with-param name="text" select="$text" />
+ </xsl:call-template>
+</xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+<!-- /filter.attval -->
+
+
+<!-- ==================================================================== -->
+<!-- filter.attval.special -->
+<!-- accompanying template of filter.attval -->
+<!-- ==================================================================== -->
+<xsl:template name="filter.attval.special">
+<xsl:param name="text" />
+
+<xsl:choose>
+<xsl:when test="contains($text, '<')">
+ <xsl:value-of select="substring-before($text, '<')" />
+ <xsl:text>&lt;</xsl:text>
+ <xsl:call-template name="filter.attval.special">
+ <xsl:with-param name="text" select="substring-after($text, '<')" />
+ </xsl:call-template>
+</xsl:when>
+<xsl:when test="contains($text, '>')">
+ <xsl:value-of select="substring-before($text, '>')" />
+ <xsl:text>&gt;</xsl:text>
+ <xsl:call-template name="filter.attval.special">
+ <xsl:with-param name="text" select="substring-after($text, '>')" />
+ </xsl:call-template>
+</xsl:when>
+<xsl:when test="contains($text, '"')">
+ <xsl:value-of select="substring-before($text, '"')" />
+ <xsl:text>&quot;</xsl:text>
+ <xsl:call-template name="filter.attval.special">
+ <xsl:with-param name="text" select="substring-after($text, '"')" />
+ </xsl:call-template>
+</xsl:when>
+<xsl:otherwise>
+ <xsl:value-of select="$text" />
+</xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+<!-- /filter.attval.special -->
+
+</xsl:stylesheet>
--- /dev/null
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2003-2004 The Apache Software Foundation
+
+ Licensed 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
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!DOCTYPE xsl:stylesheet [
+ <!ENTITY lf SYSTEM "../xsl/util/lf.xml">
+]>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="">
+
+<!-- the accompanying server version -->
+<xsl:param name="httpd.version" select="'generic'" />
+
+<!-- create nodeset for referencing later -->
+<xsl:variable name="htmlhelp.def" select="document('')/xsl:stylesheet
+ /xsl:template[@name='htmlhelp.def']" />
+
+<!-- ==================================================================== -->
+<!-- <sitemap> -->
+<!-- Create CHM project file from sitemap -->
+<!-- The file is an *.ini format text file -->
+<!-- ==================================================================== -->
+<xsl:template match="/sitemap">
+
+<!-- static information -->
+<!-- **************************************************************** -->
+<xsl:text>[OPTIONS]</xsl:text>&lf;
+<xsl:text>Binary TOC=No</xsl:text>&lf;
+<xsl:text>Compatibility=1.0</xsl:text>&lf;
+
+<!-- resulting filename -->
+<xsl:text>Compiled file=httpd-docs-</xsl:text>
+<xsl:value-of select="$httpd.version" />
+<xsl:text>.</xsl:text>
+<xsl:value-of select="$doclang" />
+<xsl:text>.chm</xsl:text>&lf;
+
+<xsl:text>Contents file=toc.hhc</xsl:text>&lf;
+<xsl:text>Default Window=Main</xsl:text>&lf;
+<xsl:text>Default topic=index.html</xsl:text>&lf;
+
+<!-- compiler related -->
+<xsl:text>Display compile progress=Yes</xsl:text>&lf;
+<xsl:text>Enhanced decompilation=Yes</xsl:text>&lf;
+
+<!-- search related -->
+<xsl:text>Full-text search=Yes</xsl:text>&lf;
+<xsl:text>Language=</xsl:text>
+<xsl:value-of select="$hhp-lang" />&lf;
+
+<!-- title of the help file -->
+<xsl:text>Title=</xsl:text>
+<xsl:value-of select="normalize-space($message[@id='apachehttpserver'])"/>&lf;&lf;
+
+<!-- main window definition -->
+<xsl:text>[WINDOWS]</xsl:text>&lf;
+<xsl:text>Main=</xsl:text>
+
+<!-- title -->
+<xsl:text>"</xsl:text>
+<xsl:value-of select="normalize-space($message[@id='apachehttpserver'])"/>
+<xsl:text>",</xsl:text>
+
+<!-- toc file -->
+<xsl:text>"toc.hhc",</xsl:text>
+
+<!-- index file (currently none) -->
+<xsl:text>,</xsl:text>
+
+<!-- default file (startup) -->
+<xsl:text>"index.html",</xsl:text>
+
+<!-- Home button file -->
+<xsl:text>"index.html",</xsl:text>
+
+<!-- Jump 1 url, text -->
+<xsl:text>,,</xsl:text>
+
+<!-- Jump 2 url, text -->
+<xsl:text>,,</xsl:text>
+
+<!-- navigation pane style (0x1e357e) -->
+<xsl:call-template name="helper.number2hex">
+ <xsl:with-param name="number" select="sum($htmlhelp.def/navigation/style
+ [@selected='yes'])" />
+</xsl:call-template>
+<xsl:text>,</xsl:text>
+
+<!-- navigation pane initial width (px) -->
+<xsl:text>180,</xsl:text>
+
+<!-- button mask -->
+<xsl:call-template name="helper.number2hex">
+ <xsl:with-param name="number" select="sum($htmlhelp.def/buttons/button
+ [@visible='yes'])" />
+</xsl:call-template>
+<xsl:text>,</xsl:text>
+
+<!-- Initial Position [Left, Top, Right, Bottom] -->
+<xsl:text>[0,0,600,380],</xsl:text>
+
+<!-- window style -->
+<xsl:call-template name="helper.number2hex">
+ <xsl:with-param name="result" select="'0000'" /> <!-- << 16 -->
+ <xsl:with-param name="number" select="sum($htmlhelp.def/windowstyle/style
+ [@selected='yes'])" />
+</xsl:call-template>
+<xsl:text>,</xsl:text>
+
+<!-- extended style -->
+<xsl:text>,</xsl:text>
+
+<!-- flag: navigation pane initial closed (=1) -->
+<xsl:text>,</xsl:text>
+
+<!-- unknown, default pane, unknown, unknown -->
+<xsl:text>,,,0</xsl:text>&lf;&lf;
+
+<!-- file list -->
+<!-- **************************************************************** -->
+<xsl:text>[FILES]</xsl:text>&lf;
+
+<!-- not automatically sucked in. (because only @import()ed) -->
+<xsl:text>style\css\manual.css</xsl:text>&lf;
+<xsl:text>style\css\manual-loose-100pc.css</xsl:text>&lf;
+
+<!-- include project file itself for easier recompiling -->
+<xsl:text>manual.hhp</xsl:text>&lf;
+
+<!-- and now all sitemap-listed files -->
+<xsl:for-each select="category">
+ <xsl:apply-templates select="page[@href]" />
+ <xsl:apply-templates select="modulefilelist/modulefile"/>
+</xsl:for-each>&lf;
+</xsl:template>
+<!-- /sitemap -->
+
+
+<!-- ==================================================================== -->
+<!-- files referenced in sitemap -->
+<!-- ==================================================================== -->
+<xsl:template match="category/page">
+<xsl:variable name="filename">
+ <xsl:choose>
+ <xsl:when test="contains(@href, '#') and substring(@href,
+ string-length(substring-before(@href, '#')), 1) = '/'">
+ <xsl:value-of select="substring-before(@href, '#')" />
+ <xsl:text>index.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="substring(@href, string-length(@href), 1) = '/'">
+ <xsl:value-of select="@href"/>
+ <xsl:text>index.html</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@href"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:variable>
+
+<xsl:value-of select="translate($filename, '/', '\')" />&lf;
+</xsl:template>
+<!-- /page[@href] -->
+
+
+<!-- ==================================================================== -->
+<!-- list module files -->
+<!-- ==================================================================== -->
+<xsl:template match="category/modulefilelist/modulefile">
+<xsl:text>mod\</xsl:text>
+<xsl:value-of select="substring-before(normalize-space(.), '.xml')" />
+<xsl:text>.html</xsl:text>&lf;
+</xsl:template>
+<!-- /modulefilelist/modulefile -->
+
+
+<!-- ==================================================================== -->
+<!-- convert number to its hexadecimal representation. -->
+<!-- I could not find a built-in function, so write our own ... *sigh* -->
+<!-- ==================================================================== -->
+<xsl:template name="helper.number2hex">
+<xsl:param name="number" />
+<xsl:param name="result" />
+
+<xsl:choose>
+<xsl:when test="number($number) > 0">
+ <xsl:call-template name="helper.number2hex">
+ <xsl:with-param name="number" select="floor(number($number) div 16)" />
+ <xsl:with-param name="result"
+ select="concat(substring('0123456789abcdef',
+ (number($number) mod 16) + 1, 1),
+ $result)" />
+ </xsl:call-template>
+</xsl:when>
+<xsl:otherwise>
+ <!-- if zero, don't print anything. hh.exe (the viewer) seems to -->
+ <!-- prefer an empty value -->
+ <xsl:if test="string-length(translate($result, '0', '')) > 0">
+ <xsl:text>0x</xsl:text>
+ <xsl:value-of select="$result" />
+ </xsl:if>
+</xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+<!-- /helper.number2hex -->
+
+
+<!-- ==================================================================== -->
+<!-- some of the values are derived from htmlhelp.h -->
+<!-- do NOT call this template, it's referenced automagically via -->
+<!-- document() function and acts as simple data container. -->
+<!-- -->
+<!-- Hints: 'ni' means 'not implemented' (by the help viewer) -->
+<!-- 'ns' means 'not useful for standalone help file' -->
+<!-- ==================================================================== -->
+<xsl:template name="htmlhelp.def">
+<navigation>
+ <style > 1</style> <!-- auto hide nav. pane << 0 -->
+ <style > 2</style> <!-- ns: topmost window << 1 -->
+ <style > 4</style> <!-- ns: no title bar << 2 -->
+ <style > 8</style> <!-- ns: no win. style << 3 -->
+ <style > 16</style> <!-- ns: no ext. style << 4 -->
+ <style selected="yes"> 32</style> <!-- use tri-pane win. << 5 -->
+ <style > 64</style> <!-- no toolbar text << 6 -->
+ <style > 128</style> <!-- ns: send WM_QUIT << 7 -->
+ <style selected="yes"> 256</style> <!-- toc auto sync << 8 -->
+ <style > 512</style> <!-- ns: send track. not. << 9 -->
+ <style selected="yes"> 1024</style> <!-- search tab << 10 -->
+ <style > 2048</style> <!-- ni(?): history tab << 11 -->
+ <style selected="yes"> 4096</style> <!-- favorites tab << 12 -->
+ <style > 8192</style> <!-- ni(?): title sync << 13 -->
+ <style > 16384</style> <!-- nav. only << 14 -->
+ <style > 32768</style> <!-- no toolbar << 15 -->
+ <style selected="yes"> 65536</style> <!-- show menu << 16 -->
+ <style selected="yes"> 131072</style> <!-- advanced search << 17 -->
+ <style selected="yes"> 262144</style> <!-- safe user's win. size << 18 -->
+ <style > 524288</style> <!-- custom tab 1 << 19 -->
+ <style > 1048576</style> <!-- custom tab 2 << 20 -->
+ <style > 2097152</style> <!-- custom tab 3 << 21 -->
+ <style > 4194304</style> <!-- custom tab 4 << 22 -->
+ <style > 8388608</style> <!-- custom tab 5 << 23 -->
+ <style > 16777216</style> <!-- custom tab 6 << 24 -->
+ <style > 33554432</style> <!-- custom tab 7 << 25 -->
+ <style > 67108864</style> <!-- custom tab 8 << 26 -->
+ <style >134217728</style> <!-- custom tab 9 << 27 -->
+ <style >268435456</style> <!-- window has margin (?) << 28 -->
+</navigation>
+
+<buttons>
+ <button visible="yes"> 2</button> <!-- expand/contract << 1 -->
+ <button visible="yes"> 4</button> <!-- back << 2 -->
+ <button visible="yes"> 8</button> <!-- forward << 3 -->
+ <button visible="yes"> 16</button> <!-- Stop << 4 -->
+ <button > 32</button> <!-- Refresh << 5 -->
+ <button visible="yes"> 64</button> <!-- Home << 6 -->
+ <button > 128</button> <!-- ni: browse fwd << 7 -->
+ <button > 256</button> <!-- ni: browse back << 8 -->
+ <button > 512</button> <!-- ni: notes << 9 -->
+ <button > 1024</button> <!-- ni: contents << 10 -->
+ <button visible="yes"> 2048</button> <!-- Sync TOC << 11 -->
+ <button visible="yes"> 4096</button> <!-- Options << 12 -->
+ <button visible="yes"> 8192</button> <!-- Print << 13 -->
+ <button > 16384</button> <!-- ni: index << 14 -->
+ <button > 32768</button> <!-- ni: search << 15 -->
+ <button > 65536</button> <!-- ni: history << 16 -->
+ <button > 131072</button> <!-- ni: favorites << 17 -->
+ <button > 262144</button> <!-- Jump 1 << 18 -->
+ <button > 524288</button> <!-- Jump 2 << 19 -->
+ <button visible="yes">1048576</button> <!-- (Font) Zoom << 20 -->
+ <!-- the following work only with binary toc, which unfortunately -->
+ <!-- seems to eat the different icons ... -->
+ <button >2097152</button> <!-- TOC next << 21 -->
+ <button >4194304</button> <!-- TOC prev << 22 -->
+</buttons>
+
+<windowstyle>
+ <!-- all the stuff is additionally shifted << 16 (by the caller) -->
+ <style selected="yes"> 1</style> <!-- maximize box << 0 -->
+ <style selected="yes"> 2</style> <!-- minimize box << 1 -->
+ <style selected="yes"> 4</style> <!-- thick frame << 2 -->
+ <style selected="yes"> 8</style> <!-- system menu << 3 -->
+ <style > 16</style> <!-- horiz. scroll << 4 -->
+ <style > 32</style> <!-- vertic. scroll << 5 -->
+ <style selected="yes"> 64</style> <!-- dialog frame << 6 -->
+ <style selected="yes"> 128</style> <!-- border << 7 -->
+ <style selected="yes"> 256</style> <!-- maximize << 8 -->
+ <style > 512</style> <!-- clip child win. << 9 -->
+ <style > 1024</style> <!-- clip sibl. win. << 10 -->
+ <style > 2048</style> <!-- disabled << 11 -->
+ <style selected="yes"> 4096</style> <!-- visible << 12 -->
+ <style selected="yes"> 8192</style> <!-- minimize << 13 -->
+ <style >16384</style> <!-- child window << 14 -->
+ <style >32768</style> <!-- pop-up << 15 -->
+</windowstyle>
+</xsl:template>
+<!-- /htmlhelp.def -->
+
+</xsl:stylesheet>
<!-- Process an entire document into an HTML page -->
<!-- ==================================================================== -->
<xsl:template match="/indexpage">
-<html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
+<html xml:lang="{$doclang}" lang="{$doclang}">
<xsl:call-template name="head"/>&lf;
<body id="index-page">&lf;
<!-- with all of the words -->
<input type="text" value="" name="as_q" />
<xsl:text> </xsl:text>
- <input type="submit" value="{$messages/message[@name='search']}" />
+ <input type="submit" value="{$message[@id='search']}" />
<!-- the specified number of results -->
<input type="hidden" name="num" value="10" />
<!-- the current displayed language -->
- <input type="hidden" name="hl" value="{$messages/@lang}" />
+ <input type="hidden" name="hl" value="{$doclang}" />
<!-- the current document encoding for input (?) -->
<input type="hidden" name="ie" value="{$output-encoding}" />
--- /dev/null
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2004 The Apache Software Foundation
+
+ Licensed 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
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!DOCTYPE xsl:stylesheet [
+ <!ENTITY lf SYSTEM "util/lf.xml">
+ <!ENTITY xsl "http://www.w3.org/1999/XSL/Transform">
+]>
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="">
+
+<xsl:output
+ method="xml"
+ encoding="utf-8"
+ indent="no"
+/>
+
+<xsl:param name="type" />
+<xsl:param name="langs" />
+
+<!-- ==================================================================== -->
+<!-- / -->
+<!-- bootstrap -->
+<!-- ==================================================================== -->
+<xsl:template match="/">
+<xsl:choose>
+<xsl:when test="$type = 'list'">
+ <language-list>
+ &lf;
+ <xsl:call-template name="language-list">
+ <xsl:with-param name="langs" select="normalize-space($langs)" />
+ </xsl:call-template>
+ </language-list>
+ &lf;
+</xsl:when>
+<xsl:otherwise>
+ <xsl:apply-templates select="*" />
+</xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+
+
+<!-- ==================================================================== -->
+<!-- language-list -->
+<!-- generate language list -->
+<!-- ==================================================================== -->
+<xsl:template name="language-list">
+<xsl:param name="langs" />
+
+<xsl:if test="string-length($langs)">
+ <lang>
+ <xsl:value-of select="substring-before(concat($langs, ' '),' ')" />
+ </lang>
+ &lf;
+
+ <xsl:call-template name="language-list">
+ <xsl:with-param name="langs" select="normalize-space(substring-after(
+ concat($langs, ' '), ' '))" />
+ </xsl:call-template>
+</xsl:if>
+</xsl:template>
+
+
+<!-- ==================================================================== -->
+<!-- <language-list> -->
+<!-- generate stuff from language list -->
+<!-- ==================================================================== -->
+<xsl:template match="/language-list">
+<xsl:choose>
+<xsl:when test="$type = 'design'">
+ <items>
+ &lf;
+ <xsl:for-each select="lang">
+ <xsl:variable name="file" select="document(concat('../lang/', .,
+ '.xml'))/language" />
+ <item lang="{$file/@id}" charset="{$file/charset}" >
+ <xsl:value-of select="$file/target-ext" />
+ </item>
+ &lf;
+ </xsl:for-each>
+ </items>
+ &lf;
+</xsl:when>
+<xsl:when test="$type = 'targets'">
+ <xsl:apply-templates select="/language-list" mode="targets" />
+</xsl:when>
+<xsl:when test="$type = 'desc'">
+ <xsl:apply-templates select="/language-list" mode="desc" />
+</xsl:when>
+</xsl:choose>
+</xsl:template>
+
+
+<!-- ==================================================================== -->
+<!-- <language-list> -->
+<!-- generate target list from language list -->
+<!-- ==================================================================== -->
+<xsl:template match="/language-list" mode="targets">
+
+<xsl:call-template name="copyright" />
+
+<xsl:call-template name="head">
+ <xsl:with-param name="text" select="'this file contains language specific
+ targets and will be included'" />
+</xsl:call-template>
+
+<xsl:call-template name="head">
+ <xsl:with-param name="text" select="'into build.xml. IT IS AUTOGENERATED.
+ DO NOT TOUCH!'" />
+</xsl:call-template>
+<xsl:call-template name="sep" />
+
+<project name="lang-targets">
+ &lf;&lf;
+
+ <!-- build *-all targets -->
+ <!-- =================== -->
+ <target name="all"
+ description="- builds all HTML files and nroff man pages">
+ <xsl:attribute name="depends">
+ <xsl:for-each select="lang[document(concat('../lang/', .,
+ '.xml'))/language/messages]">
+ <xsl:value-of select="." />
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:attribute>
+ </target>
+ &lf;
+
+ <target name="zip-all"
+ description="- builds all zip download packages">
+ <xsl:attribute name="depends">
+ <xsl:for-each select="lang[document(concat('../lang/', .,
+ '.xml'))/language/messages]">
+ <xsl:text>zip-</xsl:text>
+ <xsl:value-of select="." />
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </xsl:attribute>
+ </target>
+ &lf;
+
+ <!-- single language targets -->
+ <!-- ======================= -->
+ <xsl:for-each select="lang">
+ <xsl:sort select="." />
+ <xsl:variable name="file" select="document(concat('../lang/', .,
+ '.xml'))/language" />
+
+ <xsl:if test="$file/messages">
+ &lf;
+ <xsl:call-template name="head">
+ <xsl:with-param name="text" select="$file/name" />
+ </xsl:call-template>
+ <xsl:call-template name="sep" />
+
+ <property name="inputext.{.}" value="{$file/source-ext}" />&lf;
+ <property name="outputext.{.}" value="{$file/target-ext}" />&lf;&lf;
+
+ <target name="{.}" description="- builds {$file/name} HTML files">
+ &lf;
+ <xsl:text> </xsl:text>
+ <html.generic lang="{.}" />&lf;
+
+ <xsl:if test=". = 'en'">
+ <xsl:text> </xsl:text><runtarget target="man-en" />&lf;
+ </xsl:if>
+ </target>
+ &lf;
+
+ <target name="zip-{.}"
+ description="- builds the {$file/name} zipped download package">&lf;
+ <xsl:text> </xsl:text>
+ <zip.generic lang="{.}" />&lf;
+ </target>
+ &lf;
+
+ <xsl:if test="$file/chm">
+ <target name="chm-{.}"
+ description="- builds the {$file/name} CHM file">&lf;
+ <xsl:text> </xsl:text>
+ <chm.generic lang="{.}" />&lf;
+ </target>
+ &lf;
+ </xsl:if>
+
+ <xsl:if test=". = 'en'">
+ <target name="man-en"
+ description="- builds the English nroff files">&lf;
+ <xsl:text> </xsl:text>
+ <nroff.generic lang="en" />&lf;
+ </target>
+ &lf;
+ <target name="latex-en"
+ description="- builds the English latex file">&lf;
+ <xsl:text> </xsl:text>
+ <latex.generic lang="en" />&lf;
+ </target>
+ &lf;
+ </xsl:if>
+ </xsl:if>
+ </xsl:for-each>
+ &lf;
+
+ <!-- XML validation -->
+ <!-- ============== -->
+ <xsl:call-template name="head">
+ <xsl:with-param name="text" select="'XML validation.'" />
+ </xsl:call-template>
+ <xsl:call-template name="head">
+ <xsl:with-param name="text" select="'If you get an error during
+ transformation, this task may be useful'" />
+ </xsl:call-template>
+ <xsl:call-template name="head">
+ <xsl:with-param name="text" select="'because it mostly gives you a
+ hint, where you forgot the </p> ;-)'" />
+ </xsl:call-template>
+ <xsl:call-template name="sep" />
+
+ <target name="validate-xml" description="- validates all XML source files">
+ &lf;
+ <xsl:text> </xsl:text>
+ <xmlvalidate lenient="false" failonerror="false" warn="true">
+ &lf;
+ <xsl:text> </xsl:text>
+ <xmlcatalog refid="w3c-catalog" />&lf;
+ <xsl:text> </xsl:text>
+ <fileset dir="../">&lf;
+ <xsl:for-each select="lang">
+ <xsl:sort select="." />
+
+ <xsl:variable name="file" select="document(concat(
+ '../lang/', ., '.xml'))
+ /language" />
+ <xsl:if test="$file/messages">
+ <xsl:text> </xsl:text>
+ <include name="**/*{$file/source-ext}" />&lf;
+ </xsl:if>
+ </xsl:for-each>
+ &lf;
+ <xsl:text> </xsl:text>
+ <patternset refid="excludes" />&lf;
+ <xsl:text> </xsl:text>
+ <patternset refid="scratch" />&lf;
+ <xsl:text> </xsl:text>
+ </fileset>
+ &lf;
+ <xsl:text> </xsl:text>
+ </xmlvalidate>
+ &lf;
+ </target>
+ &lf;&lf;
+</project>
+</xsl:template>
+
+
+<!-- ==================================================================== -->
+<!-- <language-list> -->
+<!-- generate project description -->
+<!-- ==================================================================== -->
+<xsl:template match="/language-list" mode="desc">
+
+<xsl:call-template name="copyright" />
+
+<description><xsl:text>
+This build file contains all operations that are necessary for building
+the Apache httpd documentation. It is called by invoking build.bat (Win32)
+or build.sh (/bin/sh systems) with a target argument (full list below).
+For example, if you want to build the Japanese HTML files, type:
+
+ ./build.sh ja
+
+Some targets have additional requirements:
+
+* 'metafiles' and 'modulelists' need perl in PATH. (It's checked automatically
+ and skipped if perl is not available)
+
+* 'chm-foo' targets need:
+ - the HTML Help compiler in PATH (or modify this build file). The
+ compiler (hhc.exe) is part of the HTML Help Workshop which is freely
+ available and can be downloaded from
+ http://msdn.microsoft.com/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp
+ - The appropriate locale (e.g. Japanese) before invoking hhc.exe. Otherwise
+ the compiler is not able to build the fulltext search index correctly and
+ the TOC may be garbled, too. In particular:
+</xsl:text>
+
+ <xsl:for-each select="lang">
+ <xsl:sort select="." />
+
+ <xsl:variable name="file" select="document(concat('../lang/', .,
+ '.xml'))/language" />
+
+ <xsl:if test="$file/messages and $file/chm">
+ <xsl:text> + chm-</xsl:text>
+ <xsl:value-of select="." />
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="normalize-space($file/chm/settings)" />
+ &lf;
+ </xsl:if>
+ </xsl:for-each>
+ &lf;
+</description>
+</xsl:template>
+
+
+<!-- ==================================================================== -->
+<!-- <language> -->
+<!-- generate language specific xslt -->
+<!-- ==================================================================== -->
+<xsl:template match="/language">
+
+<xsl:call-template name="copyright" />
+
+<xsl:element name="xsl:stylesheet" namespace="&xsl;">
+ <xsl:attribute name="version">1.0</xsl:attribute>
+ &lf;
+ &lf;
+
+ <xsl:element name="xsl:output">
+ <xsl:attribute name="method">
+ <xsl:choose>
+ <xsl:when test="$type = 'manual' or
+ $type = 'chm' or
+ $type = 'zip'">
+ <xsl:text>xml</xsl:text>
+ </xsl:when>
+ <xsl:when test="$type = 'hhc' or
+ $type = 'hhp'">
+ <xsl:text>text</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>Unknown style type '</xsl:text>
+ <xsl:value-of select="$type" />
+ <xsl:text>'!</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="encoding">
+ <xsl:choose>
+ <xsl:when test="$type = 'chm' or
+ $type = 'hhc' or
+ $type = 'hhp'">
+ <xsl:value-of select="chm/charset" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="charset" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="indent">no</xsl:attribute>
+ <xsl:if test="$type = 'manual' or
+ $type = 'chm' or
+ $type = 'zip'">
+ <xsl:attribute name="doctype-public">
+ <xsl:text>-//W3C//DTD XHTML 1.0 Strict//EN</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$type = 'manual'">
+ <xsl:attribute name="doctype-system">
+ <xsl:text>http://www.w3.org/TR/xhtml1/DTD/</xsl:text>
+ <xsl:text>xhtml1-strict.dtd</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$type = 'chm' or
+ $type = 'zip'">
+ <xsl:attribute name="omit-xml-declaration">yes</xsl:attribute>
+ </xsl:if>
+ </xsl:element>
+ &lf;&lf;
+
+ <xsl:comment>
+ <xsl:text> Read the localized messages from the specified </xsl:text>
+ <xsl:text>language file </xsl:text>
+ </xsl:comment>
+ &lf;
+
+ <xsl:element name="xsl:variable">
+ <xsl:attribute name="name">message</xsl:attribute>
+ <xsl:attribute name="select">
+ <xsl:text>document('</xsl:text>
+ <xsl:if test="$type != 'manual'">../</xsl:if>
+ <xsl:text>lang/</xsl:text>
+ <xsl:value-of select="@id" />
+ <xsl:text>.xml')/language/messages/message</xsl:text>
+ </xsl:attribute>
+ </xsl:element>
+ &lf;
+
+ <xsl:element name="xsl:variable">
+ <xsl:attribute name="name">doclang</xsl:attribute>
+ <xsl:value-of select="@id" />
+ </xsl:element>
+ &lf;&lf;
+
+ <xsl:comment>
+ <xsl:text> some meta information have to be passed to the </xsl:text>
+ <xsl:text>transformation </xsl:text>
+ </xsl:comment>
+ &lf;
+
+ <xsl:if test="$type = 'manual' or
+ $type = 'chm' or
+ $type = 'zip' or
+ $type = 'hhc'">
+ <xsl:element name="xsl:variable">
+ <xsl:attribute name="name">output-encoding</xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="$type = 'chm' or
+ $type = 'hhc'">
+ <xsl:value-of select="normalize-space(chm/charset)" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="normalize-space(charset)" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:element>
+ &lf;
+ </xsl:if>
+
+ <xsl:if test="$type = 'manual' or
+ $type = 'chm' or
+ $type = 'zip'">
+ <xsl:element name="xsl:variable">
+ <xsl:attribute name="name">is-chm</xsl:attribute>
+ <xsl:attribute name="select">
+ <xsl:choose>
+ <xsl:when test="$type = 'chm'">
+ <xsl:text>true()</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>false()</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:element>
+ &lf;
+
+ <xsl:element name="xsl:variable">
+ <xsl:attribute name="name">is-zip</xsl:attribute>
+ <xsl:attribute name="select">
+ <xsl:choose>
+ <xsl:when test="$type = 'zip'">
+ <xsl:text>true()</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>false()</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:element>
+ &lf;&lf;
+ </xsl:if>
+
+ <xsl:if test="$type = 'hhc'">
+ <xsl:element name="xsl:variable">
+ <xsl:attribute name="name">toc-font</xsl:attribute>
+ <xsl:value-of select="normalize-space(chm/toc-font)" />
+ </xsl:element>
+ &lf;
+
+ <xsl:element name="xsl:variable">
+ <xsl:attribute name="name">xml-ext</xsl:attribute>
+ <xsl:value-of select="normalize-space(source-ext)" />
+ </xsl:element>
+ &lf;&lf;
+ </xsl:if>
+
+ <xsl:if test="$type = 'hhp'">
+ <xsl:element name="xsl:variable">
+ <xsl:attribute name="name">hhp-lang</xsl:attribute>
+ <xsl:value-of select="normalize-space(chm/lang)" />
+ </xsl:element>
+ &lf;&lf;
+ </xsl:if>
+
+ <xsl:comment> Now get the real guts of the stylesheet </xsl:comment>
+ &lf;
+
+ <xsl:element name="xsl:include">
+ <xsl:attribute name="href">
+ <xsl:choose>
+ <xsl:when test="$type = 'chm' or
+ $type = 'zip'">
+ <xsl:text>../xsl/common.xsl</xsl:text>
+ </xsl:when>
+ <xsl:when test="$type = 'hhc'">
+ <xsl:text>../xsl/hhc.xsl</xsl:text>
+ </xsl:when>
+ <xsl:when test="$type = 'hhp'">
+ <xsl:text>../xsl/hhp.xsl</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>xsl/common.xsl</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:element>
+ &lf;&lf;
+</xsl:element>
+
+</xsl:template>
+<!-- /language -->
+
+
+<xsl:template name="copyright">
+&lf;
+<xsl:comment><xsl:text>
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed 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
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+</xsl:text></xsl:comment>
+&lf;&lf;
+</xsl:template>
+
+
+<xsl:template name="sepstring">
+<xsl:text>============================================</xsl:text>
+<xsl:text>========================</xsl:text>
+</xsl:template>
+
+
+<xsl:template name="sep">
+<xsl:comment>
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="sepstring" />
+ <xsl:text> </xsl:text>
+</xsl:comment>
+&lf;
+</xsl:template>
+
+<xsl:template name="head">
+<xsl:param name="text" />
+
+<xsl:variable name="s"><xsl:call-template name="sepstring" /></xsl:variable>
+<xsl:variable name="empty" select="translate($s, '=', ' ')" />
+
+<xsl:comment>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="substring(concat(normalize-space($text), $empty), 1,
+ string-length($empty))" />
+ <xsl:text> </xsl:text>
+</xsl:comment>
+&lf;
+</xsl:template>
+
+</xsl:stylesheet>
<!-- Process an entire document into an HTML page -->
<!-- ==================================================================== -->
<xsl:template match="manualpage">
-<html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
+<html xml:lang="{$doclang}" lang="{$doclang}">
<xsl:call-template name="head" />&lf;
<body id="manual-page">
<xsl:if test="seealso">
<h3>
<xsl:value-of
- select="$messages/message[@name='seealso']" />
+ select="$message[@id='seealso']" />
</h3>
<ul class="seealso">
<xsl:for-each select="seealso">
<!-- Builds the moduleindex page -->
<!-- ==================================================================== -->
<xsl:template match="moduleindex">
-<html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
+<html xml:lang="{$doclang}" lang="{$doclang}">
<xsl:call-template name="head"/>&lf;
<body id="module-index">
<img src="{$path}/images/down.gif" alt="" />
<xsl:text> </xsl:text>
<a href="#core">
- <xsl:value-of select="$messages/message
- [@name='corefeatures']" />
+ <xsl:value-of select="$message
+ [@id='corefeatures']" />
</a>
</li>
<li>
<img src="{$path}/images/down.gif" alt="" />
<xsl:text> </xsl:text>
<a href="#other">
- <xsl:value-of select="$messages/message
- [@name='othermodules']" />
+ <xsl:value-of select="$message
+ [@id='othermodules']" />
</a>
</li>
</ul>
<xsl:if test="seealso">
<h3>
- <xsl:value-of select="$messages/message
- [@name='seealso']" />
+ <xsl:value-of select="$message
+ [@id='seealso']" />
</h3>&lf;
<ul class="seealso">&lf;
<div class="section">
<h2>
<a name="core" id="core">
- <xsl:value-of select="$messages/message
- [@name='corefeatures']" />
+ <xsl:value-of select="$message
+ [@id='corefeatures']" />
</a>
</h2>&lf;
<div class="section">
<h2>
<a name="other" id="other">
- <xsl:value-of select="$messages/message
- [@name='othermodules']" />
+ <xsl:value-of select="$message
+ [@id='othermodules']" />
</a>
</h2>&lf;
<!-- Builds the directive quickreference page -->
<!-- ==================================================================== -->
<xsl:template match="quickreference">
-<html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
+<html xml:lang="{$doclang}" lang="{$doclang}">
<xsl:call-template name="head"/>&lf;
<body id="directive-index">&lf;
<!-- Process an entire document into an HTML page -->
<!-- ==================================================================== -->
<xsl:template match="/sitemap">
-<html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
+<html xml:lang="{$doclang}" lang="{$doclang}">
<xsl:call-template name="head" />&lf;
<body id="manual-page">&lf;
<xsl:if test="seealso">
<h3>
- <xsl:value-of select="$messages/message
- [@name='seealso']" />
+ <xsl:value-of select="$message
+ [@id='seealso']" />
</h3>&lf;
<ul class="seealso">&lf;
<ul>
<li>
<a href="mod/core.html">
- <xsl:value-of select="$messages/message[@name='apachecore']" />
+ <xsl:value-of select="$message[@id='apachecore']" />
</a>
</li>&lf;
<li>
<a href="mod/mpm_common.html">
- <xsl:value-of select="$messages/message[@name='apachempmcommon']" />
+ <xsl:value-of select="$message[@id='apachempmcommon']" />
</a>
</li>&lf;
<li>
<a href="mod/{$current/name}.html">
- <xsl:value-of select="$messages/message[@name='apachempm']" />
+ <xsl:value-of select="$message[@id='apachempm']" />
<xsl:text> </xsl:text>
<xsl:value-of select="$name" />
</a>
<xsl:if test="$current/status!='MPM' and $current/status!='Core'">
<li>
<a href="mod/{$current/name}.html">
- <xsl:value-of select="$messages/message[@name='apachemodule']"/>
+ <xsl:value-of select="$message[@id='apachemodule']"/>
<xsl:text> </xsl:text>
<xsl:value-of select="$current/name"/>
</a>
<!-- Process an entire document into an HTML page -->
<!-- ==================================================================== -->
<xsl:template match="modulesynopsis">
-<html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
+<html xml:lang="{$doclang}" lang="{$doclang}">
<xsl:call-template name="head" />&lf;
<body>&lf;
<h1>
<xsl:choose>
<xsl:when test="status='Core'">
- <xsl:value-of select="$messages/message
- [@name='apachecore']" />
+ <xsl:value-of select="$message
+ [@id='apachecore']" />
</xsl:when>
<xsl:when test="name='mpm_common'">
- <xsl:value-of select="$messages/message
- [@name='apachempmcommon']" />
+ <xsl:value-of select="$message
+ [@id='apachempmcommon']" />
</xsl:when>
<xsl:when test="status='MPM'">
- <xsl:value-of select="$messages/message
- [@name='apachempm']" />
+ <xsl:value-of select="$message
+ [@id='apachempm']" />
<xsl:text> </xsl:text>
<xsl:call-template name="module-translatename">
<xsl:with-param name="name" select="name" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$messages/message
- [@name='apachemodule']" />
+ <xsl:value-of select="$message
+ [@id='apachemodule']" />
<xsl:text> </xsl:text>
<xsl:value-of select="name" />
</xsl:otherwise>
<tr>
<th>
<a href="module-dict.html#Description">
- <xsl:value-of select="$messages/message
- [@name='description']" />
+ <xsl:value-of select="$message
+ [@id='description']" />
<xsl:text>:</xsl:text>
</a>
</th>
<tr>
<th>
<a href="module-dict.html#Status">
- <xsl:value-of select="$messages/message
- [@name='status']" />
+ <xsl:value-of select="$message
+ [@id='status']" />
<xsl:text>:</xsl:text>
</a>
</th>
<tr>
<th>
<a href="module-dict.html#ModuleIdentifier">
- <xsl:value-of select="$messages/message
- [@name='moduleidentifier']" />
+ <xsl:value-of select="$message
+ [@id='moduleidentifier']" />
<xsl:text>:</xsl:text>
</a>
</th>
<tr>
<th>
<a href="module-dict.html#SourceFile">
- <xsl:value-of select="$messages/message
- [@name='sourcefile']" />
+ <xsl:value-of select="$message
+ [@id='sourcefile']" />
<xsl:text>:</xsl:text>
</a>
</th>
<tr>
<th>
<a href="module-dict.html#Compatibility">
- <xsl:value-of select="$messages/message
- [@name='compatibility']" />
+ <xsl:value-of select="$message
+ [@id='compatibility']" />
<xsl:text>:</xsl:text>
</a>
</th>
<!-- optional) -->
<xsl:if test="summary">
<h3>
- <xsl:value-of select="$messages/message
- [@name='summary']" />
+ <xsl:value-of select="$message
+ [@id='summary']" />
</h3>&lf;
<xsl:apply-templates select="summary" />
<div id="quickview">
<xsl:if test="not($is-chm)">
<h3 class="directives">
- <xsl:value-of select="$messages/message
- [@name='directives']" />
+ <xsl:value-of select="$message
+ [@id='directives']" />
</h3>&lf;
<xsl:choose>
<xsl:otherwise>
<p>
- <xsl:value-of select="$messages/message
- [@name='nodirectives']" />
+ <xsl:value-of select="$message
+ [@id='nodirectives']" />
</p>&lf;
</xsl:otherwise>
</xsl:choose>
<xsl:if test="section">
<h3>
- <xsl:value-of select="$messages/message
- [@name='topics']" />
+ <xsl:value-of select="$message
+ [@id='topics']" />
</h3>&lf;
<ul id="topics">&lf;
<xsl:if test="seealso">
<h3>
- <xsl:value-of select="$messages/message
- [@name='seealso']" />
+ <xsl:value-of select="$message
+ [@id='seealso']" />
</h3>&lf;
<ul class="seealso">&lf;
</a>
<xsl:choose>
- <xsl:when test="$messages/message
- [@name='directive']/@replace-space-with">
- <xsl:value-of select="$messages/message
- [@name='directive']/@replace-space-with"/>
+ <xsl:when test="$message
+ [@id='directive']/@replace-space-with">
+ <xsl:value-of select="$message
+ [@id='directive']/@replace-space-with"/>
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:choose>
<a id="{$lowername}" name="{$lowername}">
- <xsl:value-of select="$messages/message[@name='directive']" />
+ <xsl:value-of select="$message[@id='directive']" />
</a>
</h2>&lf;
<tr>
<th>
<a href="directive-dict.html#Description">
- <xsl:value-of select="$messages/message
- [@name='description']" />
+ <xsl:value-of select="$message
+ [@id='description']" />
<xsl:text>:</xsl:text>
</a>
</th>
<tr>
<th>
<a href="directive-dict.html#Syntax">
- <xsl:value-of select="$messages/message[@name='syntax']" />
+ <xsl:value-of select="$message[@id='syntax']" />
<xsl:text>:</xsl:text>
</a>
</th>
<tr>
<th>
<a href="directive-dict.html#Default">
- <xsl:value-of select="$messages/message[@name='default']" />
+ <xsl:value-of select="$message[@id='default']" />
<xsl:text>:</xsl:text>
</a>
</th>
<tr>
<th>
<a href="directive-dict.html#Context">
- <xsl:value-of select="$messages/message[@name='context']" />
+ <xsl:value-of select="$message[@id='context']" />
<xsl:text>:</xsl:text>
</a>
</th>
<tr>
<th>
<a href="directive-dict.html#Override">
- <xsl:value-of select="$messages/message[@name='override']"/>
+ <xsl:value-of select="$message[@id='override']"/>
<xsl:text>:</xsl:text>
</a>
</th>
<tr>
<th>
<a href="directive-dict.html#Status">
- <xsl:value-of select="$messages/message[@name='status']" />
+ <xsl:value-of select="$message[@id='status']" />
<xsl:text>:</xsl:text>
</a>
</th>
<tr>
<th>
<a href="directive-dict.html#Module">
- <xsl:value-of select="$messages/message[@name='module']" />
+ <xsl:value-of select="$message[@id='module']" />
<xsl:text>:</xsl:text>
</a>
</th>
<tr>
<th>
<a href="directive-dict.html#Compatibility">
- <xsl:value-of select="$messages/message
- [@name='compatibility']" />
+ <xsl:value-of select="$message
+ [@id='compatibility']" />
<xsl:text>:</xsl:text>
</a>
</th>
<xsl:if test="seealso">
<h3>
- <xsl:value-of select="$messages/message[@name='seealso']" />
+ <xsl:value-of select="$message[@id='seealso']" />
</h3>&lf;
<ul>&lf;
<xsl:template match="context">
<xsl:choose>
<xsl:when test="normalize-space(.) = 'server config'">
- <xsl:value-of select="$messages/message[@name='serverconfig']" />
+ <xsl:value-of select="$message[@id='serverconfig']" />
</xsl:when>
<xsl:when test="normalize-space(.) = 'virtual host'">
- <xsl:value-of select="$messages/message[@name='virtualhost']" />
+ <xsl:value-of select="$message[@id='virtualhost']" />
</xsl:when>
<xsl:when test="normalize-space(.) = 'directory'">
- <xsl:value-of select="$messages/message[@name='directory']" />
+ <xsl:value-of select="$message[@id='directory']" />
</xsl:when>
<xsl:when test="normalize-space(.) = '.htaccess'">
- <xsl:value-of select="$messages/message[@name='htaccess']" />
+ <xsl:value-of select="$message[@id='htaccess']" />
</xsl:when>
<xsl:otherwise> <!-- error -->
<xsl:message terminate="yes">
/>
<!-- create nodeset for referencing later -->
-<xsl:variable name="design" select="document('')/xsl:stylesheet
- /xsl:template[@name='designations']/item" />
+<xsl:variable name="design" select="document('util/designations.xml')
+ /items/item" />
<!-- Constants used for case translation -->
<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
<xsl:text>URI: </xsl:text>
<xsl:value-of select="/metafile/basename" />
-<xsl:text>.html</xsl:text>
<xsl:value-of select="$design[translate(@lang, $uppercase, $lowercase)
= $lang]" />&lf;
</xsl:template>
<!-- /variant -->
-<!-- ==================================================================== -->
-<!-- do NOT call this template, it's referenced automagically via -->
-<!-- document() function and acts as simple data container. -->
-<!-- ==================================================================== -->
-<xsl:template name="designations">
-<item lang="de" charset="ISO-8859-1" >.de</item>
-<item lang="en" charset="ISO-8859-1" >.en</item>
-<item lang="es" charset="ISO-8859-1" >.es</item>
-<item lang="fr" charset="ISO-8859-1" >.fr</item>
-<item lang="ja" charset="ISO-2022-JP">.ja.jis</item>
-<item lang="ko" charset="EUC-KR" >.ko.euc-kr</item>
-<item lang="ru" charset="KOI8-R" >.ru.koi8-r</item>
-<item lang="zh-CN" charset="GB2312" >.zh-cn.gb2312</item>
-</xsl:template>
-
</xsl:stylesheet>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<items>
+<item charset="ISO-8859-1" lang="de">.html.de</item>
+<item charset="ISO-8859-1" lang="en">.html.en</item>
+<item charset="ISO-8859-1" lang="es">.html.es</item>
+<item charset="ISO-8859-1" lang="fr">.html.fr</item>
+<item charset="ISO-2022-JP" lang="ja">.html.ja.jis</item>
+<item charset="EUC-KR" lang="ko">.html.ko.euc-kr</item>
+<item charset="KOI8-R" lang="ru">.html.ru.koi8-r</item>
+</items>