# HG changeset patch # User Ruslan Ermilov # Date 1327925506 0 # Node ID e72701967099fbb94696c43c96643c3de7d9cf36 # Parent a837069db70dcd28e60ad4cfe654fbcbe8b1d486 English translation of ngx_http_xslt_module. diff --git a/xml/en/GNUmakefile b/xml/en/GNUmakefile --- a/xml/en/GNUmakefile +++ b/xml/en/GNUmakefile @@ -76,6 +76,7 @@ REFS = \ http/ngx_http_sub_module \ http/ngx_http_upstream_module \ http/ngx_http_userid_module \ + http/ngx_http_xslt_module \ REFS_XML = $(foreach name, $(REFS), xml/$(DOC_LANG)/docs/$(name).xml) REFS_HTML = $(foreach name, $(REFS), $(OUT)/$(DOC_LANG)/docs/$(name).html) diff --git a/xml/en/docs/http/ngx_http_xslt_module.xml b/xml/en/docs/http/ngx_http_xslt_module.xml new file mode 100644 --- /dev/null +++ b/xml/en/docs/http/ngx_http_xslt_module.xml @@ -0,0 +1,133 @@ + + + + + + +
+ + +The ngx_http_xslt_module (0.7.8+) is a filter +that transforms XML responses using one or more XSLT stylesheets. + + + +This module is not built by default, it should be enabled with the +--with-http_xslt_module +configuration parameter. + +This module requires the +libxml2 and libxslt libraries. + + + +
+ + +
+ + + +location / { + xml_entities /site/dtd/entities.dtd; + xslt_stylesheet /site/xslt/one.xslt param=value; + xslt_stylesheet /site/xslt/two.xslt; +} + + + +
+ + +
+ + +path + +http +server +location + + +Specifies the DTD file that declares character entities. +This file is compiled during the configuration stage. +For technical reasons the module is unable to use the +external subset declared in the processed XML, so it is +ignored and instead a specially defined file is used. +This file should not describe the XML structure, it is +enough to only declare the required character entities, for example: + +<!ENTITY nbsp "&#xa0;"> + + + + + + + + + stylesheet + [parameter=value ...] + +location + + +Defines the XSLT stylesheet and its optional parameters. +A stylesheet is compiled during the configuration stage. + + + +Parameters can either be specified separately, or grouped in a +single line using the “:” delimiter. +If a parameter includes the “:” character, +it should be escaped as “%3A”. +Also, libxslt requires to enclose parameters +that contain non-alphanumeric characters into single or double quotes, +for example: + +param1='http%3A//www.example.com':param2=value2 + + + + +The description of parameters can contain variables, for example, +the whole line of parameters can be taken from a single variable: + +location / { + xslt_stylesheet /site/xslt/one.xslt + $arg_xslt_params + param1='$value1':param2=value2 + param3=value3; +} + + + + +It is possible to specify several stylesheets; in this case they +will be applied sequentially in the specified order. + + + + + + +mime-type ... +text/xml +http +server +location + + +Enables transformations in responses with the specified MIME types +in addition to “text/xml”. +If the result of transformation is an HTML response, its MIME type +is changes to “text/html”. + + + + +
+ +
diff --git a/xml/en/docs/index.xml b/xml/en/docs/index.xml --- a/xml/en/docs/index.xml +++ b/xml/en/docs/index.xml @@ -229,6 +229,11 @@ ngx_http_upstream_module ngx_http_userid_module + + +ngx_http_xslt_module + + diff --git a/xml/en/index.xml b/xml/en/index.xml --- a/xml/en/index.xml +++ b/xml/en/index.xml @@ -67,7 +67,9 @@ load balancing and fault tolerancegzipping, -byte ranges, chunked responses, XSLT, SSI, +byte ranges, chunked responses, +XSLT, +SSI, and image transformation filter. Multiple SSI inclusions within a single page can be processed in