comparison xsls/article.xsls @ 122:871ea104fdbf

Simplified some things.
author Ruslan Ermilov <ru@nginx.com>
date Fri, 21 Oct 2011 05:00:47 +0000
parents f31230984540
children 7db449e89e92
comparison
equal deleted inserted replaced
121:49443032011c 122:871ea104fdbf
9 -- but not where XSLT processor has been started to run the script 9 -- but not where XSLT processor has been started to run the script
10 --> 10 -->
11 X:param XML = "'../xml'"; 11 X:param XML = "'../xml'";
12 X:param YEAR; 12 X:param YEAR;
13 13
14 X:var SITE = "'http://nginx.org'";
15 X:var LINK = "/article/@link | /module/@link"; 14 X:var LINK = "/article/@link | /module/@link";
16 X:var LANG = "/article/@lang | /module/@lang"; 15 X:var LANG = "/article/@lang | /module/@lang";
17 16
18 X:include href = "dirname.xslt"; 17 X:include href = "dirname.xslt";
19 X:include href = "link.xslt"; 18 X:include href = "link.xslt";
29 X:template = "/article" { 28 X:template = "/article" {
30 <html><head> 29 <html><head>
31 30
32 <title> !{@title} </title> 31 <title> !{@title} </title>
33 32
34 !style (lang="/article/@lang") 33 !style (lang="$LANG")
35 34
36 </head> 35 </head>
37 36
38 !body (lang="/article/@lang") 37 !body (lang="$LANG")
39 38
40 </html> 39 </html>
41 } 40 }
42 41
43 42
44 X:template = "/article[@lang='he']" { 43 X:template = "/article[@lang='he']" {
45 <html dir="rtl"><head> 44 <html dir="rtl"><head>
46 45
47 <title> !{@title} </title> 46 <title> !{@title} </title>
48 47
49 !style (lang="/article/@lang") 48 !style (lang="$LANG")
50 49
51 </head> 50 </head>
52 51
53 !body (lang="/article/@lang") 52 !body (lang="$LANG")
54 53
55 </html> 54 </html>
56 } 55 }
57 56
58 57
59 X:template = "/module" { 58 X:template = "/module" {
60 <html><head> 59 <html><head>
61 60
62 <title> !{@title} </title> 61 <title> !{@title} </title>
63 62
64 !style (lang="/module/@lang") 63 !style (lang="$LANG")
65 64
66 </head> 65 </head>
67 66
68 !body (lang="/module/@lang") 67 !body (lang="$LANG")
69 68
70 </html> 69 </html>
71 } 70 }
72 71
73 72
74 X:template = "/module[@lang='he']" { 73 X:template = "/module[@lang='he']" {
75 <html dir="rtl"><head> 74 <html dir="rtl"><head>
76 75
77 <title> !{@title} </title> 76 <title> !{@title} </title>
78 77
79 !style (lang="/module/@lang") 78 !style (lang="$LANG")
80 79
81 </head> 80 </head>
82 81
83 !body (lang="/module/@lang") 82 !body (lang="$LANG")
84 83
85 </html> 84 </html>
86 } 85 }
87 86
88 87