comparison xsls/error.xsls @ 1309:59f7fb43e39c

Design: used generic layout for error pages.
author Valentin Bartenev <vbart@nginx.com>
date Fri, 26 Sep 2014 20:02:47 +0400
parents e6f3391df2ea
children fdf1464e1977
comparison
equal deleted inserted replaced
1308:f0383f5cfbb8 1309:59f7fb43e39c
13 -- a current directory of a XSLT script is where the script is stored, 13 -- a current directory of a XSLT script is where the script is stored,
14 -- but not where XSLT processor has been started to run the script 14 -- but not where XSLT processor has been started to run the script
15 --> 15 -->
16 X:param XML = "'../xml'"; 16 X:param XML = "'../xml'";
17 X:param YEAR; 17 X:param YEAR;
18 X:param ORIGIN;
18 X:param TRANS; 19 X:param TRANS;
19 20
20 X:var LINK = "/error/@link"; 21 X:var LINK = "/error/@link";
21 X:var LANG = "/error/@lang"; 22 X:var LANG = "/error/@lang";
22 23
23 X:include href = "dirname.xslt"; 24 X:include href = "dirname.xslt";
25 X:include href = "link.xslt";
26 X:include href = "style.xslt";
27 X:include href = "body.xslt";
24 X:include href = "menu.xslt"; 28 X:include href = "menu.xslt";
25 X:include href = "ga.xslt"; 29 X:include href = "ga.xslt";
30 X:include href = "content.xslt";
26 31
27 32
28 X:template = "/error" { 33 X:template = "/error" {
29 <html><head><title> !{@name} </title> 34 <html><head><title> !{@name} </title>
30 35
31 <style type="text/css">!{ normalize-space(' 36 !style (lang="@lang")
32 body { background: white;
33 color: black;
34 font-family: Georgia, serif; }
35 ') }
36 </style>
37 37
38 !ga () 38 !ga ()
39 39
40 </head> 40 </head>
41 41
42 <body> 42 !body (lang="@lang")
43 <table width="100%">
44 <tr>
45 <td width="70%"><center><h1> !{@name} </h1></center></td>
46 <td rowspan="2" align="right" valign="top">
47 <img src="/nginx.gif" alt="nginx"/><br/>
48 43
49 <br/>
50 <br/>
51
52 !! "document(concat($XML, '/menu.xml'))
53 /menus/menu[@lang = current()/@lang]/item";
54 </td>
55 </tr>
56 </table>
57 </body>
58 </html> 44 </html>
59 } 45 }
60 46
61 } 47 }