comparison xslt/body.xslt @ 170:cd2698ea00ab

Added generated XSLTs.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 02 Nov 2011 19:31:11 +0000
parents
children d40371689c1c
comparison
equal deleted inserted replaced
169:b7b160e4e046 170:cd2698ea00ab
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%">
38 <center>
39 <h3>
40
41 <xsl:value-of select="@name"/>
42 <xsl:if test="$YEAR">
43 <xsl:text>: </xsl:text>
44 <xsl:value-of select="$YEAR"/>
45 </xsl:if>
46
47 </h3>
48 </center>
49 </td>
50
51 <td rowspan="2" align="{$MENU_ALIGN}" valign="top">
52
53 <a href="http://nginx.org">
54
55 <img src="/nginx.gif" alt="nginx" border="0"/>
56
57 </a>
58 <br/>
59
60 <br/>
61
62 <br/>
63
64 <xsl:apply-templates select="document(concat($XML, '/menu.xml')) /menus/menu[@lang = $lang]/item"/>
65
66 </td>
67
68 </tr>
69
70 <tr>
71 <td valign="top">
72
73 <xsl:if test="section[@name]">
74
75 <table width="100%">
76 <tr>
77 <td align="{$INDEX_ALIGN}">
78
79 <xsl:for-each select="section[@id and @name]">
80
81 <a href="#{@id}">
82 <xsl:value-of select="@name"/>
83 </a>
84 <br/>
85
86 <xsl:if test="@id = 'directives'">
87
88 <xsl:for-each select="directive[@name]">
89
90 <xsl:text>     </xsl:text>
91
92 <a href="#{@name}">
93 <xsl:value-of select="@name"/>
94 </a>
95 <br/>
96 </xsl:for-each>
97 </xsl:if>
98 </xsl:for-each>
99
100 </td>
101 </tr>
102 </table>
103 </xsl:if>
104
105 <xsl:apply-templates/>
106
107 <xsl:if test="@author">
108
109 <table width="100%">
110 <tr>
111 <td align="right">
112
113 <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $lang]/item[@id='author']"/>
114
115 <xsl:text> </xsl:text>
116 <xsl:value-of select="@author"/>
117 <br/>
118
119 <xsl:if test="@editor">
120
121 <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $lang]/item[@id='editor']"/>
122
123 <xsl:text> </xsl:text>
124 <xsl:value-of select="@editor"/>
125 <br/>
126 </xsl:if>
127
128 <xsl:if test="@translator">
129
130 <xsl:value-of select="document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $lang]/item[@id='translator']"/>
131
132 <xsl:text> </xsl:text>
133 <xsl:value-of select="@translator"/>
134 <br/>
135 </xsl:if>
136
137 </td>
138 </tr>
139 </table>
140 </xsl:if>
141
142 </td>
143 </tr>
144
145 </table>
146
147 </body>
148 </xsl:template>
149
150 </xsl:stylesheet>