Mercurial > hg > nginx
annotate docs/xsls/changes.xsls @ 4535:d2a1647fd2ca stable-1.0
Updated OpenSSL and PCRE used for win32 builds.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 15 Mar 2012 11:46:29 +0000 |
parents | f872a86a655c |
children |
rev | line source |
---|---|
450 | 1 X:stylesheet { |
2 | |
4048
f872a86a655c
CHANGES conversion from KOI8-R to UTF-8.
Igor Sysoev <igor@sysoev.ru>
parents:
4047
diff
changeset
|
3 X:output method="text"; |
450 | 4 |
5 X:param lang="'en'"; | |
6 X:param configuration="'../xml/change_log_conf.xml'"; | |
7 | |
8 X:var conf = "document($configuration)/configuration"; | |
9 X:var start = "$conf/start"; | |
10 X:var indent = "$conf/indent"; | |
11 X:var max = "$conf/length"; | |
12 X:var br = {<br>} | |
13 | |
14 | |
15 X:template = "/" { !! "change_log"; } | |
16 X:template = "change_log" { !! "changes"; } | |
17 | |
18 | |
19 X:template = "changes" { | |
20 X:text { } | |
21 | |
22 !{substring(concat($conf/changes[@lang=$lang]/title, | |
23 //change_log/@title, | |
24 ' ', @ver, | |
25 ' '), | |
26 1, $conf/changes[@lang=$lang]/length)} | |
27 | |
28 X:if "$lang='ru'" { !{@date} } | |
29 | |
30 X:if "$lang='en'" { | |
31 !{substring(@date, 1, 2)} | |
32 !{$conf/changes[@lang=$lang]/month[number(substring(current()/@date, | |
33 4, 2))]} | |
34 !{substring(@date, 7, 4)} | |
35 } | |
36 | |
37 X:text { } | |
38 | |
39 !! "change"; | |
40 | |
41 X:text { } | |
42 } | |
43 | |
44 | |
45 X:template = "change" { | |
46 X:var prefix = "$conf/changes[@lang=$lang]/*[local-name(.)=current()/@type]" | |
47 | |
48 X:var postfix = { X:if "$prefix" { X:text {: } } } | |
49 | |
50 !! "para[@lang=$lang]" (prefix = "concat($start, $prefix, $postfix)"); | |
51 } | |
52 | |
53 | |
54 X:template para(prefix) = "para" { | |
55 X:var text = { !!; } | |
56 | |
57 X:text { } | |
58 | |
59 !wrap(text = "normalize-space($text)", | |
60 prefix = { X:if "position() = 1" { !{$prefix} } else { !{$indent} } }) | |
61 } | |
62 | |
63 | |
64 X:template wrap(text, prefix) { | |
65 X:if "$text" { | |
66 X:var offset = { | |
4047
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
67 X:choose { |
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
68 X:when "starts-with($text, concat($br, ' '))" { |
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
69 !{string-length($br) + 2} |
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
70 } |
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
71 X:when "starts-with($text, $br)" { |
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
72 !{string-length($br) + 1} |
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
73 } |
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
74 X:otherwise { |
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
75 1 |
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
76 } |
450 | 77 } |
78 } | |
79 | |
80 X:var length = { | |
81 !length(text = "substring($text, $offset)", | |
82 prefix = "string-length($prefix)", | |
83 length = "$max") | |
84 } | |
85 | |
86 !{$prefix} | |
87 | |
4047
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
88 !{normalize-space(translate(substring($text, $offset, $length), |
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
89 ' ', ' '))} |
450 | 90 |
91 X:text { } | |
92 | |
93 !wrap(text = "substring($text, $length + $offset)", prefix = "$indent") | |
94 } | |
95 } | |
96 | |
97 | |
98 X:template length(text, prefix, length) { | |
4047
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
99 X:var break = "substring-before(substring($text, 1, |
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
100 $length - $prefix + string-length($br)), |
450 | 101 $br)" |
102 | |
103 X:choose { | |
104 X:when "$break" { !{string-length($break)} } | |
105 | |
4047
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
106 X:when "$length = 0" { !{$max - $prefix} } |
450 | 107 |
4047
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
108 X:when "string-length($text) + $prefix <= $length" { |
450 | 109 !{$length - $prefix} |
110 } | |
111 | |
4047
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
112 X:when "substring($text, $length - $prefix + 1, 1) = ' '" { |
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
113 !{$length - $prefix + 1} |
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
114 } |
3e706fcccbf3
Merge of r3996, r3998, r4015, r4023, r4025, r4026, r4027:
Igor Sysoev <igor@sysoev.ru>
parents:
450
diff
changeset
|
115 |
450 | 116 X:otherwise { |
117 !length(text = "$text", prefix = "$prefix", length = "$length - 1") | |
118 } | |
119 } | |
120 } | |
121 | |
122 | |
123 X:template = "at" {@} | |
124 X:template = "br" { !{$br} } | |
125 X:template = "nobr" { !{translate(., ' ', ' ')} } | |
126 | |
127 | |
128 } |