#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_xxslt_parse_data_t |
| XXSLT data structure. More... | |
| struct | ngx_http_xxslt_include_s |
| Include data structure. More... | |
Defines | |
| #define | PARSE_GENERAL_ERR 1 |
| #define | PARSE_STYLESHEET_ERR 2 |
| #define | PARSE_NO_STYLESHEETS 3 |
| #define | PARSE_XML 11 |
| #define | PARSE_XSL 12 |
| #define | PARSE_UNKNOWN 13 |
| #define | ERR_CONTINUE 0 |
| #define | ERR_FAIL 1 |
| #define | PARSE_DUMMY_NODE "as123hazx12xz12" |
Typedefs | |
| typedef struct ngx_http_xxslt_include_s | ngx_http_xxslt_include_t |
Functions | |
| ngx_http_xxslt_parse_data_t * | ngx_http_xxslt_parse_create_new (ngx_http_request_t *r) |
| Creates new parse data context structure. | |
| ngx_int_t | ngx_http_xxslt_parse_add_data_chunk (ngx_http_xxslt_parse_data_t *data, ngx_chain_t *in) |
| Parses a chunk of parse (xslt) data using libxml functions. | |
| ngx_int_t | ngx_http_xxslt_parse_apply (ngx_http_xxslt_parse_data_t *data) |
| Applies parsed xslt directives to the XML document containing all downloaded includes. | |
| void | ngx_http_xxslt_parse_cleanup (ngx_http_xxslt_parse_data_t *parse_data) |
| Cleanups parse data context. | |
Variables | |
| ngx_module_t | ngx_http_xxslt_filter_module |
| Nginx module settings. | |
| #define ERR_CONTINUE 0 |
Definition at line 48 of file ngx_http_xxslt_parse.h.
Referenced by ngx_http_xxslt_parse_include_node().
| #define ERR_FAIL 1 |
Definition at line 49 of file ngx_http_xxslt_parse.h.
Referenced by ngx_http_xxslt_parse_include_node(), and ngx_http_xxslt_parse_process_include().
| #define PARSE_DUMMY_NODE "as123hazx12xz12" |
Definition at line 51 of file ngx_http_xxslt_parse.h.
Referenced by ngx_http_xxslt_parse_get_prefix(), ngx_http_xxslt_parse_get_suffix(), ngx_http_xxslt_parse_sax_end_element(), and ngx_http_xxslt_parse_sax_start_element().
| #define PARSE_GENERAL_ERR 1 |
Definition at line 40 of file ngx_http_xxslt_parse.h.
| #define PARSE_NO_STYLESHEETS 3 |
Definition at line 42 of file ngx_http_xxslt_parse.h.
| #define PARSE_STYLESHEET_ERR 2 |
Definition at line 41 of file ngx_http_xxslt_parse.h.
| #define PARSE_UNKNOWN 13 |
Definition at line 46 of file ngx_http_xxslt_parse.h.
Referenced by ngx_http_xxslt_parse_include_node().
| #define PARSE_XML 11 |
Definition at line 44 of file ngx_http_xxslt_parse.h.
Referenced by ngx_http_xxslt_parse_add_include(), and ngx_http_xxslt_parse_include_node().
| #define PARSE_XSL 12 |
Definition at line 45 of file ngx_http_xxslt_parse.h.
| typedef struct ngx_http_xxslt_include_s ngx_http_xxslt_include_t |
Definition at line 55 of file ngx_http_xxslt_parse.h.
| ngx_int_t ngx_http_xxslt_parse_add_data_chunk | ( | ngx_http_xxslt_parse_data_t * | parse_data, | |
| ngx_chain_t * | in | |||
| ) |
Parses a chunk of parse (xslt) data using libxml functions.
When a include node is found, proper callback function of SAX handler will handle it and begin reading from disk or enqueue download.
| parse_data | parse data context structure | |
| in | nginx chain structure |
Definition at line 203 of file ngx_http_xxslt_parse.c.
References ngx_http_xxslt_parse_data_t::ctxt, ngx_http_xxslt_parse_data_t::dl_in_progress, ngx_http_xxslt_parse_data_t::doc, ngx_http_xxslt_parse_data_t::done, ngx_http_xxslt_parse_data_t::include_err, ngx_http_xxslt_parse_data_t::include_err_msg, ngx_http_xxslt_parse_data_t::libxml_error, ngx_http_xxslt_finalize_with_error(), ngx_http_xxslt_parse_get_prefix(), ngx_http_xxslt_parse_get_suffix(), ngx_http_xxslt_parse_data_t::preffix_added, ngx_http_xxslt_parse_data_t::r, ngx_http_xxslt_parse_data_t::stylesheet, ngx_http_xxslt_parse_data_t::stylesheet_declared, and ngx_http_xxslt_parse_data_t::xslt_ready.
Referenced by ngx_http_xxslt_selector_add_parse().
| ngx_int_t ngx_http_xxslt_parse_apply | ( | ngx_http_xxslt_parse_data_t * | parse_data | ) |
Applies parsed xslt directives to the XML document containing all downloaded includes.
| parse_data | parse data context structure |
Definition at line 347 of file ngx_http_xxslt_parse.c.
References ngx_http_xxslt_parse_data_t::includes, ngx_http_xxslt_finalize_with_error(), ngx_http_xxslt_parse_add_buffer_chain(), ngx_http_xxslt_parse_data_t::r, and ngx_http_xxslt_parse_data_t::stylesheet.
Referenced by ngx_http_xxslt_process_data().
| void ngx_http_xxslt_parse_cleanup | ( | ngx_http_xxslt_parse_data_t * | parse_data | ) |
Cleanups parse data context.
Terminate all remaining downloads or mxcache connections.
| parse_data | parse data context structure |
Definition at line 972 of file ngx_http_xxslt_parse.c.
References ngx_http_download_cleanup(), ngx_http_mxcache_cleanup(), and ngx_http_xxslt_parse_data_t::r.
Referenced by ngx_http_xxslt_cleanup().
| ngx_http_xxslt_parse_data_t* ngx_http_xxslt_parse_create_new | ( | ngx_http_request_t * | r | ) |
Creates new parse data context structure.
| r | nginx http request |
Definition at line 118 of file ngx_http_xxslt_parse.c.
References ngx_http_xxslt_parse_data_t::ctxt, ngx_http_xxslt_parse_sax_attribute_decl(), ngx_http_xxslt_parse_sax_cdata_block(), ngx_http_xxslt_parse_sax_characters(), ngx_http_xxslt_parse_sax_comment(), ngx_http_xxslt_parse_sax_element_decl(), ngx_http_xxslt_parse_sax_end_document(), ngx_http_xxslt_parse_sax_end_element(), ngx_http_xxslt_parse_sax_entity_decl(), ngx_http_xxslt_parse_sax_error(), ngx_http_xxslt_parse_sax_external_subset(), ngx_http_xxslt_parse_sax_get_entity(), ngx_http_xxslt_parse_sax_get_parameter_entity(), ngx_http_xxslt_parse_sax_has_external_subset(), ngx_http_xxslt_parse_sax_has_internal_subset(), ngx_http_xxslt_parse_sax_internal_subset(), ngx_http_xxslt_parse_sax_is_standalone(), ngx_http_xxslt_parse_sax_notation_decl(), ngx_http_xxslt_parse_sax_processing_instruction(), ngx_http_xxslt_parse_sax_reference(), ngx_http_xxslt_parse_sax_resolve_entity(), ngx_http_xxslt_parse_sax_start_document(), ngx_http_xxslt_parse_sax_start_element(), ngx_http_xxslt_parse_sax_unparsed_entity_decl(), ngx_http_xxslt_parse_data_t::r, and ngx_http_xxslt_parse_data_t::sax.
Referenced by ngx_http_xxslt_selector_add_parse().
| ngx_module_t ngx_http_xxslt_filter_module |
Nginx module settings.
Definition at line 115 of file ngx_http_xxslt_filter_module.c.
Referenced by ngx_http_xxslt_body_filter(), ngx_http_xxslt_enqueue_data(), ngx_http_xxslt_finalize(), ngx_http_xxslt_header_filter(), ngx_http_xxslt_parse_include_node(), ngx_http_xxslt_process_data(), and ngx_http_xxslt_send().
1.6.1