diff --git a/ChangeLog b/ChangeLog index ed5e5603..9998026d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Feb 6 23:34:10 CET 2002 Daniel Veillard + + * python/libxsl.py python/libxslt-python-api.xml python/libxslt.c + python/libxsltclass.txt: added libxslt_xsltCleanup() added parameters + to libxslt_xsltApplyStylesheet() removed the memleaks left and + fixed an import order. + * python/tests/basic.py python/tests/extfunc.py: updated the tests + Wed Feb 6 19:46:09 CET 2002 Daniel Veillard * python/libxlst.c python/libxslt-python-api.xml diff --git a/doc/libxslt-api.xml b/doc/libxslt-api.xml index f8cedc91..6c0be4e6 100644 --- a/doc/libxslt-api.xml +++ b/doc/libxslt-api.xml @@ -31,15 +31,6 @@ - - - - - - - - - @@ -102,42 +93,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -179,6 +134,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -703,12 +703,7 @@ - - - - - - + Process the xslt element node on the source node diff --git a/doc/libxslt-decl.txt b/doc/libxslt-decl.txt index 67b56345..2d2f4e30 100644 --- a/doc/libxslt-decl.txt +++ b/doc/libxslt-decl.txt @@ -28,487 +28,6 @@ void -XSLT_MAX_SORT -#define XSLT_MAX_SORT 5 - - -XSLT_PAT_NO_PRIORITY -#define XSLT_PAT_NO_PRIORITY -12345789 - - -xsltTemplate - - -xsltTemplatePtr -typedef xsltTemplate *xsltTemplatePtr; - - -xsltTemplate -struct xsltTemplate { - struct _xsltTemplate *next;/* chained list sorted by priority */ - struct _xsltStylesheet *style;/* the containing stylesheet */ - xmlChar *match; /* the matching string */ - float priority; /* as given from the stylesheet, not computed */ - xmlChar *name; /* the local part of the name QName */ - xmlChar *nameURI; /* the URI part of the name QName */ - xmlChar *mode; /* the local part of the mode QName */ - xmlChar *modeURI; /* the URI part of the mode QName */ - xmlNodePtr content; /* the template replacement value */ - xmlNodePtr elem; /* the source element */ - - int inheritedNsNr; /* number of inherited namespaces */ - xmlNsPtr *inheritedNs;/* inherited non-excluded namespaces */ - - /* Profiling informations */ - int nbCalls; /* the number of time the template was called */ - unsigned long time; /* the time spent in this template */ -}; - - -xsltDecimalFormat - - -xsltDecimalFormatPtr -typedef xsltDecimalFormat *xsltDecimalFormatPtr; - - -xsltDecimalFormat -struct xsltDecimalFormat { - struct _xsltDecimalFormat *next; /* chained list */ - xmlChar *name; - /* Used for interpretation of pattern */ - xmlChar *digit; - xmlChar *patternSeparator; - /* May appear in result */ - xmlChar *minusSign; - xmlChar *infinity; - xmlChar *noNumber; /* Not-a-number */ - /* Used for interpretation of pattern and may appear in result */ - xmlChar *decimalPoint; - xmlChar *grouping; - xmlChar *percent; - xmlChar *permille; - xmlChar *zeroDigit; -}; - - -xsltDocument - - -xsltDocumentPtr -typedef xsltDocument *xsltDocumentPtr; - - -xsltDocument -struct xsltDocument { - struct _xsltDocument *next; /* documents are kept in a chained list */ - int main; /* is this the main document */ - xmlDocPtr doc; /* the parsed document */ - void *keys; /* key tables storage */ -}; - - -xsltTransformContext - - -xsltTransformContextPtr -typedef xsltTransformContext *xsltTransformContextPtr; - - -xsltElemPreComp - - -xsltElemPreCompPtr -typedef xsltElemPreComp *xsltElemPreCompPtr; - - -xsltTransformFunction -void -xsltTransformContextPtr ctxt, - xmlNodePtr node, - xmlNodePtr inst, - xsltElemPreCompPtr comp - - -xsltStyleType -typedef enum { - XSLT_FUNC_COPY=1, - XSLT_FUNC_SORT, - XSLT_FUNC_TEXT, - XSLT_FUNC_ELEMENT, - XSLT_FUNC_ATTRIBUTE, - XSLT_FUNC_COMMENT, - XSLT_FUNC_PI, - XSLT_FUNC_COPYOF, - XSLT_FUNC_VALUEOF, - XSLT_FUNC_NUMBER, - XSLT_FUNC_APPLYIMPORTS, - XSLT_FUNC_CALLTEMPLATE, - XSLT_FUNC_APPLYTEMPLATES, - XSLT_FUNC_CHOOSE, - XSLT_FUNC_IF, - XSLT_FUNC_FOREACH, - XSLT_FUNC_DOCUMENT, - XSLT_FUNC_WITHPARAM, - XSLT_FUNC_PARAM, - XSLT_FUNC_VARIABLE, - XSLT_FUNC_WHEN, - XSLT_FUNC_EXTENSION -} xsltStyleType; - - -xsltElemPreCompDeallocator -void -xsltElemPreCompPtr comp - - -xsltElemPreComp -struct xsltElemPreComp { - xsltElemPreCompPtr next; /* chained list */ - xsltStyleType type; /* type of the element */ - xsltTransformFunction func; /* handling function */ - xmlNodePtr inst; /* the instruction */ - - /* end of common part */ - xsltElemPreCompDeallocator free; /* the deallocator */ -}; - - -xsltStylePreComp - - -xsltStylePreCompPtr -typedef xsltStylePreComp *xsltStylePreCompPtr; - - -xsltStylePreComp -struct xsltStylePreComp { - xsltElemPreCompPtr next; /* chained list */ - xsltStyleType type; /* type of the element */ - xsltTransformFunction func; /* handling function */ - xmlNodePtr inst; /* the instruction */ - - /* - * Pre computed values - */ - - xmlChar *stype; /* sort */ - int has_stype; /* sort */ - int number; /* sort */ - xmlChar *order; /* sort */ - int has_order; /* sort */ - int descending; /* sort */ - - xmlChar *use; /* copy, element */ - int has_use; /* copy, element */ - - int noescape; /* text */ - - xmlChar *name; /* element, attribute, pi */ - int has_name; /* element, attribute, pi */ - xmlChar *ns; /* element */ - int has_ns; /* element */ - - xmlChar *mode; /* apply-templates */ - xmlChar *modeURI; /* apply-templates */ - - xmlChar *test; /* if */ - - xsltTemplatePtr templ; /* call-template */ - - xmlChar *select; /* sort, copy-of, value-of, apply-templates */ - - int ver11; /* document */ - xmlChar *filename; /* document URL */ - int has_filename; /* document */ - - xsltNumberData numdata; /* number */ - - xmlXPathCompExprPtr comp; /* a precompiled XPath expression */ - xmlNsPtr *nsList; /* the namespaces in scope */ - int nsNr; /* the number of namespaces in scope */ -}; - - -xsltStackElem - - -xsltStackElemPtr -typedef xsltStackElem *xsltStackElemPtr; - - -xsltStackElem -struct xsltStackElem { - struct _xsltStackElem *next;/* chained list */ - xsltStylePreCompPtr comp; /* the compiled form */ - int computed; /* was the evaluation done */ - xmlChar *name; /* the local part of the name QName */ - xmlChar *nameURI; /* the URI part of the name QName */ - xmlChar *select; /* the eval string */ - xmlNodePtr tree; /* the tree if no eval string or the location */ - xmlXPathObjectPtr value; /* The value if computed */ -}; - - -xsltStylesheet - - -xsltStylesheetPtr -typedef xsltStylesheet *xsltStylesheetPtr; - - -xsltStylesheet -struct xsltStylesheet { - /* - * The stylesheet import relation is kept as a tree - */ - struct _xsltStylesheet *parent; - struct _xsltStylesheet *next; - struct _xsltStylesheet *imports; - - xsltDocumentPtr docList; /* the include document list */ - - /* - * General data on the style sheet document - */ - xmlDocPtr doc; /* the parsed XML stylesheet */ - xmlHashTablePtr stripSpaces;/* the hash table of the strip-space and - preserve space elements */ - int stripAll; /* strip-space * (1) preserve-space * (-1) */ - xmlHashTablePtr cdataSection;/* the hash table of the cdata-section */ - - /* - * Global variable or parameters - */ - xsltStackElemPtr variables; /* linked list of param and variables */ - - /* - * Template descriptions - */ - xsltTemplatePtr templates; /* the ordered list of templates */ - void *templatesHash; /* hash table or wherever compiled templates - informations are stored */ - void *rootMatch; /* template based on / */ - void *keyMatch; /* template based on key() */ - void *elemMatch; /* template based on * */ - void *attrMatch; /* template based on @* */ - void *parentMatch; /* template based on .. */ - void *textMatch; /* template based on text() */ - void *piMatch; /* template based on processing-instruction() */ - void *commentMatch; /* template based on comment() */ - - /* - * Namespace aliases - */ - xmlHashTablePtr nsAliases; /* the namespace alias hash tables */ - - /* - * Attribute sets - */ - xmlHashTablePtr attributeSets;/* the attribute sets hash tables */ - - /* - * Namespaces - */ - xmlHashTablePtr nsHash; /* the set of namespaces in use */ - void *nsDefs; /* the namespaces defined */ - - /* - * Key definitions - */ - void *keys; /* key definitions */ - - /* - * Output related stuff. - */ - xmlChar *method; /* the output method */ - xmlChar *methodURI; /* associated namespace if any */ - xmlChar *version; /* version string */ - xmlChar *encoding; /* encoding string */ - int omitXmlDeclaration; /* omit-xml-declaration = "yes" | "no" */ - - /* Number formatting */ - xsltDecimalFormatPtr decimalFormat; - int standalone; /* standalone = "yes" | "no" */ - xmlChar *doctypePublic; /* doctype-public string */ - xmlChar *doctypeSystem; /* doctype-system string */ - int indent; /* should output being indented */ - xmlChar *mediaType; /* media-type string */ - - /* - * Precomputed blocks - */ - xsltElemPreCompPtr preComps;/* list of precomputed blocks */ - int warnings; /* number of warnings found at compilation */ - int errors; /* number of errors found at compilation */ - - xmlChar *exclPrefix; /* last excluded prefixes */ - xmlChar **exclPrefixTab; /* array of excluded prefixes */ - int exclPrefixNr; /* number of excluded prefixes in scope */ - int exclPrefixMax; /* size of the array */ - - void *_private; /* user defined data */ - - /* - * Extensions - */ - xmlHashTablePtr extInfos; /* the extension data */ -}; - - -xsltOutputType -typedef enum { - XSLT_OUTPUT_XML = 0, - XSLT_OUTPUT_HTML, - XSLT_OUTPUT_TEXT -} xsltOutputType; - - -xsltTransformState -typedef enum { - XSLT_STATE_OK = 0, - XSLT_STATE_ERROR, - XSLT_STATE_STOPPED -} xsltTransformState; - - -xsltTransformContext -struct xsltTransformContext { - xsltStylesheetPtr style; /* the stylesheet used */ - xsltOutputType type; /* the type of output */ - - xsltTemplatePtr templ; /* the current template */ - int templNr; /* Nb of templates in the stack */ - int templMax; /* Size of the templtes stack */ - xsltTemplatePtr *templTab; /* the template stack */ - - xsltStackElemPtr vars; /* the current variable list */ - int varsNr; /* Nb of variable list in the stack */ - int varsMax; /* Size of the variable list stack */ - xsltStackElemPtr *varsTab; /* the variable list stack */ - int varsBase; /* the var base for current templ */ - - /* - * Extensions - */ - xmlHashTablePtr extFunctions; /* the extension functions */ - xmlHashTablePtr extElements; /* the extension elements */ - xmlHashTablePtr extInfos; /* the extension data */ - - const xmlChar *mode; /* the current mode */ - const xmlChar *modeURI; /* the current mode URI */ - - xsltDocumentPtr docList; /* the document list */ - - xsltDocumentPtr document; /* the current document */ - xmlNodePtr node; /* the current node being processed */ - xmlNodeSetPtr nodeList; /* the current node list */ - /* xmlNodePtr current; the node */ - - xmlDocPtr output; /* the resulting document */ - xmlNodePtr insert; /* the insertion node */ - - xmlXPathContextPtr xpathCtxt; /* the XPath context */ - xsltTransformState state; /* the current state */ - - /* - * Global variables - */ - xmlHashTablePtr globalVars; /* the global variables and params */ - - xmlNodePtr inst; /* the instruction in the stylesheet */ - - int xinclude; /* should XInclude be processed */ - - const char * outputFile; /* the output URI if known */ - - int profile; /* is this run profiled */ - long prof; /* the current profiled value */ - int profNr; /* Nb of templates in the stack */ - int profMax; /* Size of the templtaes stack */ - long *profTab; /* the profile template stack */ - - void *_private; /* user defined data */ -}; - - -CHECK_STOPPED -#define CHECK_STOPPED if (ctxt->state == XSLT_STATE_STOPPED) return; - - -CHECK_STOPPEDE -#define CHECK_STOPPEDE if (ctxt->state == XSLT_STATE_STOPPED) goto error; - - -CHECK_STOPPED0 -#define CHECK_STOPPED0 if (ctxt->state == XSLT_STATE_STOPPED) return(0); - - -xsltNewStylesheet -xsltStylesheetPtr -void - - -xsltParseStylesheetFile -xsltStylesheetPtr -const xmlChar* filename - - -xsltFreeStylesheet -void -xsltStylesheetPtr sheet - - -xsltIsBlank -int -xmlChar *str - - -xsltFreeStackElemList -void -xsltStackElemPtr elem - - -xsltDecimalFormatGetByName -xsltDecimalFormatPtr -xsltStylesheetPtr sheet,xmlChar *name - - -xsltParseStylesheetProcess -xsltStylesheetPtr -xsltStylesheetPtr ret,xmlDocPtr doc - - -xsltParseStylesheetOutput -void -xsltStylesheetPtr style,xmlNodePtr cur - - -xsltParseStylesheetDoc -xsltStylesheetPtr -xmlDocPtr doc - - -xsltLoadStylesheetPI -xsltStylesheetPtr -xmlDocPtr doc - - -xsltNumberFormat -void -xsltTransformContextPtr ctxt,xsltNumberDataPtr data,xmlNodePtr node - - -xsltFormatNumberConversion -xmlXPathError -xsltDecimalFormatPtr self,xmlChar *format,double number,xmlChar **result - - -xsltParseTemplateContent -void -xsltStylesheetPtr style,xmlNodePtr templ - - LIBXSLT_DOTTED_VERSION #define LIBXSLT_DOTTED_VERSION "1.0.10" @@ -1546,3 +1065,484 @@ xsltStylesheetPtr style LIBXSLT_PUBLIC #define LIBXSLT_PUBLIC + +XSLT_MAX_SORT +#define XSLT_MAX_SORT 5 + + +XSLT_PAT_NO_PRIORITY +#define XSLT_PAT_NO_PRIORITY -12345789 + + +xsltTemplate + + +xsltTemplatePtr +typedef xsltTemplate *xsltTemplatePtr; + + +xsltTemplate +struct xsltTemplate { + struct _xsltTemplate *next;/* chained list sorted by priority */ + struct _xsltStylesheet *style;/* the containing stylesheet */ + xmlChar *match; /* the matching string */ + float priority; /* as given from the stylesheet, not computed */ + xmlChar *name; /* the local part of the name QName */ + xmlChar *nameURI; /* the URI part of the name QName */ + xmlChar *mode; /* the local part of the mode QName */ + xmlChar *modeURI; /* the URI part of the mode QName */ + xmlNodePtr content; /* the template replacement value */ + xmlNodePtr elem; /* the source element */ + + int inheritedNsNr; /* number of inherited namespaces */ + xmlNsPtr *inheritedNs;/* inherited non-excluded namespaces */ + + /* Profiling informations */ + int nbCalls; /* the number of time the template was called */ + unsigned long time; /* the time spent in this template */ +}; + + +xsltDecimalFormat + + +xsltDecimalFormatPtr +typedef xsltDecimalFormat *xsltDecimalFormatPtr; + + +xsltDecimalFormat +struct xsltDecimalFormat { + struct _xsltDecimalFormat *next; /* chained list */ + xmlChar *name; + /* Used for interpretation of pattern */ + xmlChar *digit; + xmlChar *patternSeparator; + /* May appear in result */ + xmlChar *minusSign; + xmlChar *infinity; + xmlChar *noNumber; /* Not-a-number */ + /* Used for interpretation of pattern and may appear in result */ + xmlChar *decimalPoint; + xmlChar *grouping; + xmlChar *percent; + xmlChar *permille; + xmlChar *zeroDigit; +}; + + +xsltDocument + + +xsltDocumentPtr +typedef xsltDocument *xsltDocumentPtr; + + +xsltDocument +struct xsltDocument { + struct _xsltDocument *next; /* documents are kept in a chained list */ + int main; /* is this the main document */ + xmlDocPtr doc; /* the parsed document */ + void *keys; /* key tables storage */ +}; + + +xsltTransformContext + + +xsltTransformContextPtr +typedef xsltTransformContext *xsltTransformContextPtr; + + +xsltElemPreComp + + +xsltElemPreCompPtr +typedef xsltElemPreComp *xsltElemPreCompPtr; + + +xsltTransformFunction +void +xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp + + +xsltStyleType +typedef enum { + XSLT_FUNC_COPY=1, + XSLT_FUNC_SORT, + XSLT_FUNC_TEXT, + XSLT_FUNC_ELEMENT, + XSLT_FUNC_ATTRIBUTE, + XSLT_FUNC_COMMENT, + XSLT_FUNC_PI, + XSLT_FUNC_COPYOF, + XSLT_FUNC_VALUEOF, + XSLT_FUNC_NUMBER, + XSLT_FUNC_APPLYIMPORTS, + XSLT_FUNC_CALLTEMPLATE, + XSLT_FUNC_APPLYTEMPLATES, + XSLT_FUNC_CHOOSE, + XSLT_FUNC_IF, + XSLT_FUNC_FOREACH, + XSLT_FUNC_DOCUMENT, + XSLT_FUNC_WITHPARAM, + XSLT_FUNC_PARAM, + XSLT_FUNC_VARIABLE, + XSLT_FUNC_WHEN, + XSLT_FUNC_EXTENSION +} xsltStyleType; + + +xsltElemPreCompDeallocator +void +xsltElemPreCompPtr comp + + +xsltElemPreComp +struct xsltElemPreComp { + xsltElemPreCompPtr next; /* chained list */ + xsltStyleType type; /* type of the element */ + xsltTransformFunction func; /* handling function */ + xmlNodePtr inst; /* the instruction */ + + /* end of common part */ + xsltElemPreCompDeallocator free; /* the deallocator */ +}; + + +xsltStylePreComp + + +xsltStylePreCompPtr +typedef xsltStylePreComp *xsltStylePreCompPtr; + + +xsltStylePreComp +struct xsltStylePreComp { + xsltElemPreCompPtr next; /* chained list */ + xsltStyleType type; /* type of the element */ + xsltTransformFunction func; /* handling function */ + xmlNodePtr inst; /* the instruction */ + + /* + * Pre computed values + */ + + xmlChar *stype; /* sort */ + int has_stype; /* sort */ + int number; /* sort */ + xmlChar *order; /* sort */ + int has_order; /* sort */ + int descending; /* sort */ + + xmlChar *use; /* copy, element */ + int has_use; /* copy, element */ + + int noescape; /* text */ + + xmlChar *name; /* element, attribute, pi */ + int has_name; /* element, attribute, pi */ + xmlChar *ns; /* element */ + int has_ns; /* element */ + + xmlChar *mode; /* apply-templates */ + xmlChar *modeURI; /* apply-templates */ + + xmlChar *test; /* if */ + + xsltTemplatePtr templ; /* call-template */ + + xmlChar *select; /* sort, copy-of, value-of, apply-templates */ + + int ver11; /* document */ + xmlChar *filename; /* document URL */ + int has_filename; /* document */ + + xsltNumberData numdata; /* number */ + + xmlXPathCompExprPtr comp; /* a precompiled XPath expression */ + xmlNsPtr *nsList; /* the namespaces in scope */ + int nsNr; /* the number of namespaces in scope */ +}; + + +xsltStackElem + + +xsltStackElemPtr +typedef xsltStackElem *xsltStackElemPtr; + + +xsltStackElem +struct xsltStackElem { + struct _xsltStackElem *next;/* chained list */ + xsltStylePreCompPtr comp; /* the compiled form */ + int computed; /* was the evaluation done */ + xmlChar *name; /* the local part of the name QName */ + xmlChar *nameURI; /* the URI part of the name QName */ + xmlChar *select; /* the eval string */ + xmlNodePtr tree; /* the tree if no eval string or the location */ + xmlXPathObjectPtr value; /* The value if computed */ +}; + + +xsltStylesheet + + +xsltStylesheetPtr +typedef xsltStylesheet *xsltStylesheetPtr; + + +xsltStylesheet +struct xsltStylesheet { + /* + * The stylesheet import relation is kept as a tree + */ + struct _xsltStylesheet *parent; + struct _xsltStylesheet *next; + struct _xsltStylesheet *imports; + + xsltDocumentPtr docList; /* the include document list */ + + /* + * General data on the style sheet document + */ + xmlDocPtr doc; /* the parsed XML stylesheet */ + xmlHashTablePtr stripSpaces;/* the hash table of the strip-space and + preserve space elements */ + int stripAll; /* strip-space * (1) preserve-space * (-1) */ + xmlHashTablePtr cdataSection;/* the hash table of the cdata-section */ + + /* + * Global variable or parameters + */ + xsltStackElemPtr variables; /* linked list of param and variables */ + + /* + * Template descriptions + */ + xsltTemplatePtr templates; /* the ordered list of templates */ + void *templatesHash; /* hash table or wherever compiled templates + informations are stored */ + void *rootMatch; /* template based on / */ + void *keyMatch; /* template based on key() */ + void *elemMatch; /* template based on * */ + void *attrMatch; /* template based on @* */ + void *parentMatch; /* template based on .. */ + void *textMatch; /* template based on text() */ + void *piMatch; /* template based on processing-instruction() */ + void *commentMatch; /* template based on comment() */ + + /* + * Namespace aliases + */ + xmlHashTablePtr nsAliases; /* the namespace alias hash tables */ + + /* + * Attribute sets + */ + xmlHashTablePtr attributeSets;/* the attribute sets hash tables */ + + /* + * Namespaces + */ + xmlHashTablePtr nsHash; /* the set of namespaces in use */ + void *nsDefs; /* the namespaces defined */ + + /* + * Key definitions + */ + void *keys; /* key definitions */ + + /* + * Output related stuff. + */ + xmlChar *method; /* the output method */ + xmlChar *methodURI; /* associated namespace if any */ + xmlChar *version; /* version string */ + xmlChar *encoding; /* encoding string */ + int omitXmlDeclaration; /* omit-xml-declaration = "yes" | "no" */ + + /* Number formatting */ + xsltDecimalFormatPtr decimalFormat; + int standalone; /* standalone = "yes" | "no" */ + xmlChar *doctypePublic; /* doctype-public string */ + xmlChar *doctypeSystem; /* doctype-system string */ + int indent; /* should output being indented */ + xmlChar *mediaType; /* media-type string */ + + /* + * Precomputed blocks + */ + xsltElemPreCompPtr preComps;/* list of precomputed blocks */ + int warnings; /* number of warnings found at compilation */ + int errors; /* number of errors found at compilation */ + + xmlChar *exclPrefix; /* last excluded prefixes */ + xmlChar **exclPrefixTab; /* array of excluded prefixes */ + int exclPrefixNr; /* number of excluded prefixes in scope */ + int exclPrefixMax; /* size of the array */ + + void *_private; /* user defined data */ + + /* + * Extensions + */ + xmlHashTablePtr extInfos; /* the extension data */ +}; + + +xsltOutputType +typedef enum { + XSLT_OUTPUT_XML = 0, + XSLT_OUTPUT_HTML, + XSLT_OUTPUT_TEXT +} xsltOutputType; + + +xsltTransformState +typedef enum { + XSLT_STATE_OK = 0, + XSLT_STATE_ERROR, + XSLT_STATE_STOPPED +} xsltTransformState; + + +xsltTransformContext +struct xsltTransformContext { + xsltStylesheetPtr style; /* the stylesheet used */ + xsltOutputType type; /* the type of output */ + + xsltTemplatePtr templ; /* the current template */ + int templNr; /* Nb of templates in the stack */ + int templMax; /* Size of the templtes stack */ + xsltTemplatePtr *templTab; /* the template stack */ + + xsltStackElemPtr vars; /* the current variable list */ + int varsNr; /* Nb of variable list in the stack */ + int varsMax; /* Size of the variable list stack */ + xsltStackElemPtr *varsTab; /* the variable list stack */ + int varsBase; /* the var base for current templ */ + + /* + * Extensions + */ + xmlHashTablePtr extFunctions; /* the extension functions */ + xmlHashTablePtr extElements; /* the extension elements */ + xmlHashTablePtr extInfos; /* the extension data */ + + const xmlChar *mode; /* the current mode */ + const xmlChar *modeURI; /* the current mode URI */ + + xsltDocumentPtr docList; /* the document list */ + + xsltDocumentPtr document; /* the current document */ + xmlNodePtr node; /* the current node being processed */ + xmlNodeSetPtr nodeList; /* the current node list */ + /* xmlNodePtr current; the node */ + + xmlDocPtr output; /* the resulting document */ + xmlNodePtr insert; /* the insertion node */ + + xmlXPathContextPtr xpathCtxt; /* the XPath context */ + xsltTransformState state; /* the current state */ + + /* + * Global variables + */ + xmlHashTablePtr globalVars; /* the global variables and params */ + + xmlNodePtr inst; /* the instruction in the stylesheet */ + + int xinclude; /* should XInclude be processed */ + + const char * outputFile; /* the output URI if known */ + + int profile; /* is this run profiled */ + long prof; /* the current profiled value */ + int profNr; /* Nb of templates in the stack */ + int profMax; /* Size of the templtaes stack */ + long *profTab; /* the profile template stack */ + + void *_private; /* user defined data */ +}; + + +CHECK_STOPPED +#define CHECK_STOPPED if (ctxt->state == XSLT_STATE_STOPPED) return; + + +CHECK_STOPPEDE +#define CHECK_STOPPEDE if (ctxt->state == XSLT_STATE_STOPPED) goto error; + + +CHECK_STOPPED0 +#define CHECK_STOPPED0 if (ctxt->state == XSLT_STATE_STOPPED) return(0); + + +xsltNewStylesheet +xsltStylesheetPtr +void + + +xsltParseStylesheetFile +xsltStylesheetPtr +const xmlChar* filename + + +xsltFreeStylesheet +void +xsltStylesheetPtr sheet + + +xsltIsBlank +int +xmlChar *str + + +xsltFreeStackElemList +void +xsltStackElemPtr elem + + +xsltDecimalFormatGetByName +xsltDecimalFormatPtr +xsltStylesheetPtr sheet,xmlChar *name + + +xsltParseStylesheetProcess +xsltStylesheetPtr +xsltStylesheetPtr ret,xmlDocPtr doc + + +xsltParseStylesheetOutput +void +xsltStylesheetPtr style,xmlNodePtr cur + + +xsltParseStylesheetDoc +xsltStylesheetPtr +xmlDocPtr doc + + +xsltLoadStylesheetPI +xsltStylesheetPtr +xmlDocPtr doc + + +xsltNumberFormat +void +xsltTransformContextPtr ctxt,xsltNumberDataPtr data,xmlNodePtr node + + +xsltFormatNumberConversion +xmlXPathError +xsltDecimalFormatPtr self,xmlChar *format,double number,xmlChar **result + + +xsltParseTemplateContent +void +xsltStylesheetPtr style,xmlNodePtr templ + diff --git a/doc/libxslt-refs.xml b/doc/libxslt-refs.xml index 520a3e30..3dea1054 100644 --- a/doc/libxslt-refs.xml +++ b/doc/libxslt-refs.xml @@ -566,12 +566,12 @@ + - @@ -686,8 +686,8 @@ - + @@ -711,19 +711,16 @@ + - - + - - - @@ -738,17 +735,15 @@ + + + - - - - - @@ -837,6 +832,11 @@ + + + + + @@ -897,9 +897,9 @@ + - @@ -916,9 +916,9 @@ - + @@ -947,11 +947,6 @@ - - - - - @@ -994,6 +989,11 @@ + + + + + @@ -1007,8 +1007,6 @@ - - @@ -1086,6 +1084,8 @@ + + diff --git a/python/libxsl.py b/python/libxsl.py index 1ac305fd..85f24ddc 100644 --- a/python/libxsl.py +++ b/python/libxsl.py @@ -1,3 +1,4 @@ +import _libxml import _libxslt from libxml2 import * diff --git a/python/libxslt-python-api.xml b/python/libxslt-python-api.xml index 6ef7a1b5..03a02f20 100644 --- a/python/libxslt-python-api.xml +++ b/python/libxslt-python-api.xml @@ -19,6 +19,10 @@ + + Cleanup all libxslt and libxml2 memory allocated + +