annotate xml/en/docs/http/ngx_http_xslt_module.xml @ 377:e72701967099

English translation of ngx_http_xslt_module.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 30 Jan 2012 12:11:46 +0000
parents
children dd9fec875834
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
377
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1 <?xml version="1.0"?>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
4
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
5 <module name="Module ngx_http_xslt_module"
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
6 link="/en/docs/http/ngx_http_xslt_module.html"
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
7 lang="en">
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
9 <section id="summary">
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
10
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
11 <para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
12 The <literal>ngx_http_xslt_module</literal> (0.7.8+) is a filter
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
13 that transforms XML responses using one or more XSLT stylesheets.
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14 </para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16 <para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
17 This module is not built by default, it should be enabled with the
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
18 <literal>--with-http_xslt_module</literal>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
19 configuration parameter.
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
20 <note>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
21 This module requires the
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22 <link url="http://www.xmlsoft.org">libxml2 and libxslt</link> libraries.
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23 </note>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
24 </para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
26 </section>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29 <section id="example" name="Example Configuration">
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
30
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
31 <para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
32 <example>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
33 location / {
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
34 xml_entities /site/dtd/entities.dtd;
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
35 xslt_stylesheet /site/xslt/one.xslt param=value;
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
36 xslt_stylesheet /site/xslt/two.xslt;
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
37 }
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
38 </example>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39 </para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
41 </section>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
42
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
43
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
44 <section id="directives" name="Directives">
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
45
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
46 <directive name="xml_entities">
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
47 <syntax><value>path</value></syntax>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
48 <default/>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
49 <context>http</context>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
50 <context>server</context>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
51 <context>location</context>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
52
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
53 <para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
54 Specifies the DTD file that declares character entities.
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
55 This file is compiled during the configuration stage.
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
56 For technical reasons the module is unable to use the
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
57 external subset declared in the processed XML, so it is
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
58 ignored and instead a specially defined file is used.
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
59 This file should not describe the XML structure, it is
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
60 enough to only declare the required character entities, for example:
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
61 <example>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
62 &lt;!ENTITY nbsp "&amp;#xa0;"&gt;
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
63 </example>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
64 </para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
65
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
66 </directive>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
67
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
68
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
69 <directive name="xslt_stylesheet">
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
70 <syntax>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
71 <value>stylesheet</value>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
72 [<value>parameter</value>=<value>value</value> ...]</syntax>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
73 <default/>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
74 <context>location</context>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
75
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
76 <para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
77 Defines the XSLT stylesheet and its optional parameters.
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
78 A stylesheet is compiled during the configuration stage.
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
79 </para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
80
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
81 <para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
82 Parameters can either be specified separately, or grouped in a
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
83 single line using the “<literal>:</literal>” delimiter.
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
84 If a parameter includes the “<literal>:</literal>” character,
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
85 it should be escaped as “<literal>%3A</literal>”.
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
86 Also, <command>libxslt</command> requires to enclose parameters
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
87 that contain non-alphanumeric characters into single or double quotes,
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
88 for example:
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
89 <example>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
90 param1='http%3A//www.example.com':param2=value2
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
91 </example>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
92 </para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
93
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
94 <para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
95 The description of parameters can contain variables, for example,
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
96 the whole line of parameters can be taken from a single variable:
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
97 <example>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
98 location / {
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
99 xslt_stylesheet /site/xslt/one.xslt
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
100 $arg_xslt_params
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
101 param1='$value1':param2=value2
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
102 param3=value3;
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
103 }
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
104 </example>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
105 </para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
106
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
107 <para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
108 It is possible to specify several stylesheets; in this case they
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
109 will be applied sequentially in the specified order.
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
110 </para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
111
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
112 </directive>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
113
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
114
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
115 <directive name="xslt_types">
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
116 <syntax><value>mime-type</value> ...</syntax>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
117 <default>text/xml</default>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
118 <context>http</context>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
119 <context>server</context>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
120 <context>location</context>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
121
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
122 <para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
123 Enables transformations in responses with the specified MIME types
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
124 in addition to “<literal>text/xml</literal>”.
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
125 If the result of transformation is an HTML response, its MIME type
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
126 is changes to “<literal>text/html</literal>”.
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
127 </para>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
128
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
129 </directive>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
130
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
131 </section>
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
132
e72701967099 English translation of ngx_http_xslt_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
133 </module>