Mercurial > hg > nginx-site
annotate xsls/directive.xsls @ 160:0b65e87daa8a
Documented that filename extensions that map to MIME types are
case-insensitive.
Provided an example of how to map several extensions to one type.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 31 Oct 2011 09:36:17 +0000 |
parents | 273d7407de69 |
children | 28ba010fce96 |
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" { |
112
d3e240f7157c
Inside the "directive" prologue block, addressed the vertical
Ruslan Ermilov <ru@nginx.com>
parents:
108
diff
changeset
|
22 <tr> |
104
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 } |
22 | 33 } |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
34 <code> |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
35 !{../@name} |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
36 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
|
37 X:text{ } !!; |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
38 } |
108
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
104
diff
changeset
|
39 X:if "@block = 'yes'" { |
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
104
diff
changeset
|
40 X:text{ \{ ... \}} |
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
104
diff
changeset
|
41 } else { |
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
104
diff
changeset
|
42 X:text{;} |
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
104
diff
changeset
|
43 } |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
44 </code> |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
45 <br/> |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
46 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
|
47 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
|
48 </td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
49 </tr> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
50 } |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
51 } |
22 | 52 } |
53 | |
54 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
|
55 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
|
56 X:text disable-output-escaping="yes" { |
112
d3e240f7157c
Inside the "directive" prologue block, addressed the vertical
Ruslan Ermilov <ru@nginx.com>
parents:
108
diff
changeset
|
57 <tr> |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
58 <td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
59 } |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
60 <strong> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
61 !{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
|
62 /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
|
63 </strong>: |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
64 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
|
65 </td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
66 <td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
67 } |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
68 } |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
69 X:if "count(node()) = 0" { |
144
273d7407de69
Replaced special "no default" value in the directive/default with "mdash".
Ruslan Ermilov <ru@nginx.com>
parents:
112
diff
changeset
|
70 — |
22 | 71 } else { |
112
d3e240f7157c
Inside the "directive" prologue block, addressed the vertical
Ruslan Ermilov <ru@nginx.com>
parents:
108
diff
changeset
|
72 <pre> |
108
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
104
diff
changeset
|
73 !{../@name} |
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
104
diff
changeset
|
74 X:if "count(../syntax[@block='yes'])" { |
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
104
diff
changeset
|
75 X:text{ \{} !!; X:text{\}} |
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
104
diff
changeset
|
76 } else { |
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
104
diff
changeset
|
77 X:text{ } !!; X:text{;} |
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
104
diff
changeset
|
78 } |
112
d3e240f7157c
Inside the "directive" prologue block, addressed the vertical
Ruslan Ermilov <ru@nginx.com>
parents:
108
diff
changeset
|
79 </pre> |
22 | 80 } |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
81 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
|
82 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
|
83 </td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
84 </tr> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
85 } |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
86 } |
22 | 87 } |
88 | |
89 X:template = "context" { | |
90 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
|
91 X:text disable-output-escaping="yes" { |
112
d3e240f7157c
Inside the "directive" prologue block, addressed the vertical
Ruslan Ermilov <ru@nginx.com>
parents:
108
diff
changeset
|
92 <tr> |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
93 <td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
94 } |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
95 <strong> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
96 !{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
|
97 /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
|
98 </strong>: |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
99 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
|
100 </td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
101 <td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
102 } |
22 | 103 } |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
104 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
|
105 <strong> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
106 !{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
|
107 /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
|
108 </strong> |
22 | 109 } else { |
110 <code> !!; </code> | |
111 } | |
112 X:if "position() != last()" { | |
113 X:text{, } | |
114 } else { | |
115 <br/> | |
104
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
116 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
|
117 </td> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
118 </tr> |
3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
119 } |
22 | 120 } |
121 } | |
122 | |
123 } |