synopsis.xsl revision 4930be147adf9e3f6d3ca9313a6524f9bf654b2d
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 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 [
<
xsl:
stylesheet version="1.0"<!-- ==================================================================== --> <!-- <modulesynopsis> --> <!-- Process an entire document into an HTML page --> <!-- ==================================================================== --> <
xsl:
template match="modulesynopsis">
<
html xml:
lang="{$doclang}" lang="{$doclang}">
<
xsl:
call-
template name="head" />&lf;
<
xsl:
call-
template name="top" />&lf;
<
div id="page-content">&lf;
<
xsl:
when test="status='Core'">
<
xsl:
value-
of select="$message <
xsl:
when test="name='mpm_common'">
<
xsl:
value-
of select="$message [@id='apachempmcommon']" />
<
xsl:
when test="status='MPM'">
<
xsl:
value-
of select="$message <
xsl:
call-
template name="module-translatename">
<
xsl:
with-
param name="name" select="name" />
<
xsl:
value-
of select="$message <
xsl:
value-
of select="name" />
<
xsl:
call-
template name="langavail" />&lf;
<!-- Description and module-headers --> <
xsl:
value-
of select="$message <
xsl:
apply-
templates select="description" />
<
xsl:
value-
of select="$message <
xsl:
variable name="status" select="translate( status, $uppercase, $lowercase)"/>
<
xsl:
when test="status = 'External' and status/@href">
<
a href="{status/@href}">
<
xsl:
value-
of select="$message[@id=$status]"/>
select="$message[@id=$status]"/>
<
xsl:
if test="identifier">&lf;
<
xsl:
value-
of select="$message [@id='moduleidentifier']" />
<
xsl:
value-
of select="identifier" />
<
xsl:
if test="sourcefile">&lf;
<
xsl:
value-
of select="$message <
xsl:
value-
of select="sourcefile" />
<
xsl:
if test="compatibility">&lf;
<
xsl:
value-
of select="$message [@id='compatibility']" />
<
xsl:
apply-
templates select="compatibility" />
<
xsl:
value-
of select="$message <
xsl:
apply-
templates select="summary" />
</
div>&lf;
<!-- /#preamble --> <
xsl:
if test="not($is-chm) or seealso">
<
xsl:
if test="not($is-chm)">
<
xsl:
value-
of select="$message <
xsl:
when test="directivesynopsis">
<
xsl:
for-
each select="directivesynopsis">
<
xsl:
sort select="name" />
<
xsl:
variable name="lowername" select="translate(name, $uppercase, <
xsl:
when test="not(@location)">
<
xsl:
if test="@type='section'" <
xsl:
value-
of select="name" />
<
xsl:
if test="@type='section'" <
xsl:
variable name="lowerlocation" select="translate(@location, $uppercase, <
a href="{$lowerlocation}.html#{ <
xsl:
if test="@type='section'" <
xsl:
value-
of select="name" />
<
xsl:
if test="@type='section'" </
xsl:
when>
<!-- have directives --> <
xsl:
value-
of select="$message <
xsl:
value-
of select="$message select="section" mode="index" />
</
xsl:
if>
<!-- /!is-chm --> <
xsl:
value-
of select="$message <
xsl:
for-
each select="seealso">
</
div>
<!-- /#quickview --> </
xsl:
if>&lf;
<!-- have sidebar --> <!-- Sections of documentation about the module as a whole --> <
xsl:
apply-
templates select="section" />&lf;
<!-- Directive documentation --> <
xsl:
apply-
templates select="directivesynopsis">
<
xsl:
sort select="name" />
</
div>&lf;
<!-- /#page-content --> <
xsl:
call-
template name="bottom" />&lf;
<!-- ==================================================================== --> <!-- Directivesynopsis --> <!-- ==================================================================== --> <
xsl:
template match="directivesynopsis">
<
xsl:
if test="not(@location)">
<
xsl:
call-
template name="toplink" />&lf;
<
div class="directive-section">
<
xsl:
variable name="lowername" select="translate(name, $uppercase, $lowercase)" />
<!-- Directive heading gets both mixed case and lowercase --> <!-- anchors, and includes lt/gt only for "section" directives --> <
a id="{name}" name="{name}">
<
xsl:
if test="@type='section'"><</
xsl:
if>
<
xsl:
value-
of select="name" />
<
xsl:
if test="@type='section'">></
xsl:
if>
[@id='directive']/@replace-space-with">
<
xsl:
value-
of select="$message [@id='directive']/@replace-space-with"/>
<
a id="{$lowername}" name="{$lowername}">
<
xsl:
value-
of select="$message[@id='directive']" />
<!-- Directive header --> <
table class="directive">&lf;
<
xsl:
value-
of select="$message <
xsl:
apply-
templates select="description" />
<
xsl:
value-
of select="$message[@id='syntax']" />
<
xsl:
apply-
templates select="syntax" />
<
xsl:
if test="default">&lf;
<
xsl:
value-
of select="$message[@id='default']" />
<
xsl:
apply-
templates select="default" />
<
xsl:
value-
of select="$message[@id='context']" />
<
xsl:
apply-
templates select="contextlist" />
<
xsl:
if test="override">&lf;
<
xsl:
value-
of select="$message[@id='override']"/>
<
xsl:
value-
of select="override" />
<
xsl:
value-
of select="$message[@id='status']" />
<
xsl:
variable name="status" select="translate( /status, $uppercase, $lowercase)"/>
<
xsl:
value-
of select="$message[@id=$status]"/>
<
xsl:
value-
of select="$message[@id='module']" />
<
xsl:
when test="modulelist">
<
xsl:
apply-
templates select="modulelist" />
<
xsl:
value-
of select="/name" />
<
xsl:
if test="compatibility">&lf;
<
xsl:
value-
of select="$message [@id='compatibility']" />
<
xsl:
apply-
templates select="compatibility" />
<
xsl:
apply-
templates select="usage" />&lf;
<
xsl:
value-
of select="$message[@id='seealso']" />
<
xsl:
for-
each select="seealso">
</
div>&lf;
<!-- /.directive-section --><!-- /directivesynopsis --> <!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template match="contextlist">
<
xsl:
apply-
templates select="context" />
<!-- ==================================================================== --> <!-- Each entry is separeted with a comma --> <!-- ==================================================================== --> <
xsl:
template match="context">
<
xsl:
when test="normalize-space(.) = 'server config'">
<
xsl:
value-
of select="$message[@id='serverconfig']" />
<
xsl:
when test="normalize-space(.) = 'virtual host'">
<
xsl:
value-
of select="$message[@id='virtualhost']" />
<
xsl:
when test="normalize-space(.) = 'directory'">
<
xsl:
value-
of select="$message[@id='directory']" />
<
xsl:
when test="normalize-space(.) = '.htaccess'">
<
xsl:
value-
of select="$message[@id='htaccess']" />
<
xsl:
otherwise>
<!-- error --> <
xsl:
message terminate="yes">
unknown context: <
xsl:
value-
of select="." />
<
xsl:
if test="position() != last()">
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template match="modulelist">
<
xsl:
for-
each select="module">
<
xsl:
call-
template name="module" />
<
xsl:
if test="position() != last()">
<!-- ==================================================================== --> <!-- ==================================================================== --> <!-- ==================================================================== --> <!-- ==================================================================== -->