comparison xsls/article.xsls @ 28:02fc5e96a305

Moving decision logic from Makefile to XSLT because there is no simple way to force Gmake to use the $(OUT)/%_module.html target instead of $(OUT)/%.html target.
author Igor Sysoev <igor@sysoev.ru>
date Thu, 29 Sep 2011 14:14:55 +0000
parents 61e04fc01027
children 1d315ef37215
comparison
equal deleted inserted replaced
27:1201fabeccf7 28:02fc5e96a305
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'"; 14 X:var SITE = "'http://nginx.org'";
15 X:var LINK = "/article/@link"; 15 X:var LINK = "/article/@link | /module/@link";
16 16
17 X:include href = "dirname.xslt"; 17 X:include href = "dirname.xslt";
18 X:include href = "link.xslt"; 18 X:include href = "link.xslt";
19 X:include href = "style.xslt"; 19 X:include href = "style.xslt";
20 X:include href = "body.xslt"; 20 X:include href = "body.xslt";
21 X:include href = "menu.xslt"; 21 X:include href = "menu.xslt";
22 X:include href = "donate.xslt"; 22 X:include href = "donate.xslt";
23 X:include href = "directive.xslt";
23 X:include href = "content.xslt"; 24 X:include href = "content.xslt";
24 X:include href = "versions.xslt"; 25 X:include href = "versions.xslt";
25 26
26 27
27 X:template = "/article" { 28 X:template = "/article" {
52 53
53 </html> 54 </html>
54 } 55 }
55 56
56 57
58 X:template = "/module" {
59 <html><head>
60
61 <title> !{@title} </title>
62
63 !style (lang="/module/@lang")
64
65 </head>
66
67 !body (lang="/module/@lang")
68
69 </html>
57 } 70 }
71
72
73 X:template = "/module[@lang='he']" {
74 <html dir="rtl"><head>
75
76 <title> !{@title} </title>
77
78 !style (lang="/module/@lang")
79
80 </head>
81
82 !body (lang="/module/@lang")
83
84 </html>
85 }
86
87
88 }