Mercurial > hg > nginx-site
comparison 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 |
comparison
equal
deleted
inserted
replaced
103:b2e9c172a156 | 104:3ae68fe2e938 |
---|---|
2 | 2 |
3 X:template = "directive" { | 3 X:template = "directive" { |
4 <a name="{@name}"/> | 4 <a name="{@name}"/> |
5 <!-- <center><h4> !{@name} </h4></center> --> | 5 <!-- <center><h4> !{@name} </h4></center> --> |
6 <div class="directive"> | 6 <div class="directive"> |
7 <table cellspacing="0"> | |
7 !! "syntax"; | 8 !! "syntax"; |
8 !! "default"; | 9 !! "default"; |
9 !! "context"; | 10 !! "context"; |
11 </table> | |
10 X:if "(@appeared-in)" { | 12 X:if "(@appeared-in)" { |
11 <strong>appeared in version</strong>: !{@appeared-in} | 13 <p>This directive appeared in version !{@appeared-in}.</p> |
12 } | 14 } |
13 </div> | 15 </div> |
14 !! "para"; | 16 !! "para"; |
15 } | 17 } |
16 | 18 |
17 X:template = "syntax" { | 19 X:template = "syntax" { |
18 X:if "position() = 1" { | 20 X:if "position() = 1" { |
19 <strong>syntax</strong>: | 21 X:text disable-output-escaping="yes" { |
20 } else { | 22 <tr valign="top"> |
21 <code>       </code> | 23 <td> |
24 } | |
25 <strong> | |
26 !{document(concat($XML, '/i18n.xml')) | |
27 /i18n/text[@lang = $LANG]/item[@id='syntax']} | |
28 </strong>: | |
29 X:text disable-output-escaping="yes" { | |
30 </td> | |
31 <td> | |
32 } | |
33 <strong>​</strong> | |
22 } | 34 } |
23 <code> | 35 <code> |
24 !{../@name} | 36 !{../@name} |
25 X:if "count(node()) != 0" { | 37 X:if "count(node()) != 0" { |
26 X:text{ } !!; | 38 X:text{ } !!; |
27 } | 39 } |
28 </code> | 40 </code> |
29 <br/> | 41 <br/> |
42 X:if "position() = last()" { | |
43 X:text disable-output-escaping="yes" { | |
44 </td> | |
45 </tr> | |
46 } | |
47 } | |
30 } | 48 } |
31 | 49 |
32 X:template = "default" { | 50 X:template = "default" { |
33 X:if "position() = 1" { | 51 X:if "position() = 1" { |
34 <strong>default</strong>: | 52 X:text disable-output-escaping="yes" { |
53 <tr valign="top"> | |
54 <td> | |
55 } | |
56 <strong> | |
57 !{document(concat($XML, '/i18n.xml')) | |
58 /i18n/text[@lang = $LANG]/item[@id='default']} | |
59 </strong>: | |
60 X:text disable-output-escaping="yes" { | |
61 </td> | |
62 <td> | |
63 } | |
35 } | 64 } |
36 X:if "count(node()) = 0" { | 65 X:if "count(node()) = 0" { |
37 <strong> | 66 <strong> |
38 !{document(concat($XML, '/i18n.xml')) | 67 !{document(concat($XML, '/i18n.xml')) |
39 /i18n/text[@lang = $LANG]/item[@id='none']} | 68 /i18n/text[@lang = $LANG]/item[@id='none']} |
40 </strong> | 69 </strong> |
41 } else { | 70 } else { |
71 <strong>​</strong> | |
42 <code> !{../@name} X:text{ } !!; </code> | 72 <code> !{../@name} X:text{ } !!; </code> |
43 } | 73 } |
44 <br/> | 74 <br/> |
75 X:if "position() = last()" { | |
76 X:text disable-output-escaping="yes" { | |
77 </td> | |
78 </tr> | |
79 } | |
80 } | |
45 } | 81 } |
46 | 82 |
47 X:template = "context" { | 83 X:template = "context" { |
48 X:if "position() = 1" { | 84 X:if "position() = 1" { |
49 <strong>context</strong>: | 85 X:text disable-output-escaping="yes" { |
86 <tr valign="top"> | |
87 <td> | |
88 } | |
89 <strong> | |
90 !{document(concat($XML, '/i18n.xml')) | |
91 /i18n/text[@lang = $LANG]/item[@id='context']} | |
92 </strong>: | |
93 X:text disable-output-escaping="yes" { | |
94 </td> | |
95 <td> | |
96 } | |
97 <strong>​</strong> | |
50 } | 98 } |
51 X:if "count(text()) = 0" { | 99 X:if "count(node()) = 0" { |
52 <strong>any</strong> | 100 <strong> |
101 !{document(concat($XML, '/i18n.xml')) | |
102 /i18n/text[@lang = $LANG]/item[@id='context.any']} | |
103 </strong> | |
53 } else { | 104 } else { |
54 <code> !!; </code> | 105 <code> !!; </code> |
55 } | 106 } |
56 X:if "position() != last()" { | 107 X:if "position() != last()" { |
57 X:text{, } | 108 X:text{, } |
58 } else { | 109 } else { |
59 <br/> | 110 <br/> |
111 X:text disable-output-escaping="yes" { | |
112 </td> | |
113 </tr> | |
114 } | |
60 } | 115 } |
61 } | 116 } |
62 | 117 |
63 } | 118 } |