807e2a67d4f27c59cfd2c3cbd5e1acacfb0342d8
[platform/upstream/libxslt.git] / libxslt / xsltInternals.h
1 /*
2  * Summary: internal data structures, constants and functions
3  * Description: Internal data structures, constants and functions used
4  *              by the XSLT engine. 
5  *              They are not part of the API or ABI, i.e. they can change
6  *              without prior notice, use carefully.
7  *
8  * Copy: See Copyright for the status of this software.
9  *
10  * Author: Daniel Veillard
11  */
12
13 #ifndef __XML_XSLT_INTERNALS_H__
14 #define __XML_XSLT_INTERNALS_H__
15
16 #include <libxml/tree.h>
17 #include <libxml/hash.h>
18 #include <libxml/xpath.h>
19 #include <libxml/xmlerror.h>
20 #include <libxml/dict.h>
21 #include <libxslt/xslt.h>
22 #include "xsltexports.h"
23 #include "numbersInternals.h"
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /**
30  * XSLT_MAX_SORT:
31  *
32  * Max number of specified xsl:sort on an element.
33  */
34 #define XSLT_MAX_SORT 15
35
36 /**
37  * XSLT_PAT_NO_PRIORITY:
38  *
39  * Specific value for pattern without priority expressed.
40  */
41 #define XSLT_PAT_NO_PRIORITY -12345789
42
43 /**
44  * xsltRuntimeExtra:
45  *
46  * Extra information added to the transformation context.
47  */
48 typedef struct _xsltRuntimeExtra xsltRuntimeExtra;
49 typedef xsltRuntimeExtra *xsltRuntimeExtraPtr;
50 struct _xsltRuntimeExtra {
51     void       *info;           /* pointer to the extra data */
52     xmlFreeFunc deallocate;     /* pointer to the deallocation routine */
53     union {                     /* dual-purpose field */
54         void   *ptr;            /* data not needing deallocation */
55         int    ival;            /* integer value storage */
56     } val;
57 };
58
59 /**
60  * XSLT_RUNTIME_EXTRA_LST:
61  * @ctxt: the transformation context
62  * @nr: the index
63  *
64  * Macro used to access extra information stored in the context
65  */
66 #define XSLT_RUNTIME_EXTRA_LST(ctxt, nr) (ctxt)->extras[(nr)].info
67 /**
68  * XSLT_RUNTIME_EXTRA_FREE:
69  * @ctxt: the transformation context
70  * @nr: the index
71  *
72  * Macro used to free extra information stored in the context
73  */
74 #define XSLT_RUNTIME_EXTRA_FREE(ctxt, nr) (ctxt)->extras[(nr)].deallocate
75 /**
76  * XSLT_RUNTIME_EXTRA:
77  * @ctxt: the transformation context
78  * @nr: the index
79  *
80  * Macro used to define extra information stored in the context
81  */
82 #define XSLT_RUNTIME_EXTRA(ctxt, nr, typ) (ctxt)->extras[(nr)].val.typ
83
84 /**
85  * xsltTemplate:
86  *
87  * The in-memory structure corresponding to an XSLT Template.
88  */
89 typedef struct _xsltTemplate xsltTemplate;
90 typedef xsltTemplate *xsltTemplatePtr;
91 struct _xsltTemplate {
92     struct _xsltTemplate *next;/* chained list sorted by priority */
93     struct _xsltStylesheet *style;/* the containing stylesheet */
94     xmlChar *match;     /* the matching string */
95     float priority;     /* as given from the stylesheet, not computed */
96     xmlChar *name;      /* the local part of the name QName */
97     xmlChar *nameURI;   /* the URI part of the name QName */
98     const xmlChar *mode;/* the local part of the mode QName */
99     const xmlChar *modeURI;/* the URI part of the mode QName */
100     xmlNodePtr content; /* the template replacement value */
101     xmlNodePtr elem;    /* the source element */
102
103     int inheritedNsNr;  /* number of inherited namespaces */
104     xmlNsPtr *inheritedNs;/* inherited non-excluded namespaces */
105
106     /* Profiling informations */
107     int nbCalls;        /* the number of time the template was called */
108     unsigned long time; /* the time spent in this template */
109 };
110
111 /**
112  * xsltDecimalFormat:
113  *
114  * Data structure of decimal-format.
115  */
116 typedef struct _xsltDecimalFormat xsltDecimalFormat;
117 typedef xsltDecimalFormat *xsltDecimalFormatPtr;
118 struct _xsltDecimalFormat {
119     struct _xsltDecimalFormat *next; /* chained list */
120     xmlChar *name;
121     /* Used for interpretation of pattern */
122     xmlChar *digit;
123     xmlChar *patternSeparator;
124     /* May appear in result */
125     xmlChar *minusSign;
126     xmlChar *infinity;
127     xmlChar *noNumber; /* Not-a-number */
128     /* Used for interpretation of pattern and may appear in result */
129     xmlChar *decimalPoint;
130     xmlChar *grouping;
131     xmlChar *percent;
132     xmlChar *permille;
133     xmlChar *zeroDigit;
134 };
135
136 /**
137  * xsltDocument:
138  *
139  * Data structure associated to a parsed document.
140  */
141
142 typedef struct _xsltDocument xsltDocument;
143 typedef xsltDocument *xsltDocumentPtr;
144 struct _xsltDocument {
145     struct _xsltDocument *next; /* documents are kept in a chained list */
146     int main;                   /* is this the main document */
147     xmlDocPtr doc;              /* the parsed document */
148     void *keys;                 /* key tables storage */
149     struct _xsltDocument *includes; /* subsidiary includes */
150     int preproc;                /* pre-processing already done */
151 };
152
153 typedef struct _xsltTransformContext xsltTransformContext;
154 typedef xsltTransformContext *xsltTransformContextPtr;
155
156 /**
157  * xsltElemPreComp:
158  *
159  * The in-memory structure corresponding to element precomputed data,
160  * designed to be extended by extension implementors.
161  */
162 typedef struct _xsltElemPreComp xsltElemPreComp;
163 typedef xsltElemPreComp *xsltElemPreCompPtr;
164
165 /**
166  * xsltTransformFunction:
167  * @ctxt: the XSLT transformation context
168  * @node: the input node
169  * @inst: the stylesheet node
170  * @comp: the compiled information from the stylesheet
171  *
172  * Signature of the function associated to elements part of the
173  * stylesheet language like xsl:if or xsl:apply-templates.
174  */
175 typedef void (*xsltTransformFunction) (xsltTransformContextPtr ctxt,
176                                        xmlNodePtr node,
177                                        xmlNodePtr inst,
178                                        xsltElemPreCompPtr comp);
179
180 /**
181  * xsltSortFunc:
182  * @ctxt:    a transformation context
183  * @sorts:   the node-set to sort
184  * @nbsorts: the number of sorts
185  *
186  * Signature of the function to use during sorting
187  */
188 typedef void (*xsltSortFunc) (xsltTransformContextPtr ctxt, xmlNodePtr *sorts,
189                               int nbsorts);
190
191 typedef enum {
192     XSLT_FUNC_COPY=1,
193     XSLT_FUNC_SORT,
194     XSLT_FUNC_TEXT,
195     XSLT_FUNC_ELEMENT,
196     XSLT_FUNC_ATTRIBUTE,
197     XSLT_FUNC_COMMENT,
198     XSLT_FUNC_PI,
199     XSLT_FUNC_COPYOF,
200     XSLT_FUNC_VALUEOF,
201     XSLT_FUNC_NUMBER,
202     XSLT_FUNC_APPLYIMPORTS,
203     XSLT_FUNC_CALLTEMPLATE,
204     XSLT_FUNC_APPLYTEMPLATES,
205     XSLT_FUNC_CHOOSE,
206     XSLT_FUNC_IF,
207     XSLT_FUNC_FOREACH,
208     XSLT_FUNC_DOCUMENT,
209     XSLT_FUNC_WITHPARAM,
210     XSLT_FUNC_PARAM,
211     XSLT_FUNC_VARIABLE,
212     XSLT_FUNC_WHEN,
213     XSLT_FUNC_EXTENSION
214 } xsltStyleType;
215
216 /**
217  * xsltElemPreCompDeallocator:
218  * @comp:  the #xsltElemPreComp to free up
219  *
220  * Deallocates an #xsltElemPreComp structure.
221  */
222 typedef void (*xsltElemPreCompDeallocator) (xsltElemPreCompPtr comp);
223
224 /**
225  * xsltElemPreComp:
226  *
227  * The in-memory structure corresponding to element precomputed data,
228  * designed to be extended by extension implementors.
229  */
230 struct _xsltElemPreComp {
231     xsltElemPreCompPtr next;            /* chained list */
232     xsltStyleType type;                 /* type of the element */
233     xsltTransformFunction func;         /* handling function */
234     xmlNodePtr inst;                    /* the instruction */
235
236     /* end of common part */
237     xsltElemPreCompDeallocator free;    /* the deallocator */
238 };
239
240 /**
241  * xsltStylePreComp:
242  *
243  * The in-memory structure corresponding to XSLT stylesheet constructs
244  * precomputed data.
245  */
246 typedef struct _xsltStylePreComp xsltStylePreComp;
247
248 typedef xsltStylePreComp *xsltStylePreCompPtr;
249
250 struct _xsltStylePreComp {
251     xsltElemPreCompPtr next;    /* chained list */
252     xsltStyleType type;         /* type of the element */
253     xsltTransformFunction func; /* handling function */
254     xmlNodePtr inst;            /* the instruction */
255
256     /*
257      * Pre computed values.
258      */
259
260     const xmlChar *stype;       /* sort */
261     int      has_stype;         /* sort */
262     int      number;            /* sort */
263     const xmlChar *order;       /* sort */
264     int      has_order;         /* sort */
265     int      descending;        /* sort */
266     const xmlChar *lang;        /* sort */
267     int      has_lang;          /* sort */
268     const xmlChar *case_order;  /* sort */
269     int      lower_first;       /* sort */
270
271     const xmlChar *use;         /* copy, element */
272     int      has_use;           /* copy, element */
273
274     int      noescape;          /* text */
275
276     const xmlChar *name;        /* element, attribute, pi */
277     int      has_name;          /* element, attribute, pi */
278     const xmlChar *ns;          /* element */
279     int      has_ns;            /* element */
280
281     const xmlChar *mode;        /* apply-templates */
282     const xmlChar *modeURI;     /* apply-templates */
283
284     const xmlChar *test;        /* if */
285
286     xsltTemplatePtr templ;      /* call-template */
287
288     const xmlChar *select;      /* sort, copy-of, value-of, apply-templates */
289
290     int      ver11;             /* document */
291     const xmlChar *filename;    /* document URL */
292     int      has_filename;      /* document */
293
294     xsltNumberData numdata;     /* number */
295
296     xmlXPathCompExprPtr comp;   /* a precompiled XPath expression */
297     xmlNsPtr *nsList;           /* the namespaces in scope */
298     int nsNr;                   /* the number of namespaces in scope */
299 };
300
301 /*
302  * The in-memory structure corresponding to an XSLT Variable
303  * or Param.
304  */
305
306 typedef struct _xsltStackElem xsltStackElem;
307 typedef xsltStackElem *xsltStackElemPtr;
308 struct _xsltStackElem {
309     struct _xsltStackElem *next;/* chained list */
310     xsltStylePreCompPtr comp;   /* the compiled form */
311     int computed;               /* was the evaluation done */
312     const xmlChar *name;        /* the local part of the name QName */
313     const xmlChar *nameURI;     /* the URI part of the name QName */
314     const xmlChar *select;      /* the eval string */
315     xmlNodePtr tree;            /* the tree if no eval string or the location */
316     xmlXPathObjectPtr value;    /* The value if computed */
317 };
318
319 /*
320  * The in-memory structure corresponding to an XSLT Stylesheet.
321  * NOTE: most of the content is simply linked from the doc tree
322  *       structure, no specific allocation is made.
323  */
324 typedef struct _xsltStylesheet xsltStylesheet;
325 typedef xsltStylesheet *xsltStylesheetPtr;
326 struct _xsltStylesheet {
327     /*
328      * The stylesheet import relation is kept as a tree.
329      */
330     struct _xsltStylesheet *parent;
331     struct _xsltStylesheet *next;
332     struct _xsltStylesheet *imports;
333
334     xsltDocumentPtr docList;            /* the include document list */
335
336     /*
337      * General data on the style sheet document.
338      */
339     xmlDocPtr doc;              /* the parsed XML stylesheet */
340     xmlHashTablePtr stripSpaces;/* the hash table of the strip-space and
341                                    preserve space elements */
342     int             stripAll;   /* strip-space * (1) preserve-space * (-1) */
343     xmlHashTablePtr cdataSection;/* the hash table of the cdata-section */
344
345     /*
346      * Global variable or parameters.
347      */
348     xsltStackElemPtr variables; /* linked list of param and variables */
349
350     /*
351      * Template descriptions.
352      */
353     xsltTemplatePtr templates;  /* the ordered list of templates */
354     void *templatesHash;        /* hash table or wherever compiled templates
355                                    informations are stored */
356     void *rootMatch;            /* template based on / */
357     void *keyMatch;             /* template based on key() */
358     void *elemMatch;            /* template based on * */
359     void *attrMatch;            /* template based on @* */
360     void *parentMatch;          /* template based on .. */
361     void *textMatch;            /* template based on text() */
362     void *piMatch;              /* template based on processing-instruction() */
363     void *commentMatch;         /* template based on comment() */
364     
365     /*
366      * Namespace aliases.
367      */
368     xmlHashTablePtr nsAliases;  /* the namespace alias hash tables */
369
370     /*
371      * Attribute sets.
372      */
373     xmlHashTablePtr attributeSets;/* the attribute sets hash tables */
374
375     /*
376      * Namespaces.
377      */
378     xmlHashTablePtr nsHash;     /* the set of namespaces in use */
379     void           *nsDefs;     /* the namespaces defined */
380
381     /*
382      * Key definitions.
383      */
384     void *keys;                         /* key definitions */
385
386     /*
387      * Output related stuff.
388      */
389     xmlChar *method;            /* the output method */
390     xmlChar *methodURI;         /* associated namespace if any */
391     xmlChar *version;           /* version string */
392     xmlChar *encoding;          /* encoding string */
393     int omitXmlDeclaration;     /* omit-xml-declaration = "yes" | "no" */
394
395     /* 
396      * Number formatting.
397      */
398     xsltDecimalFormatPtr decimalFormat;
399     int standalone;             /* standalone = "yes" | "no" */
400     xmlChar *doctypePublic;     /* doctype-public string */
401     xmlChar *doctypeSystem;     /* doctype-system string */
402     int indent;                 /* should output being indented */
403     xmlChar *mediaType;         /* media-type string */
404
405     /*
406      * Precomputed blocks.
407      */
408     xsltElemPreCompPtr preComps;/* list of precomputed blocks */
409     int warnings;               /* number of warnings found at compilation */
410     int errors;                 /* number of errors found at compilation */
411
412     xmlChar  *exclPrefix;       /* last excluded prefixes */
413     xmlChar **exclPrefixTab;    /* array of excluded prefixes */
414     int       exclPrefixNr;     /* number of excluded prefixes in scope */
415     int       exclPrefixMax;    /* size of the array */
416
417     void     *_private;         /* user defined data */
418
419     /*
420      * Extensions.
421      */
422     xmlHashTablePtr extInfos;   /* the extension data */
423     int             extrasNr;   /* the number of extras required */
424
425     /*
426      * For keeping track of nested includes
427      */
428     xsltDocumentPtr includes;   /* points to last nested include */
429
430     /*
431      * dictionnary: shared between stylesheet, context and documents.
432      */
433     xmlDictPtr dict;
434     /*
435      * precompiled attribute value templates.
436      */
437     void *attVTs;
438     /*
439      * if namespace-alias has an alias for the default stylesheet prefix
440      */
441     const xmlChar *defaultAlias;
442     /*
443      * bypass pre-processing (already done) (used in imports)
444      */
445     int nopreproc;
446     /*
447      * all document text strings were internalized
448      */
449     int internalized;
450 };
451
452 /*
453  * The in-memory structure corresponding to an XSLT Transformation.
454  */
455 typedef enum {
456     XSLT_OUTPUT_XML = 0,
457     XSLT_OUTPUT_HTML,
458     XSLT_OUTPUT_TEXT
459 } xsltOutputType;
460
461 typedef enum {
462     XSLT_STATE_OK = 0,
463     XSLT_STATE_ERROR,
464     XSLT_STATE_STOPPED
465 } xsltTransformState;
466
467 struct _xsltTransformContext {
468     xsltStylesheetPtr style;            /* the stylesheet used */
469     xsltOutputType type;                /* the type of output */
470
471     xsltTemplatePtr  templ;             /* the current template */
472     int              templNr;           /* Nb of templates in the stack */
473     int              templMax;          /* Size of the templtes stack */
474     xsltTemplatePtr *templTab;          /* the template stack */
475
476     xsltStackElemPtr  vars;             /* the current variable list */
477     int               varsNr;           /* Nb of variable list in the stack */
478     int               varsMax;          /* Size of the variable list stack */
479     xsltStackElemPtr *varsTab;          /* the variable list stack */
480     int               varsBase;         /* the var base for current templ */
481
482     /*
483      * Extensions
484      */
485     xmlHashTablePtr   extFunctions;     /* the extension functions */
486     xmlHashTablePtr   extElements;      /* the extension elements */
487     xmlHashTablePtr   extInfos;         /* the extension data */
488
489     const xmlChar *mode;                /* the current mode */
490     const xmlChar *modeURI;             /* the current mode URI */
491
492     xsltDocumentPtr docList;            /* the document list */
493
494     xsltDocumentPtr document;           /* the current document */
495     xmlNodePtr node;                    /* the current node being processed */
496     xmlNodeSetPtr nodeList;             /* the current node list */
497     /* xmlNodePtr current;                      the node */
498
499     xmlDocPtr output;                   /* the resulting document */
500     xmlNodePtr insert;                  /* the insertion node */
501
502     xmlXPathContextPtr xpathCtxt;       /* the XPath context */
503     xsltTransformState state;           /* the current state */
504
505     /*
506      * Global variables
507      */
508     xmlHashTablePtr   globalVars;       /* the global variables and params */
509
510     xmlNodePtr inst;                    /* the instruction in the stylesheet */
511
512     int xinclude;                       /* should XInclude be processed */
513
514     const char *      outputFile;       /* the output URI if known */
515
516     int profile;                        /* is this run profiled */
517     long             prof;              /* the current profiled value */
518     int              profNr;            /* Nb of templates in the stack */
519     int              profMax;           /* Size of the templtaes stack */
520     long            *profTab;           /* the profile template stack */
521
522     void            *_private;          /* user defined data */
523
524     int              extrasNr;          /* the number of extras used */
525     int              extrasMax;         /* the number of extras allocated */
526     xsltRuntimeExtraPtr extras;         /* extra per runtime informations */
527
528     xsltDocumentPtr  styleList;         /* the stylesheet docs list */
529     void                 * sec;         /* the security preferences if any */
530
531     xmlGenericErrorFunc  error;         /* a specific error handler */
532     void              * errctx;         /* context for the error handler */
533
534     xsltSortFunc      sortfunc;         /* a ctxt specific sort routine */
535
536     /*
537      * handling of temporary Result Value Tree
538      */
539     xmlDocPtr       tmpRVT;             /* list of RVT without persistance */
540     xmlDocPtr       persistRVT;         /* list of persistant RVTs */
541     int             ctxtflags;          /* context processing flags */
542
543     /*
544      * Speed optimization when coalescing text nodes
545      */
546     const xmlChar  *lasttext;           /* last text node content */
547     unsigned int    lasttsize;          /* last text node size */
548     unsigned int    lasttuse;           /* last text node use */
549     /*
550      * Per Context Debugging
551      */
552     int debugStatus;                    /* the context level debug status */
553     unsigned long* traceCode;           /* pointer to the variable holding the mask */
554
555     int parserOptions;                  /* parser options xmlParserOption */
556
557     /*
558      * dictionnary: shared between stylesheet, context and documents.
559      */
560     xmlDictPtr dict;
561     /*
562      * temporary storage for doc ptr, currently only used for
563      * global var evaluation
564      */
565     xmlDocPtr           tmpDoc;
566     /*
567      * all document text strings are internalized
568      */
569     int internalized;
570 };
571
572 /**
573  * CHECK_STOPPED:
574  *
575  * Macro to check if the XSLT processing should be stopped.
576  * Will return from the function.
577  */
578 #define CHECK_STOPPED if (ctxt->state == XSLT_STATE_STOPPED) return;
579
580 /**
581  * CHECK_STOPPEDE:
582  *
583  * Macro to check if the XSLT processing should be stopped.
584  * Will goto the error: label.
585  */
586 #define CHECK_STOPPEDE if (ctxt->state == XSLT_STATE_STOPPED) goto error;
587
588 /**
589  * CHECK_STOPPED0:
590  *
591  * Macro to check if the XSLT processing should be stopped.
592  * Will return from the function with a 0 value.
593  */
594 #define CHECK_STOPPED0 if (ctxt->state == XSLT_STATE_STOPPED) return(0);
595
596 /*
597  * The macro XML_CAST_FPTR is a hack to avoid a gcc warning about
598  * possible incompatibilities between function pointers and object
599  * pointers.  It is defined in libxml/hash.h within recent versions
600  * of libxml2, but is put here for compatibility.
601  */
602 #ifndef XML_CAST_FPTR
603 /**
604  * XML_CAST_FPTR:
605  * @fptr:  pointer to a function
606  *
607  * Macro to do a casting from an object pointer to a
608  * function pointer without encountering a warning from
609  * gcc
610  *
611  * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr))
612  * This macro violated ISO C aliasing rules (gcc4 on s390 broke)
613  * so it is disabled now
614  */
615
616 #define XML_CAST_FPTR(fptr) fptr
617 #endif
618 /*
619  * Functions associated to the internal types
620 xsltDecimalFormatPtr    xsltDecimalFormatGetByName(xsltStylesheetPtr sheet,
621                                                    xmlChar *name);
622  */
623 XSLTPUBFUN xsltStylesheetPtr XSLTCALL   
624                         xsltNewStylesheet       (void);
625 XSLTPUBFUN xsltStylesheetPtr XSLTCALL   
626                         xsltParseStylesheetFile (const xmlChar* filename);
627 XSLTPUBFUN void XSLTCALL                        
628                         xsltFreeStylesheet      (xsltStylesheetPtr sheet);
629 XSLTPUBFUN int XSLTCALL                 
630                         xsltIsBlank             (xmlChar *str);
631 XSLTPUBFUN void XSLTCALL                        
632                         xsltFreeStackElemList   (xsltStackElemPtr elem);
633 XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL        
634                         xsltDecimalFormatGetByName(xsltStylesheetPtr sheet,
635                                                  xmlChar *name);
636
637 XSLTPUBFUN xsltStylesheetPtr XSLTCALL   
638                         xsltParseStylesheetProcess(xsltStylesheetPtr ret,
639                                                  xmlDocPtr doc);
640 XSLTPUBFUN void XSLTCALL                        
641                         xsltParseStylesheetOutput(xsltStylesheetPtr style,
642                                                  xmlNodePtr cur);
643 XSLTPUBFUN xsltStylesheetPtr XSLTCALL   
644                         xsltParseStylesheetDoc  (xmlDocPtr doc);
645 XSLTPUBFUN xsltStylesheetPtr XSLTCALL   
646                         xsltParseStylesheetImportedDoc(xmlDocPtr doc,
647                                                 xsltStylesheetPtr style);
648 XSLTPUBFUN xsltStylesheetPtr XSLTCALL   
649                         xsltLoadStylesheetPI    (xmlDocPtr doc);
650 XSLTPUBFUN void XSLTCALL                        
651                         xsltNumberFormat        (xsltTransformContextPtr ctxt,
652                                                  xsltNumberDataPtr data,
653                                                  xmlNodePtr node);
654 XSLTPUBFUN xmlXPathError XSLTCALL                
655                         xsltFormatNumberConversion(xsltDecimalFormatPtr self,
656                                                  xmlChar *format,
657                                                  double number,
658                                                  xmlChar **result);
659
660 XSLTPUBFUN void XSLTCALL                        
661                         xsltParseTemplateContent(xsltStylesheetPtr style,
662                                                  xmlNodePtr templ);
663 XSLTPUBFUN int XSLTCALL                 
664                         xsltAllocateExtra       (xsltStylesheetPtr style);
665 XSLTPUBFUN int XSLTCALL                 
666                         xsltAllocateExtraCtxt   (xsltTransformContextPtr ctxt);
667 /*
668  * Extra functions for Result Value Trees
669  */
670 XSLTPUBFUN xmlDocPtr XSLTCALL           
671                         xsltCreateRVT           (xsltTransformContextPtr ctxt);
672 XSLTPUBFUN int XSLTCALL                 
673                         xsltRegisterTmpRVT      (xsltTransformContextPtr ctxt,
674                                                  xmlDocPtr RVT);
675 XSLTPUBFUN int XSLTCALL                 
676                         xsltRegisterPersistRVT  (xsltTransformContextPtr ctxt,
677                                                  xmlDocPtr RVT);
678 XSLTPUBFUN void XSLTCALL                        
679                         xsltFreeRVTs            (xsltTransformContextPtr ctxt);
680                         
681 /*
682  * Extra functions for Attribute Value Templates
683  */
684 XSLTPUBFUN void XSLTCALL
685                         xsltCompileAttr         (xsltStylesheetPtr style,
686                                                  xmlAttrPtr attr);
687 XSLTPUBFUN xmlChar * XSLTCALL
688                         xsltEvalAVT             (xsltTransformContextPtr ctxt,
689                                                  void *avt,
690                                                  xmlNodePtr node);
691 XSLTPUBFUN void XSLTCALL
692                         xsltFreeAVTList         (void *avt);
693 #ifdef __cplusplus
694 }
695 #endif
696
697 #endif /* __XML_XSLT_H__ */
698