Mercurial > hg > nginx-site
comparison xslt/error.xslt @ 170:cd2698ea00ab
Added generated XSLTs.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 02 Nov 2011 19:31:11 +0000 |
parents | |
children | 1507ec5ba69a |
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:output indent="no" version="4.0" encoding="utf-8" method="html"/> | |
5 | |
6 <xsl:strip-space elements="*"/> | |
7 | |
8 <xsl:param select="'../xml'" name="XML"/> | |
9 | |
10 <xsl:template match="/error"> | |
11 | |
12 <html> | |
13 <head> | |
14 <title> | |
15 <xsl:value-of select="@name"/> | |
16 </title> | |
17 | |
18 <style type="text/css"> | |
19 <xsl:value-of select=" normalize-space(' body { font-family: Georgia, serif; } ')"/> | |
20 | |
21 </style> | |
22 | |
23 </head> | |
24 | |
25 <body> | |
26 | |
27 <table width="100%"> | |
28 | |
29 <tr> | |
30 | |
31 <td width="70%"> | |
32 <center> | |
33 <h1> | |
34 <xsl:value-of select="@name"/> | |
35 </h1> | |
36 </center> | |
37 </td> | |
38 | |
39 <td rowspan="2" align="right" valign="top"> | |
40 | |
41 <img src="/nginx.gif" alt="nginx"/> | |
42 <br/> | |
43 | |
44 <br/> | |
45 | |
46 <br/> | |
47 | |
48 <xsl:apply-templates select="document(concat($XML, '/menu.xml')) /menus/menu[@lang = current()/@lang]/item"/> | |
49 | |
50 </td> | |
51 | |
52 </tr> | |
53 | |
54 </table> | |
55 | |
56 </body> | |
57 | |
58 </html> | |
59 </xsl:template> | |
60 | |
61 <xsl:template match="menu/item"> | |
62 | |
63 <a href="{@href}"> | |
64 <xsl:value-of select=" normalize-space(text())"/> | |
65 </a> | |
66 <br/> | |
67 </xsl:template> | |
68 | |
69 <xsl:template match="menu/item[not(@href)]"> | |
70 | |
71 <xsl:value-of select=" normalize-space(text())"/> | |
72 <br/> | |
73 </xsl:template> | |
74 | |
75 </xsl:stylesheet> |