switch to a 60 bit hash
[httpd-crcsyncproxy.git] / docs / manual / style / xsl / indexpage.xsl
blobd62814bfc1cb98bb1bf720d6df64364ce7293105
1 <?xml version="1.0"?>
3 <!--
4 Licensed to the Apache Software Foundation (ASF) under one or more
5 contributor license agreements. See the NOTICE file distributed with
6 this work for additional information regarding copyright ownership.
7 The ASF licenses this file to You under the Apache License, Version 2.0
8 (the "License"); you may not use this file except in compliance with
9 the License. You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 -->
20 <!DOCTYPE xsl:stylesheet [
21 <!ENTITY lf SYSTEM "util/lf.xml">
23 <xsl:stylesheet version="1.0"
24 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
25 xmlns="http://www.w3.org/1999/xhtml">
27 <!-- -->
28 <!-- three columns, select were the particular categories shall be -->
29 <!-- placed in. (order is irrelevant, they're placed in document order) -->
30 <!-- -->
31 <xsl:variable name="indexpage-column1" select="'
32 release
33 manual
34 '"/>
36 <xsl:variable name="indexpage-column2" select="'
37 usersguide
38 '"/>
40 <xsl:variable name="indexpage-column3" select="'
41 howto
42 platform
43 other
44 '"/>
46 <!-- ==================================================================== -->
47 <!-- <indexpage> -->
48 <!-- Process an entire document into an HTML page -->
49 <!-- ==================================================================== -->
50 <xsl:template match="/indexpage">
51 <html xml:lang="{$doclang}" lang="{$doclang}">
52 <xsl:call-template name="head"/>&lf;
54 <body id="index-page">&lf;
55 <xsl:call-template name="top"/>&lf;
57 <div id="page-content">
58 <h1>
59 <xsl:value-of select="title"/>
60 </h1>&lf;
62 <xsl:call-template name="langavail" />&lf;
64 <form>
65 <xsl:call-template name="search.spec" />
66 </form>&lf;
68 <table id="indextable">
69 <tr>
70 <td class="col1">
71 <xsl:apply-templates
72 select="category[contains($indexpage-column1, @id)]" />
73 </td>
74 <td>
75 <xsl:apply-templates
76 select="category[contains($indexpage-column2, @id)]" />
77 </td>
78 <td class="col3">
79 <xsl:apply-templates
80 select="category[contains($indexpage-column3, @id)]" />
81 </td>
82 </tr>
83 </table>
84 </div>&lf; <!-- /#page-content -->
86 <xsl:call-template name="bottom" />&lf;
87 </body>
88 </html>
89 </xsl:template>
90 <!-- /indexpage -->
93 <!-- ==================================================================== -->
94 <!-- category/page -->
95 <!-- ==================================================================== -->
96 <xsl:template match="indexpage/category/page">
97 <li>
98 <xsl:if test="@separate='yes'">
99 <xsl:attribute name="class">separate</xsl:attribute>
100 </xsl:if>
102 <xsl:choose>
103 <xsl:when test="@href">
104 <a href="{@href}">
105 <xsl:call-template name="helper.uri.fix">
106 <xsl:with-param name="uri" select="@href"/>
107 </xsl:call-template>
109 <xsl:value-of select="." />
110 </a>
111 </xsl:when>
112 <xsl:otherwise>
113 <xsl:value-of select="." />
114 </xsl:otherwise>
115 </xsl:choose>
116 </li>&lf;
117 </xsl:template>
118 <!-- /category/page -->
121 <!-- ==================================================================== -->
122 <!-- Process a indexpage category -->
123 <!-- ==================================================================== -->
124 <xsl:template match="indexpage/category">
125 <div class="category">
126 <!-- Section heading -->
127 <h2>
128 <xsl:if test="@id">
129 <a id="{@id}" name="{@id}">
130 <xsl:apply-templates select="title" mode="print" />
131 </a>
132 </xsl:if>
134 <xsl:if test="not(@id)">
135 <xsl:apply-templates select="title" mode="print" />
136 </xsl:if>
137 </h2>&lf;
139 <!-- category body -->
140 <ul>
141 <xsl:apply-templates select="page" />
142 </ul>&lf;
143 </div> <!-- /.section -->
144 </xsl:template>
145 <!-- /category -->
148 <!-- ==================================================================== -->
149 <!-- search specification -->
150 <!-- hidden fields are taken from the advanced search page -->
151 <!-- ==================================================================== -->
152 <xsl:template name="search.spec">
153 <xsl:attribute name="method">get</xsl:attribute>
154 <xsl:attribute name="action">http://www.google.com/search</xsl:attribute>
155 <xsl:if test="$ext-target">
156 <xsl:attribute name="target">_blank</xsl:attribute>
157 </xsl:if>
160 <!-- search google: -->
161 <!-- with all of the words -->
162 <input type="text" value="" name="as_q" />
163 <xsl:text> </xsl:text>
164 <input type="submit" value="{$message[@id='search']}" />
166 <!-- the specified number of results -->
167 <input type="hidden" name="num" value="10" />
169 <!-- the current displayed language -->
170 <input type="hidden" name="hl" value="{$doclang}" />
172 <!-- the current document encoding for input (?) -->
173 <input type="hidden" name="ie" value="{$output-encoding}" />
175 <!-- (submit the original button and name) -->
176 <input type="hidden" name="btnG" value="Google Search" />
178 <!-- including the exact phrase "Version major.minor" -->
179 <input type="hidden" value="{normalize-space($message[@id='version'])}"
180 name="as_epq" />
182 <!-- with at least one of the words (none) -->
183 <input type="hidden" value="" name="as_oq" />
185 <!-- without the phrase "List-Post" (to exclude the mail archives) -->
186 <input type="hidden" value="&quot;List-Post&quot;" name="as_eq" />
188 <!-- return results written in (any) language -->
189 <input type="hidden" name="lr" value="" />
191 <!-- and any format -->
192 <input type="hidden" name="as_ft" value="i" />
193 <input type="hidden" name="as_filetype" value="" />
195 <!-- updated anytime -->
196 <input type="hidden" name="as_qdr" value="all" />
198 <!-- where the result appears anywhere in the document -->
199 <input type="hidden" name="as_occt" value="any" />
201 <!-- only from httpd.apache.org -->
202 <input type="hidden" name="as_dt" value="i" />
203 <input type="hidden" name="as_sitesearch" value="httpd.apache.org" />
205 <!-- turn off "safe" mode -->
206 <input type="hidden" name="safe" value="off" />
207 </p>
208 </xsl:template>
209 <!-- /search.spec -->
211 </xsl:stylesheet>