Nginx Module Reference Manual: XSLT module (XSLT)

Source: Internet
Author: User
Keywords NGINX XSLT XSLT Module
Tags compile configuration configure default default value http location nginx

If you want to use these modules, you must specify the relevant compilation parameters at compile time.

This module is a filter that transforms an XML response through an XSLT template.
To use this module, you must specify the following compilation parameters at compile time (0.7.8 version available):

./configure--with-http_xslt_module

Sample configuration:

Location/{xml_entities/site/dtd/entities.dtd; xslt_stylesheet/site/xslt/one.xslt param=value; Xslt_stylesheet/ SITE/XSLT/TWO.XSLT;

Instructions

Xml_entities

Syntax: Xml_entities <path<
Default value: No
Working with fields: HTTP, server, location
Specifies a DTD file (an XML entity) that describes the underlying XML document markup, and cannot specify an entity for the XML being processed for technical reasons, but uses this DTD file, where it is not necessary to specify the structure for the processed XML, just to declare the basic XML document markup. As:

<! ENTITY of nbsp "" <

Xslt_stylesheet

Syntax: xslt_stylesheet template [parameter[[parameter ...]]
Default value: No
Working with fields: HTTP, server, location
Specifies an XSLT template that uses its own parameters, which are specified as follows:

Param=value

You can specify any parameters for each line, use ":" to separate each argument, if the argument itself contains the ":" character, replace it with "%3a," and if you apply single or double quotes when applying string parameters that contain non-numeric and characters, and refer to them as dependent on the libxslt. As:

Param1= ' http%3a//www.example.com ': param2=value2

You can use variables in parameters, and the entity fields of parameters can be replaced with one variable:

Location/{xslt_stylesheet/site/xslt/one.xslt $arg _xslt_params param1= ' $value 1 ': Param2=value2 param3=value3;}

You can specify multiple templates.

Xslt_types

Syntax: Xslt_types mime-type [Mime-type ...]
Default value: Xslt_types by
Working with fields: HTTP, server, location
You can have it handle MIME types other than "by," and if the output mode of XSLT is HTML, then the MIME type of the answer will be modified to "HTML".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.