#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxslt/xsltInternals.h>
#include <libxslt/transform.h>
#include <libxslt/xsltutils.h>
#include <libxslt/xslt.h>
#include <download/ngx_http_download_module.h>
#include <download/ngx_http_filesync.h>
#include <mxcache/ngx_http_mxcache_module.h>
Go to the source code of this file.
Data Structures | |
struct | ngx_http_xslt2_xml_data_t |
XML data structure. More... | |
struct | ngx_http_xslt2_sheet_s |
Stylesheet data structure. More... | |
Defines | |
#define | XML_GENERAL_ERR 1 |
#define | XML_STYLESHEET_ERR 2 |
#define | XML_NO_STYLESHEETS 3 |
Typedefs | |
typedef struct ngx_http_xslt2_sheet_s | ngx_http_xslt2_sheet_t |
Functions | |
ngx_http_xslt2_xml_data_t * | ngx_http_xslt2_xml_create_new () |
ngx_int_t | ngx_http_xslt2_xml_add_data_chunk (ngx_http_xslt2_xml_data_t *xml_data, ngx_chain_t *in) |
Parses a chunk of xml data using libxml functions. | |
void | ngx_http_xslt2_xml_cleanup (ngx_http_xslt2_xml_data_t *xml_data) |
Cleanups xml data context. |
#define XML_GENERAL_ERR 1 |
Definition at line 41 of file ngx_http_xslt2_xml.h.
#define XML_NO_STYLESHEETS 3 |
Definition at line 43 of file ngx_http_xslt2_xml.h.
#define XML_STYLESHEET_ERR 2 |
Definition at line 42 of file ngx_http_xslt2_xml.h.
typedef struct ngx_http_xslt2_sheet_s ngx_http_xslt2_sheet_t |
Definition at line 46 of file ngx_http_xslt2_xml.h.
ngx_int_t ngx_http_xslt2_xml_add_data_chunk | ( | ngx_http_xslt2_xml_data_t * | xml_data, | |
ngx_chain_t * | in | |||
) |
Parses a chunk of xml data using libxml functions.
When style sheet declaration is found, proper callback function of SAX handler will handle it and begin reading from disk or enqueue download.
xml_data | xml data context structure | |
in | nginx chain structure |
Definition at line 184 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, ngx_http_xslt2_xml_data_t::doc, ngx_http_xslt2_xml_data_t::libxml_error, ngx_http_xslt2_finalize_with_error(), ngx_http_xslt2_xml_apply_stylesheets(), ngx_http_xslt2_xml_return_original(), ngx_http_xslt2_xml_data_t::r, ngx_http_xslt2_xml_data_t::sheets, ngx_http_xslt2_xml_data_t::stylesheet_err, ngx_http_xslt2_xml_data_t::stylesheet_err_msg, and ngx_http_xslt2_xml_data_t::xml_ready.
Referenced by ngx_http_xslt2_body_filter().
void ngx_http_xslt2_xml_cleanup | ( | ngx_http_xslt2_xml_data_t * | xml_data | ) |
Cleanups xml data context.
Terminate all remaining downloads or mxcache connections.
xml_data | xml data context structure |
Definition at line 338 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, ngx_http_xslt2_xml_data_t::doc, ngx_http_xslt2_sheet_s::download, ngx_http_xslt2_sheet_s::next, ngx_http_download_cleanup(), ngx_http_mxcache_cleanup(), ngx_http_xslt2_xml_data_t::sheets, ngx_http_xslt2_sheet_s::stylesheet, and ngx_http_xslt2_sheet_s::xcache_get.
Referenced by ngx_http_xslt2_cleanup().
ngx_http_xslt2_xml_data_t* ngx_http_xslt2_xml_create_new | ( | ) |