From 4f96e211a5a49f53deb773592c0c312ddcdbab55 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Thu, 17 May 2001 15:26:12 +0000 Subject: [PATCH] - libxslt/functions.c libxslt/transform.c libxslt/xsltInternals.h: add ctxt->inst to allow stylesheet element lookup (needed for document() fix) - libxslt/*.[ch]: generate docs for the structures and macros, general cleanup for docs - doc/html/*.html: regenerated all docs Daniel --- ChangeLog | 7 +- doc/html/book1.html | 19 +- doc/html/libxslt-attributes.html | 34 ++- doc/html/libxslt-functions.html | 161 +++++------- doc/html/libxslt-imports.html | 72 +++-- doc/html/libxslt-keys.html | 74 ++++-- doc/html/libxslt-lib.html | 3 +- doc/html/libxslt-namespaces.html | 61 +++-- doc/html/libxslt-notes.html | 3 +- doc/html/libxslt-numbersinternals.html | 41 +-- doc/html/libxslt-pattern.html | 76 ++++-- doc/html/libxslt-templates.html | 74 +++++- doc/html/libxslt-transform.html | 144 ++++++++-- doc/html/libxslt-variables.html | 271 ++++++++----------- doc/html/libxslt-xslt.html | 21 +- doc/html/libxslt-xsltinternals.html | 463 +++++++++++++++++++++++---------- doc/html/libxslt-xsltutils.html | 396 +++++++--------------------- libxslt/extensions.c | 12 +- libxslt/functions.h | 2 - libxslt/imports.c | 6 +- libxslt/keys.c | 2 +- libxslt/namespaces.c | 2 +- libxslt/numbers.c | 21 +- libxslt/pattern.c | 2 +- libxslt/preproc.c | 2 +- libxslt/variables.c | 2 +- libxslt/variables.h | 5 +- libxslt/xslt.c | 2 + libxslt/xsltInternals.h | 29 +++ libxslt/xsltconfig.h.in | 27 ++ libxslt/xsltutils.h | 33 ++- 31 files changed, 1158 insertions(+), 909 deletions(-) diff --git a/ChangeLog b/ChangeLog index c3ecd73..bed2f0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,11 @@ -Thu May 17 13:54:48 CEST 2001 Daniel Veillard +Thu May 17 17:24:35 CEST 2001 Daniel Veillard * libxslt/functions.c libxslt/transform.c libxslt/xsltInternals.h: add ctxt->inst to allow stylesheet element lookup (needed for document() fix) - * libxslt/*.h: tried to generate docs for the structures and - macros + * libxslt/*.[ch]: generate docs for the structures and + macros, general cleanup for docs + * doc/html/*.html: regenerated all docs Wed May 16 23:00:53 CEST 2001 Daniel Veillard diff --git a/doc/html/book1.html b/doc/html/book1.html index e0117f1..4492803 100644 --- a/doc/html/book1.html +++ b/doc/html/book1.html @@ -4,11 +4,12 @@ >Gnome XSLT Library Reference Manual

Daniel Veillard

Daniel Veillard
Copyright © 2001 by Daniel Veillard

attributes

Name

Synopsis

Description

Details

 


an XSLT stylesheet


the set list.

functions

Name

Synopsis

ctxt, int nargs); void xsltXXXFunction (xmlXPathParserContextPtr ctxt, - int nargs); -void xsltRegisterAllFunctions (

Description

Details

the number of arguments


the number of arguments


the number of arguments


the number of arguments


the number of arguments


the number of arguments


the number of arguments



xsltXXXFunction ()

void        xsltXXXFunction                 (xmlXPathParserContextPtr ctxt,
-                                             int nargs);

the XPath Parser context the number of arguments
 


the XPath context

imports

Name

Synopsis

Description

Details

a macro to import pointers from the stylesheet cascading order

 


a macro to import intergers from the stylesheet cascading order

 


 


 


the next stylesheet or NULL if it was the last one


1 if space should be stripped, 0 if not, and 2 if everything should be CDTATA wrapped.


the xsltTemplatePtr or NULL if not found

keys

Name

Synopsis

xsltTransformContextPtr ctxt, - xsltDocumentPtrxsltDocumentPtr doc); void xsltFreeDocumentKeys (xsltDocumentPtr (xsltDocumentPtr doc);

Description

Details

0 in case of success, and -1 in case of failure.


the nodeset resulting from the query or NULL


xsltTransformContextPtr ctxt, - xsltDocumentPtrxsltDocumentPtr doc);

an XSLT document


an XSLT stylesheet


void        xsltFreeDocumentKeys            (xsltDocumentPtrvoid        xsltFreeDocumentKeys            (xsltDocumentPtr doc);

Free the keys associated to a document

a XSLT document

Libxslt Library Referencenamespaces

Name

Synopsis

Description

Details

the xsl:namespace-alias node


the namespace node to use or NULL


Find the right namespace value for this URI, if needed create +and add a new namespace decalaration on the node

a transformation context the input node the namespace URI the suggested prefix the output node (or its parent)the namespace node to use or NULL
 
 
 
 
 


a new xmlNsPtr, or NULL in case of error.


an XSLT stylesheet

Libxml Programming NotesnumbersInternals

Name

Synopsis

xsltFormatNumberConversion (xsltDecimalFormatPtr (xsltDecimalFormatPtr,

Description

Details

xmlXPathError xsltFormatNumberConversion (xsltDecimalFormatPtr xsltFormatNumberConversion (xsltDecimalFormatPtr,

 


 

pattern

Name

Synopsis

Description

Details



the generated pattern list or NULL in case of failure


an XSLT comp list


1 if it matches, 0 if it doesn't and -1 in case of failure


-1 in case of error, 0 otherwise


the xsltTemplatePtr or NULL if not found


an XSLT stylesheet


an XSLT stylesheet


 

templates

Name

Synopsis

Description

Details

1 is the predicate was true, 0 otherwise


the computed string value or NULL, must be deallocated by the caller.


the computed string value or NULL, must be deallocated by the caller.


the static string value or NULL, must be deallocated by the caller.


the computed string value or NULL, must be deallocated by the caller.


the computed tree replacement


a new xmlAttrPtr, or NULL in case of error.


the attribute replacement.


the computed string value or NULL, must be deallocated by the caller.

transform

Name

Synopsis

Description

Details

the result document or NULL in case of error


is this a real template processing


precomputed informations


precomputed informations


precomputed informations


precomputed informations


precomputed informations


precomputed informations


precomputed informations


precomputed informations


precomputed informations


precomputed informations


precomputed informations


precomputed informations


precomputed informations


precomputed informations


precomputed informations


precomputed informations


precomputed informations

variables

Name

Synopsis

ctxt, const char **params); void xsltPushStack (xsltTransformContextPtr ctxt); -void xsltPopStack (xsltTransformContextPtr ctxt); -void xsltParseGlobalVariable (xsltStackElemPtr elems); void xsltFreeVariableHashes (xsltFreeGlobalVariables (xsltTransformContextPtr ctxt); @@ -294,7 +281,7 @@ HREF="XMLCHAR" >

Description

Details

registering macro, not general purpose at all but used in different modules

 


0 in case of success, -1 in case of error


0 in case of success, -1 in case of error


xsltPushStack ()

void        xsltPushStack                   (xsltTransformContextPtr ctxt);

ctxt :


xsltPopStack ()

void        xsltPopStack                    (xsltTransformContextPtr ctxt);

ctxt :


the "variable" element


the "param" element


the "variable" element


the "param" element


 


0 in case of success, -1 in case of failure.


xsltFreeVariableHashes ()

xsltFreeGlobalVariables ()

void        xsltFreeVariableHashes          (void        xsltFreeGlobalVariables         (xsltTransformContextPtr ctxt);

Free up the data associated to the global variables +its value.

the XSLT transformation context


This is the entry point when a varibale is needed by the XPath -interpretor.

Search in the Variable array of the context for the given +variable value.

the XSLT transformation context
a void * but the the XSLT transformation context actually
the value or NULL if not found


This is the entry point when a varibale is needed by the XPath +interpretor.

a void * but the the XSLT transformation context actually the variable name the variable namespace URIthe value or NULL if not found
 
 
 

xslt

The default version of XSLT supported





xsltInternals

Name

Synopsis

XSLT_MAX_SORT -enum xsltElem; -struct xsltStackElem; -typedef xsltStackElemPtr; #define XSLT_PAT_NO_PRIORITYxsltDecimalFormat; +typedef xsltDecimalFormatPtr; +struct xsltDocument; +typedef xsltDocumentPtr; struct xsltTransformContextxsltStyleType; struct xsltStackElem; +typedef xsltStackElemPtr; +struct xsltStylesheet; @@ -281,9 +290,9 @@ HREF="libxslt-xsltinternals.html#XSLTFREESTACKELEMLIST" HREF="libxslt-xsltinternals.html#XSLTSTACKELEMPTR" >xsltStackElemPtr elem); -xsltDecimalFormatPtrxsltDecimalFormatPtr xsltDecimalFormatGetByName xsltFormatNumberConversion (xsltDecimalFormatPtr (xsltDecimalFormatPtr self,

Description

Details


enum xsltElem

XSLT_PAT_NO_PRIORITY

typedef enum {
-    XSLT_ELEM_VARIABLE=1,
-    XSLT_ELEM_PARAM
-} xsltElem;
#define XSLT_PAT_NO_PRIORITY -12345789

specific value for pattern without priority expressed


struct xsltStackElem

struct xsltTemplate

struct xsltStackElem {
-    struct _xsltStackElem *next;/* chained list */
-    xsltElem type;	/* type of the element */
-    int computed;	/* was the evaluation done */
+>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 *select;	/* the eval string */
-    xmlNodePtr tree;	/* the tree if no eval string or the location */
-    xmlXPathObjectPtr value; /* The value if computed */
+    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 */
 };

The in-memory structure corresponding to an XSLT Template


xsltStackElemPtr

xsltTemplatePtr

typedef xsltStackElem *xsltStackElemPtr;
typedef xsltTemplate *xsltTemplatePtr;

XSLT_PAT_NO_PRIORITY

struct xsltDecimalFormat

#define XSLT_PAT_NO_PRIORITY -12345789
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; +};

Data structure of decimal-format


struct xsltTemplate

xsltDecimalFormatPtr

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 */
-};
typedef xsltDecimalFormat *xsltDecimalFormatPtr;

xsltTemplatePtr

struct xsltDocument

typedef xsltTemplate *xsltTemplatePtr;
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 */ +};

Data structure associated to a parsed document


struct xsltDecimalFormat

xsltDocumentPtr

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;
-} xsltDecimalFormat, *xsltDecimalFormatPtr;
-
-/*
- * Data structure associated to a document
- */
-
-typedef struct _xsltDocument xsltDocument;
-typedef xsltDocument *xsltDocumentPtr;
-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 */
-};
typedef xsltDocument *xsltDocumentPtr;





signature of the function associated to elements part of the +stylesheet language like xsl:if or xsl:apply-templates.

 



struct 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 */
+};


xsltStackElemPtr

typedef xsltStackElem *xsltStackElemPtr;









the newly allocated xsltStylesheetPtr or NULL in case of error


a new XSLT stylesheet structure.


an XSLT stylesheet


Check if a string is ignorable

1 if the string is NULL or made of blanks chars, 0 otherwise


an XSLT stack element


xsltDecimalFormatPtrxsltDecimalFormatPtr xsltDecimalFormatGetByName
                                             (

 


a new XSLT stylesheet structure.


 


a new XSLT stylesheet structure.


Convert one number.

the XSLT transformation context the formatting informations the data to format
 
 
 


xmlXPathError xsltFormatNumberConversion (xsltDecimalFormatPtr xsltFormatNumberConversion (xsltDecimalFormatPtr self,

format-number() uses the JDK 1.1 DecimalFormat class:

http://java.sun.com/products/jdk/1.1/docs/api/java.text.DecimalFormat.html

Structure:

pattern := subpattern{;subpattern} +subpattern := {prefix}integer{.fraction}{suffix} +prefix := '\\u0000'..'\\uFFFD' - specialCharacters +suffix := '\\u0000'..'\\uFFFD' - specialCharacters +integer := '#'* '0'* '0' +fraction := '0'* '#'*

Notation: +X* 0 or more instances of X +(X | Y) either X or Y. +X..Y any character from X up to Y, inclusive. +S - T characters in S, except those in T

Special Characters:

Symbol Meaning +0 a digit +# a digit, zero shows as absent +. placeholder for decimal separator +, placeholder for grouping separator. +; separates formats. +- default negative prefix. +% multiply by 100 and show as percentage +? multiply by 1000 and show as per mille +X any other characters can be used in the prefix or suffix +' used to quote special characters in a prefix or suffix.

the decimal format the format requested the value to format the place to ouput the result
 
 
 
 
 

xsltutils

Name

Synopsis

-int xmlXPathIsNodeType (const xmlChar *name); -xmlChar* xmlSplitQName2 (const xmlChar *name, - xmlChar **prefix); -void xmlXPathBooleanFunction (xmlXPathParserContextPtr ctxt, - int nargs); #define TODO

Description

Details

xmlXPathIsNodeType ()

int         xmlXPathIsNodeType              (const xmlChar *name);

name : 
Returns :


xmlSplitQName2 ()

xmlChar*    xmlSplitQName2                  (const xmlChar *name,
-                                             xmlChar **prefix);

name : 
prefix : 
Returns :


xmlXPathBooleanFunction ()

void        xmlXPathBooleanFunction         (xmlXPathParserContextPtr ctxt,
-                                             int nargs);

ctxt : 
nargs :




Checks that the element pertains to XSLt namespace

 


Checks the value of an element in XSLT namespace

 






The node containing the message instruction


the new handler function


the new handler function


the node set


the number of sorts in the array


the number of byte written or -1 in case of failure.


the number of byte written or -1 in case of failure.


the number of byte written or -1 in case of failure.


the number of byte written or -1 in case of failure.

nsDefs); } -/* +/** * xsltRegisterExtPrefix: * @style: an XSLT stylesheet * @prefix: the prefix used @@ -156,7 +156,7 @@ xsltRegisterExtPrefix(xsltStylesheetPtr style, return(0); } -/* +/** * xsltRegisterExtFunction: * @ctxt: an XSLT transformation context * @name: the name of the element @@ -178,7 +178,7 @@ xsltRegisterExtFunction(xsltTransformContextPtr ctxt, const xmlChar *name, return(xmlHashAddEntry2(ctxt->extFunctions, name, URI, (void *) function)); } -/* +/** * xsltRegisterExtElement: * @ctxt: an XSLT transformation context * @name: the name of the element @@ -200,7 +200,7 @@ xsltRegisterExtElement(xsltTransformContextPtr ctxt, const xmlChar *name, return(xmlHashAddEntry2(ctxt->extElements, name, URI, (void *) function)); } -/* +/** * xsltFreeCtxtExts: * @ctxt: an XSLT transformation context * @@ -214,7 +214,7 @@ xsltFreeCtxtExts(xsltTransformContextPtr ctxt) { xmlHashFree(ctxt->extFunctions, NULL); } -/* +/** * xsltCheckExtPrefix: * @style: the stylesheet * @prefix: the namespace prefix (possibly NULL) diff --git a/libxslt/functions.h b/libxslt/functions.h index e333f67..7a00b71 100644 --- a/libxslt/functions.h +++ b/libxslt/functions.h @@ -38,8 +38,6 @@ void xsltElementAvailableFunction (xmlXPathParserContextPtr ctxt, int nargs); void xsltFunctionAvailableFunction (xmlXPathParserContextPtr ctxt, int nargs); -void xsltXXXFunction (xmlXPathParserContextPtr ctxt, - int nargs); /* * And the registration diff --git a/libxslt/imports.c b/libxslt/imports.c index 15e80a4..98aa6ea 100644 --- a/libxslt/imports.c +++ b/libxslt/imports.c @@ -191,8 +191,8 @@ xsltNextImport(xsltStylesheetPtr cur) { /** * xsltFindElemSpaceHandling: - * ctxt: an XSLT transformation context - * node: an XML node + * @ctxt: an XSLT transformation context + * @node: an XML node * * Find strip-space or preserve-space informations for an element * respect the import precedence or the wildcards @@ -231,7 +231,7 @@ xsltFindElemSpaceHandling(xsltTransformContextPtr ctxt, xmlNodePtr node) { /** * xsltFindTemplate: - * ctxt: an XSLT transformation context + * @ctxt: an XSLT transformation context * @name: the template name * @nameURI: the template name URI * diff --git a/libxslt/keys.c b/libxslt/keys.c index be27b6c..0ac0018 100644 --- a/libxslt/keys.c +++ b/libxslt/keys.c @@ -435,7 +435,7 @@ xsltInitCtxtKeys(xsltTransformContextPtr ctxt, xsltDocumentPtr doc) { } } -/* +/** * xsltFreeDocumentKeys: * @doc: a XSLT document * diff --git a/libxslt/namespaces.c b/libxslt/namespaces.c index b70670d..211756d 100644 --- a/libxslt/namespaces.c +++ b/libxslt/namespaces.c @@ -120,7 +120,7 @@ error: } /** - * xsltGetSpecificNamespace: + * xsltGetSpecialNamespace: * @ctxt: a transformation context * @cur: the input node * @URI: the namespace URI diff --git a/libxslt/numbers.c b/libxslt/numbers.c index 106b80c..9775884 100644 --- a/libxslt/numbers.c +++ b/libxslt/numbers.c @@ -120,12 +120,6 @@ isinf(double number) } #endif -/************************************************************************ - * - * xsltNumberFormat - * - * Convert one number. - */ static void xsltNumberFormatDecimal(xmlBufferPtr buffer, double number, @@ -581,6 +575,14 @@ xsltNumberFormatGetValue(xmlXPathContextPtr context, return amount; } +/** + * xsltNumberFormat: + * @ctxt: the XSLT transformation context + * @data: the formatting informations + * @node: the data to format + * + * Convert one number. + */ void xsltNumberFormat(xsltTransformContextPtr ctxt, xsltNumberDataPtr data, @@ -744,7 +746,12 @@ xsltFormatNumberPreSuffix(xsltDecimalFormatPtr self, xmlChar **format, xsltForma } } -/************************************************************************ +/** + * xsltFormatNumberConversion: + * @self: the decimal format + * @format: the format requested + * @number: the value to format + * @result: the place to ouput the result * * format-number() uses the JDK 1.1 DecimalFormat class: * diff --git a/libxslt/pattern.c b/libxslt/pattern.c index 94fe45c..50a15be 100644 --- a/libxslt/pattern.c +++ b/libxslt/pattern.c @@ -1353,7 +1353,7 @@ error: /** * xsltCompilePattern: - * @pattern an XSLT pattern + * @pattern: an XSLT pattern * @doc: the containing document * @node: the containing element * diff --git a/libxslt/preproc.c b/libxslt/preproc.c index 766cc05..8be8e24 100644 --- a/libxslt/preproc.c +++ b/libxslt/preproc.c @@ -1265,7 +1265,7 @@ xsltFreeStylePreComps(xsltStylesheetPtr style) { } /** - * xsltDocumentCompute: + * xsltStylePreCompute: * @style: the XSLT stylesheet * @inst: the instruction in the stylesheet * diff --git a/libxslt/variables.c b/libxslt/variables.c index 3e1846a..6134126 100644 --- a/libxslt/variables.c +++ b/libxslt/variables.c @@ -1109,7 +1109,7 @@ xsltFreeGlobalVariables(xsltTransformContextPtr ctxt) { } /** - * xsltVariableLookup: + * xsltXPathVariableLookup: * @ctxt: a void * but the the XSLT transformation context actually * @name: the variable name * @ns_uri: the variable namespace URI diff --git a/libxslt/variables.h b/libxslt/variables.h index 7415866..6018fdc 100644 --- a/libxslt/variables.h +++ b/libxslt/variables.h @@ -19,7 +19,7 @@ extern "C" { #endif -/* +/** * XSLT_REGISTER_VARIABLE_LOOKUP: * * registering macro, not general purpose at all but used in different modules @@ -38,8 +38,6 @@ extern "C" { int xsltEvalGlobalVariables (xsltTransformContextPtr ctxt); int xsltEvalUserParams (xsltTransformContextPtr ctxt, const char **params); -void xsltPushStack (xsltTransformContextPtr ctxt); -void xsltPopStack (xsltTransformContextPtr ctxt); void xsltParseGlobalVariable (xsltStylesheetPtr style, xmlNodePtr cur); void xsltParseGlobalParam (xsltStylesheetPtr style, @@ -52,7 +50,6 @@ xsltStackElemPtr xsltParseStylesheetCallerParam (xsltTransformContextPtr ctxt, xmlNodePtr cur); int xsltAddStackElemList (xsltTransformContextPtr ctxt, xsltStackElemPtr elems); -void xsltFreeVariableHashes (xsltTransformContextPtr ctxt); void xsltFreeGlobalVariables (xsltTransformContextPtr ctxt); xmlXPathObjectPtr xsltVariableLookup (xsltTransformContextPtr ctxt, const xmlChar *name, diff --git a/libxslt/xslt.c b/libxslt/xslt.c index 0f3495c..58db062 100644 --- a/libxslt/xslt.c +++ b/libxslt/xslt.c @@ -60,6 +60,8 @@ * xsltIsBlank: * @str: a string * + * Check if a string is ignorable + * * Returns 1 if the string is NULL or made of blanks chars, 0 otherwise */ int diff --git a/libxslt/xsltInternals.h b/libxslt/xsltInternals.h index 7c6e2ad..3886846 100644 --- a/libxslt/xsltInternals.h +++ b/libxslt/xsltInternals.h @@ -27,6 +27,11 @@ extern "C" { */ #define XSLT_MAX_SORT 5 +/** + * XSLT_PAT_NO_PRIORITY: + * + * specific value for pattern without priority expressed + */ #define XSLT_PAT_NO_PRIORITY -12345789 /** @@ -104,6 +109,10 @@ typedef xsltStylePreComp *xsltStylePreCompPtr; /** * xsltTransformFunction: + * @ctxt: the XSLT transformation context + * @node: the input node + * @inst: the stylesheet node + * @comp: the compiled information from the stylesheet * * signature of the function associated to elements part of the * stylesheet language like xsl:if or xsl:apply-templates. @@ -357,8 +366,28 @@ struct _xsltTransformContext { xmlNodePtr inst; /* the instruction in the stylesheet */ }; +/** + * CHECK_STOPPED: + * + * Macro to check if the XSLT processing should be stopped + * will return from the function + */ #define CHECK_STOPPED if (ctxt->state == XSLT_STATE_STOPPED) return; + +/** + * CHECK_STOPPEDE: + * + * Macro to check if the XSLT processing should be stopped + * will goto the error: label + */ #define CHECK_STOPPEDE if (ctxt->state == XSLT_STATE_STOPPED) goto error; + +/** + * CHECK_STOPPED0: + * + * Macro to check if the XSLT processing should be stopped + * will return from the function with a 0 value + */ #define CHECK_STOPPED0 if (ctxt->state == XSLT_STATE_STOPPED) return(0); /* diff --git a/libxslt/xsltconfig.h.in b/libxslt/xsltconfig.h.in index cc4a8c8..63ec259 100644 --- a/libxslt/xsltconfig.h.in +++ b/libxslt/xsltconfig.h.in @@ -15,15 +15,42 @@ extern "C" { #endif +/** + * WITH_XSLT_DEBUG: + * + * Activate the compilation of the debug reporting. Speed penalty + * is insignifiant and being able to run xsltpoc -v is useful. On + * by default unless --without-debug is passed to configure + */ #if @WITH_XSLT_DEBUG@ #define WITH_XSLT_DEBUG #endif #if @WITH_MEM_DEBUG@ +/** + * DEBUG_MEMORY: + * + * should be activated only when debugging libxslt. It replaces the + * allocator with a collect and debug shell to the libc allocator. + * Use configure --with-mem-debug to activate it on both library + */ #define DEBUG_MEMORY + +/** + * DEBUG_MEMORY_LOCATION: + * + * should be activated only when debugging libxslt. + * DEBUG_MEMORY_LOCATION should be activated only when libxml has + * been configured with --with-debug-mem too + */ #define DEBUG_MEMORY_LOCATION #endif +/** + * ATTRIBUTE_UNUSED: + * + * This macro is used to flag unused function parameters to GCC + */ #ifdef __GNUC__ #ifdef HAVE_ANSIDECL_H #include diff --git a/libxslt/xsltutils.h b/libxslt/xsltutils.h index a4d671d..d82d5a1 100644 --- a/libxslt/xsltutils.h +++ b/libxslt/xsltutils.h @@ -17,35 +17,40 @@ extern "C" { #endif -/* - * To cleanup - */ -int xmlXPathIsNodeType(const xmlChar *name); -xmlChar *xmlSplitQName2(const xmlChar *name, xmlChar **prefix); -void xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs); -/********* -void xmlXPathRegisterVariableLookup(xmlXPathContextPtr ctxt, - xmlXPathVariableLookupFunc f, void *data) - *********/ - -/* - * Useful macros +/** + * TODO: + * + * macro to flag unimplemented blocks */ - #define TODO \ xsltGenericError(xsltGenericErrorContext, \ "Unimplemented block at %s:%d\n", \ __FILE__, __LINE__); +/** + * STRANGE: + * + * macro to flag that a problem was detected internally + */ #define STRANGE \ xsltGenericError(xsltGenericErrorContext, \ "Internal error at %s:%d\n", \ __FILE__, __LINE__); +/** + * IS_XSLT_ELEM: + * + * Checks that the element pertains to XSLt namespace + */ #define IS_XSLT_ELEM(n) \ (((n) != NULL) && ((n)->ns != NULL) && \ (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE))) +/** + * IS_XSLT_NAME: + * + * Checks the value of an element in XSLT namespace + */ #define IS_XSLT_NAME(n, val) \ (xmlStrEqual((n)->name, (const xmlChar *) (val))) -- 2.7.4