Mercurial > hg > nginx-site
annotate xsls/directive.xsls @ 104:3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
for "syntax", "default", "context", and "any (context)" strings.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 19 Oct 2011 08:29:21 +0000 |
parents | c76a257f3fd4 |
children | 72524ae53106 |
rev | line source |
---|---|
22 | 1 X:stylesheet { |
2 | |
3 X:template = "directive" { | |
4 <a name="{@name}"/> | |
5 <!-- <center><h4> !{@name} </h4></center> --> | |
6 <div class="directive"> | |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
7 <table cellspacing="0"> |
22 | 8 !! "syntax"; |
9 !! "default"; | |
10 !! "context"; | |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
11 </table> |
22 | 12 X:if "(@appeared-in)" { |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
13 <p>This directive appeared in version !{@appeared-in}.</p> |
22 | 14 } |
15 </div> | |
16 !! "para"; | |
17 } | |
18 | |
19 X:template = "syntax" { | |
20 X:if "position() = 1" { | |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
21 X:text disable-output-escaping="yes" { |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
22 <tr valign="top"> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
23 <td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
24 } |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
25 <strong> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
26 !{document(concat($XML, '/i18n.xml')) |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
27 /i18n/text[@lang = $LANG]/item[@id='syntax']} |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
28 </strong>: |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
29 X:text disable-output-escaping="yes" { |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
30 </td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
31 <td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
32 } |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
33 <strong>​</strong> |
22 | 34 } |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
35 <code> |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
36 !{../@name} |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
37 X:if "count(node()) != 0" { |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
38 X:text{ } !!; |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
39 } |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
40 </code> |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
41 <br/> |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
42 X:if "position() = last()" { |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
43 X:text disable-output-escaping="yes" { |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
44 </td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
45 </tr> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
46 } |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
47 } |
22 | 48 } |
49 | |
50 X:template = "default" { | |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
51 X:if "position() = 1" { |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
52 X:text disable-output-escaping="yes" { |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
53 <tr valign="top"> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
54 <td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
55 } |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
56 <strong> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
57 !{document(concat($XML, '/i18n.xml')) |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
58 /i18n/text[@lang = $LANG]/item[@id='default']} |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
59 </strong>: |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
60 X:text disable-output-escaping="yes" { |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
61 </td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
62 <td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
63 } |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
64 } |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
65 X:if "count(node()) = 0" { |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
22
diff
changeset
|
66 <strong> |
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
22
diff
changeset
|
67 !{document(concat($XML, '/i18n.xml')) |
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
22
diff
changeset
|
68 /i18n/text[@lang = $LANG]/item[@id='none']} |
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
22
diff
changeset
|
69 </strong> |
22 | 70 } else { |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
71 <strong>​</strong> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
72 <code> !{../@name} X:text{ } !!; </code> |
22 | 73 } |
74 <br/> | |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
75 X:if "position() = last()" { |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
76 X:text disable-output-escaping="yes" { |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
77 </td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
78 </tr> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
79 } |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
80 } |
22 | 81 } |
82 | |
83 X:template = "context" { | |
84 X:if "position() = 1" { | |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
85 X:text disable-output-escaping="yes" { |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
86 <tr valign="top"> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
87 <td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
88 } |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
89 <strong> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
90 !{document(concat($XML, '/i18n.xml')) |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
91 /i18n/text[@lang = $LANG]/item[@id='context']} |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
92 </strong>: |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
93 X:text disable-output-escaping="yes" { |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
94 </td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
95 <td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
96 } |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
97 <strong>​</strong> |
22 | 98 } |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
99 X:if "count(node()) = 0" { |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
100 <strong> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
101 !{document(concat($XML, '/i18n.xml')) |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
102 /i18n/text[@lang = $LANG]/item[@id='context.any']} |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
103 </strong> |
22 | 104 } else { |
105 <code> !!; </code> | |
106 } | |
107 X:if "position() != last()" { | |
108 X:text{, } | |
109 } else { | |
110 <br/> | |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
111 X:text disable-output-escaping="yes" { |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
112 </td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
113 </tr> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
114 } |
22 | 115 } |
116 } | |
117 | |
118 } |