Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_xslt_module.xml @ 2841:55a573521ac3
Linux packages: added Ubuntu 22.04 "jammy".
author | Konstantin Pavlov <thresh@nginx.com> |
---|---|
date | Fri, 29 Apr 2022 21:36:07 +0400 |
parents | eeed494bba51 |
children |
rev | line source |
---|---|
222
bfe3eff81d04
Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
1 <?xml version="1.0"?> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
564
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
564
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
564
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
564
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
564
diff
changeset
|
7 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
9 |
376 | 10 <module name="Модуль ngx_http_xslt_module" |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
11 link="/ru/docs/http/ngx_http_xslt_module.html" |
589 | 12 lang="ru" |
2593
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
13 rev="3"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
14 |
110
40eec261c2a6
Added proper support for anonymous sections, notably for the summary.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
15 <section id="summary"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
16 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
17 <para> |
376 | 18 Модуль <literal>ngx_http_xslt_module</literal> (0.7.8+) — это фильтр, |
19 преобразующий XML-ответ с помощью одного или нескольких XSLT-шаблонов. | |
20 </para> | |
21 | |
22 <para> | |
23 По умолчанию этот модуль не собирается, его сборку необходимо | |
24 разрешить с помощью конфигурационного параметра | |
25 <literal>--with-http_xslt_module</literal>. | |
26 <note> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
27 Для сборки и работы этого модуля нужны библиотеки |
564
624ac281c628
Separate links to libxml2 and libxslt.
Ruslan Ermilov <ru@nginx.com>
parents:
546
diff
changeset
|
28 <link url="http://xmlsoft.org">libxml2</link> и |
624ac281c628
Separate links to libxml2 and libxslt.
Ruslan Ermilov <ru@nginx.com>
parents:
546
diff
changeset
|
29 <link url="http://xmlsoft.org/XSLT/">libxslt</link>. |
376 | 30 </note> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
31 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
32 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
33 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
34 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
35 |
376 | 36 <section id="example" name="Пример конфигурации"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
37 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
38 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
39 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
40 location / { |
376 | 41 xml_entities /site/dtd/entities.dtd; |
42 xslt_stylesheet /site/xslt/one.xslt param=value; | |
43 xslt_stylesheet /site/xslt/two.xslt; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
44 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
45 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
46 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
47 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
48 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
49 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
50 |
376 | 51 <section id="directives" name="Директивы"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
52 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
53 <directive name="xml_entities"> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
54 <syntax><value>путь</value></syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
76
diff
changeset
|
55 <default/> |
376 | 56 <context>http</context> |
57 <context>server</context> | |
58 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
59 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
60 <para> |
376 | 61 Задаёт файл DTD, в котором описаны символьные сущности. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
62 Этот файл компилируется на стадии конфигурации. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
63 По техническим причинам модуль не имеет возможности |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
64 использовать внешнее подмножество, заданное в обрабатываемом XML, |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
65 поэтому оно игнорируется, а вместо него используется специально заданный файл. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
66 В этом файле не нужно описывать структуру XML, достаточно только объявления |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
67 необходимых символьных сущностей, например: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
68 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
69 <!ENTITY nbsp "&#xa0;"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
70 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
71 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
72 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
73 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
74 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
75 |
920
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
76 <directive name="xslt_last_modified"> |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
77 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
78 <default>off</default> |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
79 <context>http</context> |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
80 <context>server</context> |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
81 <context>location</context> |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
82 <appeared-in>1.5.1</appeared-in> |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
83 |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
84 <para> |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
85 Позволяет сохранить поле заголовка <header>Last-Modified</header> |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
86 исходного ответа во время XSLT-преобразований |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
87 для лучшего кэширования ответов. |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
88 </para> |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
89 |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
90 <para> |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
91 По умолчанию поле заголовка удаляется, так как содержимое ответа |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
92 изменяется во время преобразования и может содержать динамически созданные |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
93 элементы или части, которые изменились независимо от исходного ответа. |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
94 </para> |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
95 |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
96 </directive> |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
97 |
7afb12159c1d
Translated documentation on ssi/sub_filter/xslt_last_modified into Russian.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
98 |
463
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
99 <directive name="xslt_param"> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
100 <syntax><value>параметр</value> <value>значение</value></syntax> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
101 <default/> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
102 <context>http</context> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
103 <context>server</context> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
104 <context>location</context> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
105 <appeared-in>1.1.18</appeared-in> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
106 |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
107 <para> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
108 Задаёт параметры для XSLT-шаблонов. |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
109 Значение рассматривается как выражение XPath. |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
110 В значении можно использовать переменные. |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
111 Если нужно передать в шаблон строковое значение, |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
112 можно воспользоваться директивой <link id="xslt_string_param"/>. |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
113 </para> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
114 |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
115 <para> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
116 Директив <literal>xslt_param</literal> может быть несколько. |
2593
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
117 Директивы наследуются с предыдущего уровня конфигурации при условии, что |
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
118 на данном уровне не описаны свои директивы <literal>xslt_param</literal> |
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
119 и <link id="xslt_string_param"/>. |
463
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
120 </para> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
121 |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
122 </directive> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
123 |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
124 |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
125 <directive name="xslt_string_param"> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
126 <syntax><value>параметр</value> <value>значение</value></syntax> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
127 <default/> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
128 <context>http</context> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
129 <context>server</context> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
130 <context>location</context> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
131 <appeared-in>1.1.18</appeared-in> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
132 |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
133 <para> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
134 Задаёт строковые параметры для XSLT-шаблонов. |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
135 Выражения XPath в значении параметра не интерпретируются. |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
136 В значении можно использовать переменные. |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
137 </para> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
138 |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
139 <para> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
140 Директив <literal>xslt_string_param</literal> может быть несколько. |
2593
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
141 Директивы наследуются с предыдущего уровня конфигурации при условии, что |
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
142 на данном уровне не описаны свои директивы <link id="xslt_param"/> |
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
143 и <literal>xslt_string_param</literal>. |
463
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
144 </para> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
145 |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
146 </directive> |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
147 |
dd9fec875834
Documented new directives: xslt_param and xslt_string_param.
Ruslan Ermilov <ru@nginx.com>
parents:
376
diff
changeset
|
148 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
149 <directive name="xslt_stylesheet"> |
376 | 150 <syntax> |
151 <value>шаблон</value> | |
152 [<value>параметр</value>=<value>значение</value> ...]</syntax> | |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
76
diff
changeset
|
153 <default/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
154 <context>location</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
155 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
156 <para> |
376 | 157 Задаёт XSLT-шаблон и необязательные параметры для этого шаблона. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
158 Шаблон компилируется на стадии конфигурации. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
159 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
160 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
161 <para> |
376 | 162 Параметры можно задавать как по отдельности, так и группировать |
163 в одной строке, разделяя символом “<literal>:</literal>”. | |
164 Если же в самих параметрах встречается символ “<literal>:</literal>”, | |
165 то его нужно экранировать в виде “<literal>%3A</literal>”. | |
966 | 166 Кроме того, <command>libxslt</command> требует, |
376 | 167 чтобы параметры, содержащие не только алфавитно-цифровые символы, |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
168 были заключены в одинарные или двойные кавычки, например: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
169 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
170 param1='http%3A//www.example.com':param2=value2 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
171 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
172 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
173 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
174 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
175 В описании параметров можно использовать переменные, например, |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
176 целая строка параметров может быть взята из одной переменной: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
177 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
178 location / { |
376 | 179 xslt_stylesheet /site/xslt/one.xslt |
180 $arg_xslt_params | |
181 param1='$value1':param2=value2 | |
182 param3=value3; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
183 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
184 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
185 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
186 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
187 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
188 Можно указать несколько шаблонов — в этом случае они |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
189 будут применяться последовательно в порядке их описания. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
190 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
191 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
192 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
193 |
376 | 194 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
195 <directive name="xslt_types"> |
271 | 196 <syntax><value>mime-тип</value> ...</syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
197 <default>text/xml</default> |
376 | 198 <context>http</context> |
199 <context>server</context> | |
200 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
201 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
202 <para> |
376 | 203 Разрешает преобразования в ответах с указанными MIME-типами |
204 в дополнение к “<literal>text/xml</literal>”. | |
546
694db9597ee0
Documented the special value "*" in various "*_type" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
463
diff
changeset
|
205 Специальное значение “<literal>*</literal>” соответствует любому MIME-типу |
694db9597ee0
Documented the special value "*" in various "*_type" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
463
diff
changeset
|
206 (0.8.29). |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
207 Если в результате преобразования выдаётся HTML-ответ, то его MIME-тип |
376 | 208 меняется на “<literal>text/html</literal>”. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
209 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
210 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
211 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
212 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
213 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
214 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
215 </module> |