]> granicus.if.org Git - apache/blob - docs/manual/style/manual.xsl
Put the "seealso"s after the directive index.
[apache] / docs / manual / style / manual.xsl
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
3 <xsl:stylesheet version="1.0"
4               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5                   xmlns="http://www.w3.org/TR/xhtml1/strict">
6
7 <!-- Include constants, variables, and macros -->
8 <xsl:import href="settings.xsl" />
9
10 <xsl:output method="html" encoding="iso-8859-1" indent="no"/>
11
12 <xsl:template match="moduleindex">
13 <html>
14 <head><title><xsl:value-of select="title"/> - Apache HTTP Server</title>
15 <link rel="stylesheet" type="text/css" href="../style/manual.css" />
16 </head>
17 <body>
18   <blockquote>
19    <div align="center">
20     <img src="../images/sub.gif" alt="[APACHE DOCUMENTATION]" /> 
21     <h3>Apache HTTP Server Version 2.0</h3>
22    </div>
23    <h1 align="center"><xsl:value-of select="title"/></h1>
24 <xsl:apply-templates select="summary" />
25 <h2>Core Features and Multi-Processing Modules</h2>
26 <dl>
27 <xsl:for-each select="document(modulelist/modulefile)/modulesynopsis">
28 <xsl:sort select="name"/>
29 <xsl:if test="status='MPM' or status='Core'">
30 <dt><a href="{name}.html"><xsl:value-of select="name"/></a></dt>
31 <dd><xsl:apply-templates select="description"/></dd>
32 </xsl:if>
33 </xsl:for-each>
34 </dl>
35 <h2>Other Modules</h2>
36 <dl>
37 <xsl:for-each select="document(modulelist/modulefile)/modulesynopsis">
38 <xsl:sort select="name"/>
39 <xsl:if test="status!='MPM' and status!='Core'">
40 <dt><a href="{name}.html"><xsl:value-of select="name"/></a></dt>
41 <dd><xsl:apply-templates select="description"/></dd>
42 </xsl:if>
43 </xsl:for-each>
44 </dl>
45 </blockquote>
46 <!-- Page footer -->
47 <hr />
48 <h3 align="center">Apache HTTP Server Version 2.0</h3>
49 <a href="./"><img src="../images/index.gif" alt="Index" /></a>
50 <a href="../"><img src="../images/home.gif" alt="Home" /></a>
51 </body>
52 </html>
53 </xsl:template>
54
55
56 <xsl:template match="directiveindex">
57 <html>
58 <head><title><xsl:value-of select="title"/> - Apache HTTP Server</title>
59 <link rel="stylesheet" type="text/css" href="../style/manual.css" />
60 </head>
61 <body>
62   <blockquote>
63    <div align="center">
64     <img src="../images/sub.gif" alt="[APACHE DOCUMENTATION]" /> 
65     <h3>Apache HTTP Server Version 2.0</h3>
66    </div>
67    <h1 align="center"><xsl:value-of select="title"/></h1>
68 <xsl:apply-templates select="summary" />
69 <ul>
70 <xsl:for-each select="document(modulelist/modulefile)/modulesynopsis/directivesynopsis">
71 <xsl:sort select="name"/>
72 <xsl:if test="not(/modulesynopsis/directivesynopsis/@location)">
73 <li><a href="{/modulesynopsis/name}.html#{translate(name,$uppercase,$lowercase)}"
74 ><xsl:value-of select="name"/></a></li>
75 </xsl:if>
76 </xsl:for-each>
77 </ul>
78 </blockquote>
79 <!-- Page footer -->
80 <hr />
81 <h3 align="center">Apache HTTP Server Version 2.0</h3>
82 <a href="./"><img src="../images/index.gif" alt="Index" /></a>
83 <a href="../"><img src="../images/home.gif" alt="Home" /></a>
84 </body>
85 </html>
86 </xsl:template>
87
88  <!-- Process an entire document into an HTML page -->
89  <xsl:template match="modulesynopsis">
90 <html>
91  <head>
92 <xsl:comment>
93 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
94      This file is generated from xml source: DO NOT EDIT
95 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
96 </xsl:comment>
97   <xsl:apply-templates select="meta"/>
98   <title><xsl:value-of select="name"/> - Apache HTTP Server</title>
99   <link rel="stylesheet" type="text/css" href="../style/manual.css" />
100  </head>
101  <body>
102   <blockquote>
103    <div align="center">
104     <img src="../images/sub.gif" alt="[APACHE DOCUMENTATION]" /> 
105     <h3>Apache HTTP Server Version 2.0</h3>
106    </div>
107    <h1 align="center"><xsl:value-of select="$messages/message[@name='apachemodule']"/><xsl:text> </xsl:text> <xsl:value-of select="name"/></h1>
108    <!-- Description and module-headers -->
109    <table bgcolor="#cccccc" cellpadding="0" cellspacing="1"><tr><td>
110     <table bgcolor="#ffffff">
111      <tr><td valign="top"><span class="help"><xsl:value-of select="$messages/message[@name='description']"/>:</span> </td>
112          <td><xsl:apply-templates select="description"/></td></tr>
113      <tr><td><a class="help" href="module-dict.html#Status"><xsl:value-of select="$messages/message[@name='status']"/>:</a> </td>
114          <td><xsl:value-of select="status"/></td></tr>
115   <xsl:if test="identifier">
116      <tr><td><a class="help" href="module-dict.html#ModuleIdentifier"><xsl:value-of select="$messages/message[@name='moduleidentifier']"/>:</a> </td>
117          <td><xsl:value-of select="identifier"/></td></tr>
118   </xsl:if>
119   <xsl:if test="compatibility">
120      <tr><td valign="top" align="left"><a class="help" href="module-dict.html#Compatibility"
121        ><xsl:value-of select="$messages/message[@name='compatibility']"/>:</a> </td>
122          <td><xsl:apply-templates select="compatibility"/></td>
123      </tr>
124     </xsl:if>
125    </table>
126  </td></tr></table>
127
128 <!-- Summary of module features/usage (1 to 3 paragraphs, optional) -->
129
130 <xsl:if test="summary">
131   <h2>Summary</h2>
132   <xsl:apply-templates select="summary"/>
133 </xsl:if>
134
135 <!-- Index of directives, automatically generated from
136      directivesynopsis/name -->
137
138 <h2>Directives</h2>
139
140 <xsl:if test="directivesynopsis">
141   <ul>
142      <xsl:for-each select="directivesynopsis">
143        <xsl:sort select="name"/>
144        <xsl:variable name="name">
145          <xsl:value-of select="name"/>
146        </xsl:variable>
147        <xsl:variable name="lowername" 
148          select="translate($name, $uppercase, $lowercase)" />
149        <xsl:if test="not(@location)">
150          <li><a href="#{$lowername}"><xsl:value-of select="name"/></a></li>
151        </xsl:if>
152        <xsl:if test="./@location">
153          <xsl:variable name="location">
154            <xsl:value-of select="./@location"/>
155          </xsl:variable>
156          <xsl:variable name="lowerlocation" 
157            select="translate($location, $uppercase, $lowercase)" />
158          <li><a href="{$lowerlocation}.html#{$lowername}"><xsl:value-of select="name"/></a></li>
159        </xsl:if>
160      </xsl:for-each>
161   </ul>
162 </xsl:if>
163 <xsl:if test="not(directivesynopsis)">
164   <p>This module provides no directives.</p>
165 </xsl:if>
166
167 <xsl:if test="seealso">
168  <p><strong><xsl:value-of select="$messages/message[@name='seealso']"/></strong></p>
169  <ul>
170   <xsl:for-each select="seealso">
171    <li><xsl:apply-templates/></li>
172   </xsl:for-each>
173  </ul>
174 </xsl:if>
175
176 <!-- Sections of documentation about the module as a whole -->
177
178 <xsl:apply-templates select="section"/>
179
180 <hr />
181
182 <!-- Directive documentation -->
183
184 <xsl:apply-templates select="directivesynopsis">
185   <xsl:sort select="name"/>
186 </xsl:apply-templates> 
187
188 <!-- Page footer -->
189
190 <h3 align="center">Apache HTTP Server Version 2.0</h3>
191 <a href="./"><img src="../images/index.gif" alt="Index" /></a>
192 <a href="../"><img src="../images/home.gif" alt="Home" /></a>
193
194 </blockquote>
195 </body>
196 </html>
197 </xsl:template> <!-- /modulesynopsis -->
198
199
200 <!-- Subsections: get a lower level heading -->
201   <xsl:template match="section/section">
202    <xsl:variable name="href">
203       <xsl:value-of select="@id"/>
204     </xsl:variable>
205       <!-- Section heading -->
206     <xsl:if test="@id">
207       <h3><a name="{$href}"><xsl:apply-templates select="./title" mode="print"/></a></h3>
208     </xsl:if>
209     <xsl:if test="not(@id)">
210       <h3><xsl:apply-templates select="./title" mode="print"/></h3>
211     </xsl:if>
212       <!-- Section body -->
213         <xsl:apply-templates/>
214   </xsl:template>
215
216 <!-- Process a documentation section -->
217   <xsl:template match="section">
218     <xsl:variable name="href">
219       <xsl:value-of select="@id"/>
220     </xsl:variable>
221       <!-- Section heading -->
222     <xsl:if test="@id">
223       <h2><a name="{$href}"><xsl:apply-templates select="./title" mode="print"/></a></h2>
224     </xsl:if>
225     <xsl:if test="not(@id)">
226       <h2><xsl:apply-templates select="./title" mode="print"/></h2>
227     </xsl:if>
228       <!-- Section body -->
229         <xsl:apply-templates/>
230   </xsl:template>
231
232   <xsl:template match="section/title" mode="print">
233     <xsl:apply-templates/>
234   </xsl:template>
235
236   <!-- Don't print the title twice -->
237   <xsl:template match="section/title"></xsl:template>
238
239   <xsl:template match="directivesynopsis">
240
241   <xsl:if test="not(@location)">
242   <xsl:variable name="name">
243     <xsl:value-of select="./name"/>
244   </xsl:variable>
245   <xsl:variable name="lowername" 
246      select="translate($name, $uppercase, $lowercase)" />
247   <!-- Directive heading gets both mixed case and lowercase anchors,
248        and includes lt/gt only for "section" directives -->
249   <h2><a name="{$name}"><xsl:if test="./@type='section'">&lt;</xsl:if
250       ><xsl:value-of select="./name"/><xsl:if test="./@type='section'"
251       >&gt;</xsl:if></a><xsl:text> </xsl:text><a 
252       name="{$lowername}">Directive</a></h2>
253
254 <!-- Directive header -->
255 <table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1">
256 <tr><td>
257 <table bgcolor="#ffffff">
258   <tr><td><strong><xsl:value-of select="$messages/message[@name='description']"/>: </strong></td>
259     <td><xsl:value-of select="description"/></td></tr>
260   <tr><td><a class="help" href="directive-dict.html#Syntax"><xsl:value-of select="$messages/message[@name='syntax']"/>:</a> </td>
261     <td><xsl:apply-templates select="syntax"/></td></tr>
262   <xsl:if test="default">
263     <tr><td><a class="help" href="directive-dict.html#Default"
264       ><xsl:value-of select="$messages/message[@name='default']"/>:</a> </td>
265       <td><code><xsl:value-of select="default"/></code></td></tr>
266   </xsl:if>
267   <tr><td><a class="help" href="directive-dict.html#Context"><xsl:value-of select="$messages/message[@name='context']"/>:</a> </td>
268     <td><xsl:apply-templates select="contextlist"/></td></tr>
269   <xsl:if test="override">
270     <tr><td><a class="help" href="directive-dict.html#Override"
271     ><xsl:value-of select="$messages/message[@name='override']"/>:</a> </td>
272     <td><xsl:value-of select="override"/></td></tr>
273   </xsl:if>
274   <tr><td><a class="help" href="directive-dict.html#Status"><xsl:value-of select="$messages/message[@name='status']"/>:</a> </td>
275     <td><xsl:value-of select="/modulesynopsis/status"/></td></tr>
276   <tr><td><a class="help" href="directive-dict.html#Module"><xsl:value-of select="$messages/message[@name='module']"/>:</a> </td>
277     <td>
278     <xsl:if test="modulelist"><xsl:apply-templates select="modulelist"/>
279       </xsl:if>
280     <xsl:if test="not(modulelist)">
281       <xsl:value-of select="/modulesynopsis/name"/>
282     </xsl:if>
283     </td></tr>
284   <xsl:if test="compatibility">
285     <tr><td valign="top" align="left"><a class="help" href="directive-dict.html#Compatibility"
286       ><xsl:value-of select="$messages/message[@name='compatibility']"/>:</a> </td>
287       <td><xsl:value-of select="compatibility"/></td></tr>
288   </xsl:if>
289 </table>
290 </td></tr></table>
291
292 <xsl:apply-templates select="usage"/>
293 <xsl:if test="seealso">
294   <p><strong><xsl:value-of select="$messages/message[@name='seealso']"/></strong></p>
295   <ul>
296     <xsl:for-each select="seealso">
297       <li><xsl:apply-templates/></li>
298     </xsl:for-each>
299   </ul>
300 </xsl:if>
301
302 <hr />
303 </xsl:if> <!-- not(@location) -->
304 </xsl:template> <!-- /directivesynopsis -->
305
306   <xsl:template match="contextlist">
307     <xsl:apply-templates select="context"/>
308   </xsl:template>
309
310   <xsl:template match="context">
311     <xsl:value-of select="." />
312     <xsl:if test="not(position()=last())">, </xsl:if>
313   </xsl:template>
314
315   <xsl:template match="modulelist">
316     <xsl:apply-templates select="module"/>
317   </xsl:template>
318
319   <xsl:template match="example">
320   <blockquote>
321   <table cellpadding="10"><tr><td bgcolor="#eeeeee">
322      <xsl:apply-templates select="title" mode="print"/>
323      <code><xsl:apply-templates/></code>
324   </td></tr></table>
325   </blockquote>
326   </xsl:template>
327
328   <xsl:template match="example/title" mode="print">
329      <p align="center"><strong><xsl:apply-templates/></strong></p>
330   </xsl:template>
331   <xsl:template match="example/title"></xsl:template>
332
333   <xsl:template match="note">
334   <blockquote>
335   <table><tr><td>
336    <xsl:choose>
337     <xsl:when test="@type='warning'">
338      <xsl:attribute name="bgcolor">#ffe5f5</xsl:attribute>
339     </xsl:when>
340     <xsl:otherwise>
341      <xsl:attribute name="bgcolor">#e0e5f5</xsl:attribute>
342     </xsl:otherwise>
343    </xsl:choose>
344      <xsl:apply-templates/>
345   </td></tr></table>
346   </blockquote>
347   </xsl:template>
348   <xsl:template match="note/title">
349      <p align="center"><strong><xsl:apply-templates/></strong></p>
350   </xsl:template>
351
352   <xsl:template match="directive">
353     <xsl:if test="@module">
354       <xsl:variable name="module">
355         <xsl:value-of select="./@module"/>
356       </xsl:variable>
357       <xsl:variable name="directive">
358         <xsl:value-of select="."/>
359       </xsl:variable>
360       <xsl:variable name="lowerdirective" select="translate($directive, $uppercase, $lowercase)" />
361       <xsl:if test="@module=/modulesynopsis/name">
362         <a class="directive" href="#{$lowerdirective}"><code class="directive"><xsl:if test="./@type='section'">&lt;</xsl:if><xsl:value-of select="."/><xsl:if test="./@type='section'">&gt;</xsl:if></code></a>
363       </xsl:if>
364       <xsl:if test="@module!=/modulesynopsis/name">
365         <a class="directive" href="{$module}.html#{$lowerdirective}"><code class="directive"><xsl:if test="./@type='section'">&lt;</xsl:if><xsl:value-of select="."/><xsl:if test="./@type='section'">&gt;</xsl:if></code></a>
366       </xsl:if>
367     </xsl:if>
368     <xsl:if test="not(@module)">
369        <code class="directive"><xsl:if test="./@type='section'">&lt;</xsl:if><xsl:value-of select="."/><xsl:if test="./@type='section'">&gt;</xsl:if></code>
370     </xsl:if>
371   </xsl:template>
372
373   <xsl:template match="module">
374     <code><a href="{.}.html"><xsl:value-of select="."/></a></code><xsl:if test="parent::modulelist"><xsl:if test="not(position()=last())">, </xsl:if>
375     </xsl:if>
376   </xsl:template>
377
378   <!-- These templates just pass through their content -->
379   <xsl:template match="summary">
380     <xsl:apply-templates/>
381   </xsl:template>
382
383   <xsl:template match="description">
384     <xsl:apply-templates/>
385   </xsl:template>
386
387   <xsl:template match="usage">
388     <xsl:apply-templates/>
389   </xsl:template>
390
391   <xsl:template match="syntax">
392     <xsl:apply-templates/>
393   </xsl:template>
394
395   <!-- Process everything else by just passing it through -->
396   <xsl:template match="*|@*">
397     <xsl:copy>
398       <xsl:apply-templates select="@*|*|text()"/>
399     </xsl:copy>
400   </xsl:template>
401
402 </xsl:stylesheet>