Eneboo - Documentación para desarrolladores
|
#include <libxslt/xsltconfig.h>
#include <libxml/xpath.h>
#include <libxml/dict.h>
#include <libxml/xmlerror.h>
#include "xsltexports.h"
#include "xsltInternals.h"
Ir al código fuente de este archivo.
#define IS_XSLT_ELEM | ( | n | ) |
(((n) != NULL) && ((n)->ns != NULL) && \ (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE)))
IS_XSLT_ELEM:
Checks that the element pertains to XSLT namespace.
IS_XSLT_NAME:
Checks the value of an element in XSLT namespace.
#define IS_XSLT_REAL_NODE | ( | n | ) |
(((n) != NULL) && \ (((n)->type == XML_ELEMENT_NODE) || \ ((n)->type == XML_TEXT_NODE) || \ ((n)->type == XML_CDATA_SECTION_NODE) || \ ((n)->type == XML_ATTRIBUTE_NODE) || \ ((n)->type == XML_DOCUMENT_NODE) || \ ((n)->type == XML_HTML_DOCUMENT_NODE) || \ ((n)->type == XML_COMMENT_NODE) || \ ((n)->type == XML_PI_NODE)))
IS_XSLT_REAL_NODE:
Check that a node is a 'real' one: document, element, text or attribute.
#define XSLT_STRANGE |
xsltGenericError(xsltGenericErrorContext, \ "Internal error at %s:%d\n", \ __FILE__, __LINE__);
XSLT_STRANGE:
Macro to flag that a problem was detected internally.
#define XSLT_TIMESTAMP_TICS_PER_SEC 100000l |
XSLT_TIMESTAMP_TICS_PER_SEC:
Sampling precision for profiling
#define XSLT_TODO |
xsltGenericError(xsltGenericErrorContext, \ "Unimplemented block at %s:%d\n", \ __FILE__, __LINE__);
XSLT_TODO:
Macro to flag unimplemented blocks.
#define XSLT_TRACE | ( | ctxt, | |
code, | |||
call | |||
) |
if (ctxt->traceCode && (*(ctxt->traceCode) & code)) \ call
XSLT_TRACE:
Control the type of xsl debugtrace messages emitted.
typedef int(* xsltAddCallCallback)(xsltTemplatePtr templ, xmlNodePtr source) |
typedef void(* xsltDropCallCallback)(void) |
typedef void(* xsltHandleDebuggerCallback)(xmlNodePtr cur, xmlNodePtr node, xsltTemplatePtr templ, xsltTransformContextPtr ctxt) |
enum xsltDebugStatusCodes |
enum xsltDebugTraceCodes |
XSLTPUBFUN int XSLTCALL xslAddCall | ( | xsltTemplatePtr | templ, |
xmlNodePtr | source | ||
) |
xslAddCall: : current template being applied : the source node being processed
Add template "call" to call stack Returns : 1 on sucess 0 otherwise an error may be printed if WITH_XSLT_DEBUG_BREAKPOINTS is defined
XSLTPUBFUN void XSLTCALL xslDropCall | ( | void | ) |
xslDropCall:
Drop the topmost item off the call stack
XSLTPUBFUN void XSLTCALL xsltCalibrateAdjust | ( | long | delta | ) |
xsltCalibrateAdjust: : a negative dealy value found
Used for to correct the calibration for xsltTimestamp()
XSLTPUBFUN xmlXPathObjectPtr* XSLTCALL xsltComputeSortResult | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | sort | ||
) |
xsltComputeSortResult: : a XSLT process context : node list
reorder the current node list accordingly to the set of sorting requirement provided by the array of nodes.
Returns a ordered XPath nodeset or NULL in case of error.
XSLTPUBFUN xsltDebugTraceCodes XSLTCALL xsltDebugGetDefaultTrace | ( | void | ) |
xsltDebugGetDefaultTrace:
Get the current default debug tracing level mask
Returns the current default debug tracing level mask
XSLTPUBFUN void XSLTCALL xsltDebugSetDefaultTrace | ( | xsltDebugTraceCodes | val | ) |
xsltDebugSetDefaultTrace: : tracing level mask
Set the default debug tracing level mask
XSLTPUBFUN void XSLTCALL xsltDefaultSortFunction | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr * | sorts, | ||
int | nbsorts | ||
) |
xsltDefaultSortFunction: : a XSLT process context : array of sort nodes : the number of sorts in the array
reorder the current node list accordingly to the set of sorting requirement provided by the arry of nodes.
XSLTPUBFUN void XSLTCALL xsltDocumentSortFunction | ( | xmlNodeSetPtr | list | ) |
xsltDocumentSortFunction: : the node set
reorder the current node list accordingly to the document order This function is slow, obsolete and should not be used anymore.
XSLTPUBFUN void XSLTCALL xsltDoSortFunction | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr * | sorts, | ||
int | nbsorts | ||
) |
xsltDoSortFunction: : a XSLT process context : array of sort nodes : the number of sorts in the array
reorder the current node list accordingly to the set of sorting requirement provided by the arry of nodes. This is a wrapper function, the actual function used is specified using xsltSetCtxtSortFunc() to set the context specific sort function, or xsltSetSortFunc() to set the global sort function. If a sort function is set on the context, this will get called. Otherwise the global sort function is called.
XSLTPUBFUN const xmlChar* XSLTCALL xsltGetCNsProp | ( | xsltStylesheetPtr | style, |
xmlNodePtr | node, | ||
const xmlChar * | name, | ||
const xmlChar * | nameSpace | ||
) |
XSLTPUBFUN int XSLTCALL xsltGetDebuggerStatus | ( | void | ) |
xsltGetDebuggerStatus:
Get xslDebugStatus.
Returns the value of xslDebugStatus.
XSLTPUBFUN xmlChar* XSLTCALL xsltGetNsProp | ( | xmlNodePtr | node, |
const xmlChar * | name, | ||
const xmlChar * | nameSpace | ||
) |
XSLTPUBFUN xmlDocPtr XSLTCALL xsltGetProfileInformation | ( | xsltTransformContextPtr | ctxt | ) |
xsltGetProfileInformation: : a transformation context
This function should be called after the transformation completed to extract template processing profiling informations if availble. The informations are returned as an XML document tree like <?xml version="1.0"?> <profile> <template rank="1" match="*" name="" mode="" calls="6" time="48" average="8"> <template rank="2" match="item2|item3" name="" mode="" calls="10" time="30" average="3"> <template rank="3" match="item1" name="" mode="" calls="5" time="17" average="3"> </profile> The caller will need to free up the returned tree with xmlFreeDoc()
Returns the xmlDocPtr corresponding to the result or NULL if not available.
XSLTPUBFUN const xmlChar* XSLTCALL xsltGetQNameURI | ( | xmlNodePtr | node, |
xmlChar ** | name | ||
) |
XSLTPUBFUN const xmlChar* XSLTCALL xsltGetQNameURI2 | ( | xsltStylesheetPtr | style, |
xmlNodePtr | node, | ||
const xmlChar ** | name | ||
) |
xsltGetUTF8Char: : a sequence of UTF-8 encoded bytes : a pointer to len
Read one UTF8 Char from Function copied from libxml2 xmlGetUTF8Char() ... to discard ultimately and use the original API
Returns the char value or -1 in case of error and update with the number of bytes used
XSLTPUBFUN void XSLTCALL xsltMessage | ( | xsltTransformContextPtr | ctxt, |
xmlNodePtr | node, | ||
xmlNodePtr | inst | ||
) |
xsltMessage: : an XSLT processing context : The current node : The node containing the message instruction
Process and xsl:message construct
XSLTPUBFUN void XSLTCALL xsltPrintErrorContext | ( | xsltTransformContextPtr | ctxt, |
xsltStylesheetPtr | style, | ||
xmlNodePtr | node | ||
) |
xsltPrintErrorContext: : the transformation context : the stylesheet : the current node being processed
Display the context of an error.
XSLTPUBFUN void XSLTCALL xsltSaveProfiling | ( | xsltTransformContextPtr | ctxt, |
FILE * | output | ||
) |
xsltSaveProfiling: : an XSLT context : a FILE * for saving the informations
Save the profiling informations on
XSLTPUBFUN int XSLTCALL xsltSaveResultTo | ( | xmlOutputBufferPtr | buf, |
xmlDocPtr | result, | ||
xsltStylesheetPtr | style | ||
) |
xsltSaveResultTo: : an output buffer
Save the result
Returns the number of byte written or -1 in case of failure.
XSLTPUBFUN int XSLTCALL xsltSaveResultToFd | ( | int | fd, |
xmlDocPtr | result, | ||
xsltStylesheetPtr | style | ||
) |
xsltSaveResultToFd: : a file descriptor
Save the result
Returns the number of bytes written or -1 in case of failure.
XSLTPUBFUN int XSLTCALL xsltSaveResultToFile | ( | FILE * | file, |
xmlDocPtr | result, | ||
xsltStylesheetPtr | style | ||
) |
XSLTPUBFUN int XSLTCALL xsltSaveResultToFilename | ( | const char * | URL, |
xmlDocPtr | result, | ||
xsltStylesheetPtr | style, | ||
int | compression | ||
) |
xsltSaveResultToFilename: : a filename or URL
Save the result
Returns the number of byte written or -1 in case of failure.
XSLTPUBFUN int XSLTCALL xsltSaveResultToString | ( | xmlChar ** | doc_txt_ptr, |
int * | doc_txt_len, | ||
xmlDocPtr | result, | ||
xsltStylesheetPtr | style | ||
) |
xsltSaveResultToString: : Memory pointer for allocated XML text : Length of the generated XML text
Save the result
Returns 0 in case of success and -1 in case of error
XSLTPUBFUN int XSLTCALL xsltSetCtxtParseOptions | ( | xsltTransformContextPtr | ctxt, |
int | options | ||
) |
xsltSetCtxtParseOptions: : a XSLT process context : a combination of libxml2 xmlParserOption
Change the default parser option passed by the XSLT engine to the parser when using document() loading.
Returns the previous options or -1 in case of error
XSLTPUBFUN void XSLTCALL xsltSetCtxtSortFunc | ( | xsltTransformContextPtr | ctxt, |
xsltSortFunc | handler | ||
) |
xsltSetCtxtSortFunc: : a XSLT process context : the new handler function
Function to set the handler for XSLT sorting for the specified context. If the handler is NULL, then the global sort function will be called
xsltSetDebuggerCallbacks: : number of callbacks : the block of callbacks
This function allow to plug a debugger into the XSLT library points to a block of memory containing the address of callback routines.
Returns 0 in case of success and -1 in case of error
XSLTPUBFUN void XSLTCALL xsltSetDebuggerStatus | ( | int | value | ) |
xsltSetDebuggerStatus: : the value to be set
This function sets the value of xslDebugStatus.
XSLTPUBFUN void XSLTCALL xsltSetGenericDebugFunc | ( | void * | ctx, |
xmlGenericErrorFunc | handler | ||
) |
xsltSetGenericDebugFunc: : the new error handling context : the new handler function
Function to reset the handler and the error context for out of context error messages. This simply means that will be called for subsequent error messages while not parsing or validating. And will be passed as first argument to One can simply force messages to be emitted to another FILE * than stderr by setting to this file handle and to NULL.
XSLTPUBFUN void XSLTCALL xsltSetGenericErrorFunc | ( | void * | ctx, |
xmlGenericErrorFunc | handler | ||
) |
xsltSetGenericErrorFunc: : the new error handling context : the new handler function
Function to reset the handler and the error context for out of context error messages. This simply means that will be called for subsequent error messages while not parsing nor validating. And will be passed as first argument to One can simply force messages to be emitted to another FILE * than stderr by setting to this file handle and to NULL.
XSLTPUBFUN void XSLTCALL xsltSetSortFunc | ( | xsltSortFunc | handler | ) |
xsltSetSortFunc: : the new handler function
Function to reset the global handler for XSLT sorting. If the handler is NULL, the default sort function will be used.
XSLTPUBFUN void XSLTCALL xsltSetTransformErrorFunc | ( | xsltTransformContextPtr | ctxt, |
void * | ctx, | ||
xmlGenericErrorFunc | handler | ||
) |
xsltSetTransformErrorFunc: : the XSLT transformation context : the new error handling context : the new handler function
Function to reset the handler and the error context for out of context error messages specific to a given XSLT transromation.
This simply means that will be called for subsequent error messages while running the transformation.
XSLTPUBFUN const xmlChar* XSLTCALL xsltSplitQName | ( | xmlDictPtr | dict, |
const xmlChar * | name, | ||
const xmlChar ** | prefix | ||
) |
XSLTPUBFUN long XSLTCALL xsltTimestamp | ( | void | ) |
xsltTimestamp:
Used for gathering profiling data
Returns the number of tenth of milliseconds since the beginning of the profiling
XSLTPUBFUN void XSLTCALL xsltTransformError | ( | xsltTransformContextPtr | ctxt, |
xsltStylesheetPtr | style, | ||
xmlNodePtr | node, | ||
const char * | msg, | ||
... | |||
) |
xsltTransformError: : an XSLT transformation context : the XSLT stylesheet used : the current node in the stylesheet : the message to display/transmit @...: extra parameters for the message display
Display and format an error messages, gives file, line, position and extra parameters, will use the specific transformation context if available
XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL xsltXPathCompile | ( | xsltStylesheetPtr | style, |
const xmlChar * | str | ||
) |
xsltXPathCompile: : the stylesheet : the XPath expression
Compile an XPath expression
Returns the xmlXPathCompExprPtr resulting from the compilation or NULL. the caller has to free the object.
XSLTPUBVAR int xslDebugStatus |
XSLTPUBVAR xmlGenericErrorFunc xsltGenericDebug |
XSLTPUBVAR void* xsltGenericDebugContext |
XSLTPUBVAR xmlGenericErrorFunc xsltGenericError |
XSLTPUBVAR void* xsltGenericErrorContext |