Mercurial > hg > nginx-site
annotate xslt/body.xslt @ 1017:9f9a427a73eb
Fixed broken links to chinese versions of some modules.
The chinese version contains untranslated copies of english documentation for
random_index and realip modules. The result is the appearance of 'translation
to chinese' link for this modules pointing to non-existing document. This
files are removed.
Also, broken links are generated for the chinese version of the "flv" module,
but the translation exists, although not enabled for publication. Since
contents of file looks like a valid translation, it is allowed to be published.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Mon, 18 Nov 2013 12:48:10 +0400 |
parents | f8ef590048e7 |
children | 441a71c4e5ef |
rev | line source |
---|---|
170 | 1 <?xml version="1.0" encoding="utf-8"?> |
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
3 | |
4 <xsl:template name="body"> | |
5 <xsl:param name="lang"/> | |
6 | |
7 <xsl:variable name="MENU_ALIGN"> | |
8 <xsl:choose> | |
9 | |
10 <xsl:when test="$lang = 'he'"> | |
11 <xsl:text>left</xsl:text> | |
12 </xsl:when> | |
13 <xsl:otherwise> | |
14 <xsl:text>right</xsl:text> | |
15 </xsl:otherwise> | |
16 </xsl:choose> | |
17 </xsl:variable> | |
18 | |
19 <xsl:variable name="INDEX_ALIGN"> | |
20 <xsl:choose> | |
21 | |
22 <xsl:when test="$lang = 'he'"> | |
23 <xsl:text>right</xsl:text> | |
24 </xsl:when> | |
25 <xsl:otherwise> | |
26 <xsl:text>left</xsl:text> | |
27 </xsl:otherwise> | |
28 </xsl:choose> | |
29 </xsl:variable> | |
30 | |
31 <body> | |
32 | |
33 <table width="100%"> | |
34 | |
35 <tr> | |
36 | |
37 <td width="70%"> | |
694 | 38 |
39 <div id="banner"> | |
40 | |
41 <xsl:if test="@lang = 'he'"> | |
42 <xsl:attribute name="class"> | |
43 <xsl:text>ltr</xsl:text> | |
44 </xsl:attribute> | |
45 </xsl:if> | |
46 | |
47 <center> | |
48 | |
49 <table> | |
50 | |
51 <tr> | |
52 | |
53 <td align="center"> | |
54 | |
947
d352266017bf
Banner's message and URL updated one more time.
Maxim Konovalov <maxim@nginx.com>
parents:
892
diff
changeset
|
55 <a href="http://nginx.com/products/"> |
694 | 56 |
947
d352266017bf
Banner's message and URL updated one more time.
Maxim Konovalov <maxim@nginx.com>
parents:
892
diff
changeset
|
57 <strong>Make your web site fast and reliable.</strong> |
694 | 58 |
59 </a> | |
60 | |
61 </td> | |
62 | |
63 </tr> | |
64 | |
65 <tr> | |
66 | |
67 <td align="center"> | |
68 | |
973
f8ef590048e7
NGINX Plus announced, banner message corrected.
Maxim Konovalov <maxim@nginx.com>
parents:
947
diff
changeset
|
69 <i>NGINX Plus for mission critical environments.</i> |
694 | 70 |
71 </td> | |
72 | |
73 </tr> | |
74 | |
75 </table> | |
76 | |
77 </center> | |
78 | |
79 </div> | |
80 | |
81 </td> | |
82 | |
83 <td align="right"> | |
84 | |
85 <xsl:if test="@lang = 'he'"> | |
86 <xsl:attribute name="align"> | |
87 <xsl:text>left</xsl:text> | |
88 </xsl:attribute> | |
89 </xsl:if> | |
90 | |
91 <a href="http://nginx.org"> | |
92 | |
93 <img src="http://nginx.org/nginx.gif" alt="nginx" border="0"/> | |
94 | |
95 </a> | |
96 | |
97 </td> | |
98 | |
99 </tr> | |
100 | |
101 <tr> | |
102 | |
103 <td width="70%"> | |
170 | 104 <center> |
105 <h3> | |
106 | |
107 <xsl:value-of select="@name"/> | |
108 <xsl:if test="$YEAR"> | |
109 <xsl:text>: </xsl:text> | |
110 <xsl:value-of select="$YEAR"/> | |
111 </xsl:if> | |
112 | |
113 </h3> | |
114 </center> | |
115 </td> | |
116 | |
117 <td rowspan="2" align="{$MENU_ALIGN}" valign="top"> | |
118 | |
119 <br/> | |
120 | |
121 <xsl:apply-templates select="document(concat($XML, '/menu.xml')) /menus/menu[@lang = $lang]/item"/> | |
122 | |
123 </td> | |
124 | |
125 </tr> | |
126 | |
127 <tr> | |
128 <td valign="top"> | |
129 | |
605 | 130 <xsl:if test="$ORIGIN and document(concat($XML, '/', $ORIGIN))/*/@rev and (not(@rev) or @rev != document(concat($XML, '/', $ORIGIN))/*/@rev)"> |
601 | 131 |
132 <span> | |
133 | |
134 <xsl:if test="@lang = 'he'"> | |
135 <xsl:attribute name="class"> | |
136 <xsl:text>ltr</xsl:text> | |
137 </xsl:attribute> | |
138 </xsl:if> | |
139 | |
140 <blockquote class="note"> | |
141 <xsl:choose> | |
142 | |
143 <xsl:when test="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $lang]/item[@id='outdated']"> | |
144 | |
145 <xsl:apply-templates select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $lang]/item[@id='outdated']"/> | |
146 </xsl:when> | |
147 | |
148 <xsl:otherwise> | |
149 | |
150 <xsl:apply-templates select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = 'en']/item[@id='outdated']"/> | |
151 </xsl:otherwise> | |
152 </xsl:choose> | |
153 | |
154 </blockquote> | |
155 | |
156 </span> | |
157 </xsl:if> | |
158 | |
592 | 159 <xsl:if test="@toc = 'yes' and section[@id and @name]"> |
170 | 160 |
161 <table width="100%"> | |
162 <tr> | |
163 <td align="{$INDEX_ALIGN}"> | |
164 | |
165 <xsl:for-each select="section[@id and @name]"> | |
166 | |
167 <a href="#{@id}"> | |
168 <xsl:value-of select="@name"/> | |
169 </a> | |
170 <br/> | |
171 | |
608 | 172 <xsl:for-each select="section[@id and @name]"> |
173 | |
174 <xsl:text> </xsl:text> | |
175 | |
176 <a href="#{@id}"> | |
177 <xsl:value-of select="@name"/> | |
178 </a> | |
179 <br/> | |
180 </xsl:for-each> | |
181 | |
170 | 182 <xsl:if test="@id = 'directives'"> |
183 | |
184 <xsl:for-each select="directive[@name]"> | |
185 | |
186 <xsl:text> </xsl:text> | |
187 | |
188 <a href="#{@name}"> | |
189 <xsl:value-of select="@name"/> | |
190 </a> | |
191 <br/> | |
192 </xsl:for-each> | |
193 </xsl:if> | |
194 </xsl:for-each> | |
195 | |
196 </td> | |
197 </tr> | |
198 </table> | |
199 </xsl:if> | |
200 | |
201 <xsl:apply-templates/> | |
202 | |
599 | 203 <xsl:if test="@author or @editor or @translator"> |
170 | 204 |
205 <table width="100%"> | |
206 <tr> | |
207 <td align="right"> | |
208 | |
599 | 209 <xsl:if test="@author"> |
210 | |
211 <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $lang]/item[@id='author']"/> | |
170 | 212 |
599 | 213 <xsl:text> </xsl:text> |
214 <xsl:value-of select="@author"/> | |
215 <br/> | |
216 </xsl:if> | |
170 | 217 |
218 <xsl:if test="@editor"> | |
219 | |
220 <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $lang]/item[@id='editor']"/> | |
221 | |
222 <xsl:text> </xsl:text> | |
223 <xsl:value-of select="@editor"/> | |
224 <br/> | |
225 </xsl:if> | |
226 | |
227 <xsl:if test="@translator"> | |
228 | |
229 <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $lang]/item[@id='translator']"/> | |
230 | |
231 <xsl:text> </xsl:text> | |
232 <xsl:value-of select="@translator"/> | |
233 <br/> | |
234 </xsl:if> | |
235 | |
236 </td> | |
237 </tr> | |
238 </table> | |
239 </xsl:if> | |
240 | |
241 </td> | |
242 </tr> | |
243 | |
244 </table> | |
245 | |
246 </body> | |
247 </xsl:template> | |
248 | |
722 | 249 </xsl:stylesheet> |