directiveindex.xsl revision 66e48875fca2df6669dab4f2690ee36c6913c0ff
538N/A Copyright 2002-2004 The Apache Software Foundation 538N/A Licensed under the Apache License, Version 2.0 (the "License"); 538N/A you may not use this file except in compliance with the License. 538N/A You may obtain a copy of the License at 538N/A Unless required by applicable law or agreed to in writing, software 538N/A distributed under the License is distributed on an "AS IS" BASIS, 538N/A WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 538N/A See the License for the specific language governing permissions and 538N/A limitations under the License. 538N/A<!
DOCTYPE xsl:
stylesheet [
538N/A<
xsl:
stylesheet version="1.0" 538N/A<!-- ==================================================================== --> 538N/A<!-- <directiveindex> --> 538N/A<!-- Builds the directive index page --> 538N/A<!-- ==================================================================== --> 538N/A<
xsl:
template match="directiveindex">
538N/A<
html xml:
lang="{$doclang}" lang="{$doclang}">
538N/A <
xsl:
call-
template name="head"/>&lf;
538N/A <
body id="directive-index">
538N/A <
xsl:
call-
template name="top"/>
538N/A <
xsl:
variable name="directives" 538N/A /modulesynopsis[status!='Obsolete'] 538N/A /directivesynopsis[not(@location)]" />
538N/A <!-- collect the start letters --> 538N/A <
xsl:
variable name="start-letters">
538N/A <
xsl:
call-
template name="directive-startletters">
538N/A <
xsl:
with-
param name="directives" select="$directives" />
538N/A <
xsl:
value-
of select="title" />
538N/A <
xsl:
call-
template name="langavail" />&lf;
538N/A <
xsl:
apply-
templates select="summary" />&lf;
538N/A <
xsl:
call-
template name="letter-bar">
538N/A <
xsl:
with-
param name="letters" select="$start-letters" />
538N/A <
xsl:
with-
param name="first" select="true()" />
538N/A </
p>&lf;
<!-- /.letters --> 538N/A </
div>&lf;
<!-- /preamble --> 538N/A <
div id="directive-list">
538N/A <
xsl:
call-
template name="dindex-of-letter">
538N/A <
xsl:
with-
param name="letters-todo" 538N/A select="$start-letters" />
538N/A <
xsl:
with-
param name="directives" select="$directives" />
538N/A </
div>&lf;
<!-- /#directive-list --> 538N/A <
xsl:
call-
template name="bottom" />&lf;
538N/A<!-- /directiveindex --> 538N/A<!-- ==================================================================== --> 538N/A<!-- the working horse. builds list items of all directives starting with --> 538N/A<!-- one letter when done, it calls itself to catch the next letter --> 538N/A<!-- ==================================================================== --> 538N/A<
xsl:
template name="dindex-of-letter">
538N/A<
xsl:
param name="letters-todo" />
538N/A<
xsl:
param name="directives" />
538N/A<
xsl:
variable name="letter" select="substring($letters-todo, 1, 1)"/>
[$letter = translate(substring(normalize-space(name), 1, 1), $lowercase, $uppercase)]">
<
xsl:
sort select="name" />
<
a href="{/name}.html#{translate(name, $uppercase, $lowercase)}">
<
xsl:
if test="position() = 1">
<
xsl:
attribute name="id">
<
xsl:
value-
of select="$letter" />
<
xsl:
attribute name="name">
<
xsl:
value-
of select="$letter" />
<
xsl:
if test="@type = 'section'"><</
xsl:
if>
<
xsl:
value-
of select="name" />
<
xsl:
if test="@type = 'section'">></
xsl:
if>
<!-- call next letter, if there is --> <
xsl:
if test="string-length($letters-todo) > 1">
<
xsl:
call-
template name="dindex-of-letter">
<
xsl:
with-
param name="letters-todo" select="substring($letters-todo, 2)" />
<
xsl:
with-
param name="directives" select="$directives" />
<!-- /dindex-of-letter -->