#include "ngx_http_xslt2_xml.h"
#include "ngx_http_xslt2_filter_module.h"
Go to the source code of this file.
Functions | |
static ngx_http_xslt2_sheet_t * | ngx_http_xslt2_xml_create_new_stylesheet (ngx_http_xslt2_xml_data_t *xml_data) |
Creates new xsl style sheet context structure. | |
static ngx_int_t | ngx_http_xslt2_xml_return_original (ngx_http_xslt2_xml_data_t *xml_data) |
Returns original content of XML document if no style sheet declaration is found. | |
static ngx_int_t | ngx_http_xslt2_xml_get_local_stylesheet (ngx_http_xslt2_sheet_t *sheet) |
Reads a style sheet from disk. | |
static ngx_int_t | ngx_http_xslt2_xml_get_external_stylesheet (ngx_http_xslt2_sheet_t *sheet) |
Enqueues a new download of style sheet. | |
static void | ngx_http_xslt2_xml_download_handler (ngx_http_download_conn_t *dl_ctx) |
Function called when style sheet download is finished. | |
static ngx_int_t | ngx_http_xslt2_xml_parse_stylesheet (ngx_http_xslt2_sheet_t *sheet) |
Parses style sheet. | |
static ngx_int_t | ngx_http_xslt2_xml_apply_stylesheets (ngx_http_xslt2_xml_data_t *xml_data) |
Tries to apply style sheets connected with XML document. | |
static ngx_int_t | ngx_http_xslt2_xml_get_cached_stylesheet (ngx_http_request_t *r, ngx_http_xslt2_sheet_t *sheet) |
Enqueues cache connection and try to get cached style sheet. | |
static void | ngx_http_xslt2_xml_mxcache_get_handler (ngx_http_mxcache_conn_t *conn) |
Handler called when response from cache is ready. | |
static ngx_int_t | ngx_http_xslt2_xml_set_cached_stylesheet (ngx_http_request_t *r, ngx_http_xslt2_sheet_t *sheet) |
Tries to set style sheet in cache. | |
static void | ngx_http_xslt2_xml_mxcache_set_handler (ngx_http_mxcache_conn_t *conn) |
Called when style sheet is set in cache. | |
static void | ngx_http_xslt2_xml_get_stylesheet (ngx_http_xslt2_sheet_t *sheet, ngx_flag_t use_cache) |
Gets a style sheet. | |
static void | ngx_http_xslt2_xml_stylesheet_node (ngx_http_xslt2_xml_data_t *xml_data, const xmlChar *pidata) |
Parses processing instruction and begins download. | |
static void | ngx_http_xslt2_xml_stylesheet_error (ngx_http_xslt2_xml_data_t *xml_data, char *msg,...) |
Logs error which occurred during style sheet declaration parsing. | |
static void | ngx_http_xslt2_xml_sax_start_document (void *data) |
static void | ngx_http_xslt2_xml_sax_end_document (void *data) |
static void | ngx_http_xslt2_xml_sax_internal_subset (void *data, const xmlChar *name, const xmlChar *externalId, const xmlChar *systemId) |
static void | ngx_http_xslt2_xml_sax_external_subset (void *data, const xmlChar *name, const xmlChar *externalId, const xmlChar *systemId) |
static void | ngx_http_xslt2_xml_sax_entity_decl (void *data, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content) |
static void | ngx_http_xslt2_xml_sax_attribute_decl (void *data, const xmlChar *elem, const xmlChar *fullname, int type, int def, const xmlChar *defaultValue, xmlEnumerationPtr tree) |
static void | ngx_http_xslt2_xml_sax_element_decl (void *data, const xmlChar *name, int type, xmlElementContentPtr content) |
static void | ngx_http_xslt2_xml_sax_notation_decl (void *data, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId) |
static void | ngx_http_xslt2_xml_sax_unparsed_entity_decl (void *data, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName) |
static void | ngx_http_xslt2_xml_sax_start_element (void *data, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI, int nb_namespaces, const xmlChar **namespaces, int nb_attributes, int nb_defaulted, const xmlChar **attributes) |
static void | ngx_http_xslt2_xml_sax_end_element (void *data, const xmlChar *localname ATTRIBUTE_UNUSED, const xmlChar *prefix ATTRIBUTE_UNUSED, const xmlChar *URI ATTRIBUTE_UNUSED) |
static void | ngx_http_xslt2_xml_sax_characters (void *data, const xmlChar *p, int len) |
static void | ngx_http_xslt2_xml_sax_cdata_block (void *data, const xmlChar *p, int len) |
static xmlEntityPtr | ngx_http_xslt2_xml_sax_get_entity (void *data, const xmlChar *name) |
static xmlEntityPtr | ngx_http_xslt2_xml_sax_get_parameter_entity (void *data, const xmlChar *name) |
static xmlParserInputPtr | ngx_http_xslt2_xml_sax_resolve_entity (void *data, const xmlChar *publicId, const xmlChar *systemId) |
static void | ngx_http_xslt2_xml_sax_reference (void *data, const xmlChar *name) |
static void | ngx_http_xslt2_xml_sax_comment (void *data, const xmlChar *value) |
static void | ngx_http_xslt2_xml_sax_processing_instruction (void *data, const xmlChar *target, const xmlChar *pidata) |
XSL style sheet is interpreted as processing instruction. | |
static int | ngx_http_xslt2_xml_sax_is_standalone (void *data) |
static int | ngx_http_xslt2_xml_sax_has_internal_subset (void *data) |
static int | ngx_http_xslt2_xml_sax_has_external_subset (void *data) |
static void ngx_cdecl | ngx_http_xslt2_xml_sax_error (void *data, const char *msg,...) |
ngx_http_xslt2_xml_data_t * | ngx_http_xslt2_xml_create_new (ngx_http_request_t *r) |
Creates new xml data context structure. | |
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. |
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().
static ngx_int_t ngx_http_xslt2_xml_apply_stylesheets | ( | ngx_http_xslt2_xml_data_t * | xml_data | ) | [static] |
Tries to apply style sheets connected with XML document.
XML data context contains a list of style sheets. Each style sheet which is ready is applied to XML data.
xml_data | xml data context structure |
Definition at line 951 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::act_sheet, ngx_http_xslt2_xml_data_t::buffer_chain, ngx_http_xslt2_xml_data_t::doc, ngx_http_xslt2_xml_data_t::done, ngx_http_xslt2_sheet_s::id, ngx_http_xslt2_sheet_s::next, ngx_http_xslt2_finalize_with_error(), ngx_http_xslt2_process_data(), ngx_http_xslt2_xml_data_t::r, ngx_http_xslt2_sheet_s::ready, ngx_http_xslt2_xml_data_t::res_len, ngx_http_xslt2_sheet_s::res_uri, ngx_http_xslt2_xml_data_t::sheets, ngx_http_xslt2_xml_data_t::sheets_tail, ngx_http_xslt2_sheet_s::stylesheet, and ngx_http_xslt2_xml_data_t::xml_ready.
Referenced by ngx_http_xslt2_xml_add_data_chunk(), ngx_http_xslt2_xml_download_handler(), ngx_http_xslt2_xml_get_local_stylesheet(), and ngx_http_xslt2_xml_mxcache_get_handler().
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 | ( | ngx_http_request_t * | r | ) |
Creates new xml data context structure.
r | nginx http request |
Definition at line 109 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, ngx_http_xslt2_xml_sax_attribute_decl(), ngx_http_xslt2_xml_sax_cdata_block(), ngx_http_xslt2_xml_sax_characters(), ngx_http_xslt2_xml_sax_comment(), ngx_http_xslt2_xml_sax_element_decl(), ngx_http_xslt2_xml_sax_end_document(), ngx_http_xslt2_xml_sax_end_element(), ngx_http_xslt2_xml_sax_entity_decl(), ngx_http_xslt2_xml_sax_error(), ngx_http_xslt2_xml_sax_external_subset(), ngx_http_xslt2_xml_sax_get_entity(), ngx_http_xslt2_xml_sax_get_parameter_entity(), ngx_http_xslt2_xml_sax_has_external_subset(), ngx_http_xslt2_xml_sax_has_internal_subset(), ngx_http_xslt2_xml_sax_internal_subset(), ngx_http_xslt2_xml_sax_is_standalone(), ngx_http_xslt2_xml_sax_notation_decl(), ngx_http_xslt2_xml_sax_processing_instruction(), ngx_http_xslt2_xml_sax_reference(), ngx_http_xslt2_xml_sax_resolve_entity(), ngx_http_xslt2_xml_sax_start_document(), ngx_http_xslt2_xml_sax_start_element(), ngx_http_xslt2_xml_sax_unparsed_entity_decl(), ngx_http_xslt2_xml_data_t::r, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_body_filter().
static ngx_http_xslt2_sheet_t * ngx_http_xslt2_xml_create_new_stylesheet | ( | ngx_http_xslt2_xml_data_t * | xml_data | ) | [static] |
Creates new xsl style sheet context structure.
New style sheet structure is added to list of style sheets in xml data context.
xml_data | xml data context structure |
Definition at line 383 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::act_sheet, ngx_http_xslt2_sheet_s::id, ngx_http_xslt2_sheet_s::next, ngx_http_xslt2_sheet_s::parent_xml, ngx_http_xslt2_xml_data_t::r, ngx_http_xslt2_xml_data_t::sheets, ngx_http_xslt2_xml_data_t::sheets_n, and ngx_http_xslt2_xml_data_t::sheets_tail.
Referenced by ngx_http_xslt2_xml_stylesheet_node().
static void ngx_http_xslt2_xml_download_handler | ( | ngx_http_download_conn_t * | dl_ctx | ) | [static] |
Function called when style sheet download is finished.
Style sheet is parsed and later ngx_http_xslt2_xml_apply_stylesheets is called.
dl_ctx | download context structure |
Definition at line 806 of file ngx_http_xslt2_xml.c.
References ngx_http_download_conn_s::body_start, ngx_http_xslt2_sheet_s::buffer_chain, ngx_http_download_conn_s::data, ngx_http_xslt2_xml_data_t::dl_in_progress, ngx_http_download_conn_s::error, ngx_http_xslt2_finalize_with_error(), ngx_http_xslt2_xml_apply_stylesheets(), ngx_http_xslt2_xml_parse_stylesheet(), ngx_http_xslt2_xml_set_cached_stylesheet(), ngx_http_download_conn_s::out_bufs, ngx_http_xslt2_sheet_s::parent_xml, ngx_http_xslt2_xml_data_t::r, ngx_http_xslt2_sheet_s::ready, ngx_http_xslt2_sheet_s::res_uri, and ngx_http_download_conn_s::status.
Referenced by ngx_http_xslt2_xml_get_external_stylesheet().
static ngx_int_t ngx_http_xslt2_xml_get_cached_stylesheet | ( | ngx_http_request_t * | r, | |
ngx_http_xslt2_sheet_t * | sheet | |||
) | [static] |
Enqueues cache connection and try to get cached style sheet.
r | nginx http request | |
sheet | style sheet context structure |
Definition at line 425 of file ngx_http_xslt2_xml.c.
References ngx_http_mxcache_conn_s::data, ngx_http_xslt2_xml_data_t::dl_in_progress, ngx_http_mxcache_conn_s::done_handler, ngx_http_mxcache_conn_s::key, ngx_http_mxcache_create_new(), ngx_http_mxcache_get(), ngx_http_mxcache_is_enabled(), ngx_http_xslt2_xml_mxcache_get_handler(), ngx_http_xslt2_sheet_s::parent_xml, ngx_http_mxcache_conn_s::res_uri, ngx_http_xslt2_sheet_s::res_uri, ngx_http_mxcache_conn_s::rpool, and ngx_http_xslt2_sheet_s::xcache_get.
Referenced by ngx_http_xslt2_xml_get_stylesheet().
static ngx_int_t ngx_http_xslt2_xml_get_external_stylesheet | ( | ngx_http_xslt2_sheet_t * | sheet | ) | [static] |
Enqueues a new download of style sheet.
sheet | style sheet structure |
Definition at line 743 of file ngx_http_xslt2_xml.c.
References ngx_http_download_conn_s::data, ngx_http_xslt2_xml_data_t::dl_in_progress, ngx_http_download_conn_s::done_handler, ngx_http_xslt2_sheet_s::download, ngx_http_download_create_new(), ngx_http_download_enqueue(), ngx_http_download_parse_url(), ngx_http_xslt2_finalize_with_error(), ngx_http_xslt2_xml_download_handler(), ngx_http_xslt2_sheet_s::parent_xml, ngx_http_download_conn_s::r, ngx_http_xslt2_xml_data_t::r, and ngx_http_xslt2_sheet_s::res_uri.
Referenced by ngx_http_xslt2_xml_get_stylesheet().
static ngx_int_t ngx_http_xslt2_xml_get_local_stylesheet | ( | ngx_http_xslt2_sheet_t * | sheet | ) | [static] |
Reads a style sheet from disk.
When style sheet is read then apply_stylesheet is called.
sheet | style sheet context structure |
Definition at line 680 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_sheet_s::buffer_chain, ngx_http_filesync_get(), ngx_http_xslt2_finalize_with_error(), ngx_http_xslt2_xml_apply_stylesheets(), ngx_http_xslt2_xml_parse_stylesheet(), ngx_http_xslt2_xml_set_cached_stylesheet(), ngx_http_xslt2_sheet_s::parent_xml, ngx_http_xslt2_xml_data_t::r, ngx_http_xslt2_sheet_s::ready, and ngx_http_xslt2_sheet_s::res_uri.
Referenced by ngx_http_xslt2_xml_get_stylesheet().
static void ngx_http_xslt2_xml_get_stylesheet | ( | ngx_http_xslt2_sheet_t * | sheet, | |
ngx_flag_t | use_cache | |||
) | [static] |
Gets a style sheet.
When URI is local then style sheet is read from disk. When http:// prefix is found then a new download is enqueued.
sheet | style sheet structure | |
use_cache | flag which indicates whether to use cache or not |
Definition at line 633 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_get_cached_stylesheet(), ngx_http_xslt2_xml_get_external_stylesheet(), ngx_http_xslt2_xml_get_local_stylesheet(), ngx_http_xslt2_sheet_s::parent_xml, ngx_http_xslt2_xml_data_t::r, ngx_http_xslt2_sheet_s::res_uri, and XXSLT_USE_CACHE.
Referenced by ngx_http_xslt2_xml_mxcache_get_handler(), and ngx_http_xslt2_xml_stylesheet_node().
static void ngx_http_xslt2_xml_mxcache_get_handler | ( | ngx_http_mxcache_conn_t * | conn | ) | [static] |
Handler called when response from cache is ready.
If style sheet is not in cache then ngx_http_xslt2_xml_get_stylesheet is called with disabled cache.
conn | cache structure |
Definition at line 481 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_sheet_s::buffer_chain, ngx_http_mxcache_conn_s::data, ngx_http_mxcache_conn_s::data_begin, ngx_http_xslt2_xml_data_t::dl_in_progress, ngx_http_mxcache_conn_s::error, ngx_http_mxcache_conn_s::log, ngx_http_xslt2_finalize_with_error(), ngx_http_xslt2_xml_apply_stylesheets(), ngx_http_xslt2_xml_get_stylesheet(), ngx_http_xslt2_xml_parse_stylesheet(), ngx_http_mxcache_conn_s::out_bufs, ngx_http_xslt2_sheet_s::parent_xml, ngx_http_xslt2_xml_data_t::r, ngx_http_xslt2_sheet_s::ready, ngx_http_xslt2_sheet_s::res_uri, ngx_http_mxcache_conn_s::res_uri, and XXSLT_NO_CACHE.
Referenced by ngx_http_xslt2_xml_get_cached_stylesheet().
static void ngx_http_xslt2_xml_mxcache_set_handler | ( | ngx_http_mxcache_conn_t * | conn | ) | [static] |
Called when style sheet is set in cache.
Cleanup of cache structure is called.
conn | cache structure |
Definition at line 616 of file ngx_http_xslt2_xml.c.
References ngx_http_mxcache_conn_s::error, ngx_http_mxcache_conn_s::log, ngx_http_mxcache_cleanup(), and ngx_http_mxcache_conn_s::res_uri.
Referenced by ngx_http_xslt2_xml_set_cached_stylesheet().
static ngx_int_t ngx_http_xslt2_xml_parse_stylesheet | ( | ngx_http_xslt2_sheet_t * | sheet | ) | [static] |
Parses style sheet.
sheet | style sheet context structure. |
Definition at line 878 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_sheet_s::buffer_chain, ngx_http_xslt2_sheet_s::parent_xml, ngx_http_xslt2_xml_data_t::r, and ngx_http_xslt2_sheet_s::stylesheet.
Referenced by ngx_http_xslt2_xml_download_handler(), ngx_http_xslt2_xml_get_local_stylesheet(), and ngx_http_xslt2_xml_mxcache_get_handler().
static ngx_int_t ngx_http_xslt2_xml_return_original | ( | ngx_http_xslt2_xml_data_t * | xml_data | ) | [static] |
Returns original content of XML document if no style sheet declaration is found.
xml_data | xml data context structure |
Definition at line 270 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::buffer_chain, ngx_http_xslt2_xml_data_t::doc, ngx_http_xslt2_xml_data_t::done, ngx_http_xslt2_finalize_with_error(), ngx_http_xslt2_process_data(), ngx_http_xslt2_xml_data_t::r, and ngx_http_xslt2_xml_data_t::res_len.
Referenced by ngx_http_xslt2_xml_add_data_chunk().
static void ngx_http_xslt2_xml_sax_attribute_decl | ( | void * | data, | |
const xmlChar * | elem, | |||
const xmlChar * | fullname, | |||
int | type, | |||
int | def, | |||
const xmlChar * | defaultValue, | |||
xmlEnumerationPtr | tree | |||
) | [static] |
Definition at line 1218 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_cdata_block | ( | void * | data, | |
const xmlChar * | p, | |||
int | len | |||
) | [static] |
Definition at line 1291 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_characters | ( | void * | data, | |
const xmlChar * | p, | |||
int | len | |||
) | [static] |
Definition at line 1283 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_comment | ( | void * | data, | |
const xmlChar * | value | |||
) | [static] |
Definition at line 1334 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_element_decl | ( | void * | data, | |
const xmlChar * | name, | |||
int | type, | |||
xmlElementContentPtr | content | |||
) | [static] |
Definition at line 1230 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_end_document | ( | void * | data | ) | [static] |
Definition at line 1184 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_end_element | ( | void * | data, | |
const xmlChar *localname | ATTRIBUTE_UNUSED, | |||
const xmlChar *prefix | ATTRIBUTE_UNUSED, | |||
const xmlChar *URI | ATTRIBUTE_UNUSED | |||
) | [static] |
Definition at line 1272 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_entity_decl | ( | void * | data, | |
const xmlChar * | name, | |||
int | type, | |||
const xmlChar * | publicId, | |||
const xmlChar * | systemId, | |||
xmlChar * | content | |||
) | [static] |
Definition at line 1208 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_cdecl ngx_http_xslt2_xml_sax_error | ( | void * | data, | |
const char * | msg, | |||
... | ||||
) | [static] |
Definition at line 1366 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::libxml_error.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_external_subset | ( | void * | data, | |
const xmlChar * | name, | |||
const xmlChar * | externalId, | |||
const xmlChar * | systemId | |||
) | [static] |
Definition at line 1201 of file ngx_http_xslt2_xml.c.
Referenced by ngx_http_xslt2_xml_create_new().
static xmlEntityPtr ngx_http_xslt2_xml_sax_get_entity | ( | void * | data, | |
const xmlChar * | name | |||
) | [static] |
Definition at line 1299 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static xmlEntityPtr ngx_http_xslt2_xml_sax_get_parameter_entity | ( | void * | data, | |
const xmlChar * | name | |||
) | [static] |
Definition at line 1308 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static int ngx_http_xslt2_xml_sax_has_external_subset | ( | void * | data | ) | [static] |
Definition at line 1358 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static int ngx_http_xslt2_xml_sax_has_internal_subset | ( | void * | data | ) | [static] |
Definition at line 1350 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_internal_subset | ( | void * | data, | |
const xmlChar * | name, | |||
const xmlChar * | externalId, | |||
const xmlChar * | systemId | |||
) | [static] |
Definition at line 1192 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static int ngx_http_xslt2_xml_sax_is_standalone | ( | void * | data | ) | [static] |
Definition at line 1342 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_notation_decl | ( | void * | data, | |
const xmlChar * | name, | |||
const xmlChar * | publicId, | |||
const xmlChar * | systemId | |||
) | [static] |
Definition at line 1239 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_processing_instruction | ( | void * | data, | |
const xmlChar * | target, | |||
const xmlChar * | pidata | |||
) | [static] |
XSL style sheet is interpreted as processing instruction.
Definition at line 1162 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, ngx_http_xslt2_xml_stylesheet_node(), and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_reference | ( | void * | data, | |
const xmlChar * | name | |||
) | [static] |
Definition at line 1326 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static xmlParserInputPtr ngx_http_xslt2_xml_sax_resolve_entity | ( | void * | data, | |
const xmlChar * | publicId, | |||
const xmlChar * | systemId | |||
) | [static] |
Definition at line 1317 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_start_document | ( | void * | data | ) | [static] |
Definition at line 1176 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_start_element | ( | void * | data, | |
const xmlChar * | localname, | |||
const xmlChar * | prefix, | |||
const xmlChar * | URI, | |||
int | nb_namespaces, | |||
const xmlChar ** | namespaces, | |||
int | nb_attributes, | |||
int | nb_defaulted, | |||
const xmlChar ** | attributes | |||
) | [static] |
Definition at line 1259 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static void ngx_http_xslt2_xml_sax_unparsed_entity_decl | ( | void * | data, | |
const xmlChar * | name, | |||
const xmlChar * | publicId, | |||
const xmlChar * | systemId, | |||
const xmlChar * | notationName | |||
) | [static] |
Definition at line 1248 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::ctxt, and ngx_http_xslt2_xml_data_t::sax.
Referenced by ngx_http_xslt2_xml_create_new().
static ngx_int_t ngx_http_xslt2_xml_set_cached_stylesheet | ( | ngx_http_request_t * | r, | |
ngx_http_xslt2_sheet_t * | sheet | |||
) | [static] |
Tries to set style sheet in cache.
r | nginx http request | |
sheet | style sheet context structure |
Definition at line 536 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_sheet_s::buffer_chain, ngx_http_mxcache_conn_s::bytes, ngx_http_mxcache_conn_s::done_handler, ngx_http_mxcache_conn_s::key, ngx_http_mxcache_cleanup(), ngx_http_mxcache_create_new(), ngx_http_mxcache_is_enabled(), ngx_http_mxcache_set(), ngx_http_xslt2_xml_mxcache_set_handler(), ngx_http_mxcache_conn_s::out_bufs, ngx_http_mxcache_conn_s::out_bufs_tail, ngx_http_mxcache_conn_s::pool, ngx_http_mxcache_conn_s::res_uri, and ngx_http_xslt2_sheet_s::res_uri.
Referenced by ngx_http_xslt2_xml_download_handler(), and ngx_http_xslt2_xml_get_local_stylesheet().
static void ngx_http_xslt2_xml_stylesheet_error | ( | ngx_http_xslt2_xml_data_t * | xml_data, | |
char * | msg, | |||
... | ||||
) | [static] |
Logs error which occurred during style sheet declaration parsing.
It is used because ngx_http_xslt2_finalize_with_error can't be called from libxml callback - it frees libxml parser context.
xml_data | xml data context structure | |
msg | formatted error message |
Definition at line 1123 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_data_t::r, ngx_http_xslt2_xml_data_t::stylesheet_err, and ngx_http_xslt2_xml_data_t::stylesheet_err_msg.
Referenced by ngx_http_xslt2_xml_stylesheet_node().
static void ngx_http_xslt2_xml_stylesheet_node | ( | ngx_http_xslt2_xml_data_t * | xml_data, | |
const xmlChar * | pidata | |||
) | [static] |
Parses processing instruction and begins download.
xml_data | xml data context structure | |
pidata | processing instruction content |
Definition at line 1067 of file ngx_http_xslt2_xml.c.
References ngx_http_xslt2_xml_create_new_stylesheet(), ngx_http_xslt2_xml_get_stylesheet(), ngx_http_xslt2_xml_stylesheet_error(), ngx_http_xslt2_xml_data_t::r, ngx_http_xslt2_sheet_s::res_uri, and XXSLT_USE_CACHE.
Referenced by ngx_http_xslt2_xml_sax_processing_instruction().