Home | History | Annotate | Download | only in libxslt
      1 /*
      2  * Summary: interface for the variable matching and lookup.
      3  * Description: interface for the variable matching and lookup.
      4  *
      5  * Copy: See Copyright for the status of this software.
      6  *
      7  * Author: Daniel Veillard
      8  */
      9 
     10 #ifndef __XML_XSLT_VARIABLES_H__
     11 #define __XML_XSLT_VARIABLES_H__
     12 
     13 #include <libxml/xpath.h>
     14 #include <libxml/xpathInternals.h>
     15 #include "xsltexports.h"
     16 #include "xsltInternals.h"
     17 #include "functions.h"
     18 
     19 #ifdef __cplusplus
     20 extern "C" {
     21 #endif
     22 
     23 
     24 /**
     25  * XSLT_REGISTER_VARIABLE_LOOKUP:
     26  *
     27  * Registering macro, not general purpose at all but used in different modules.
     28  */
     29 
     30 #define XSLT_REGISTER_VARIABLE_LOOKUP(ctxt)			\
     31     xmlXPathRegisterVariableLookup((ctxt)->xpathCtxt,		\
     32 	       xsltXPathVariableLookup,	(void *)(ctxt));	\
     33     xsltRegisterAllFunctions((ctxt)->xpathCtxt);		\
     34     xsltRegisterAllElement(ctxt);				\
     35     (ctxt)->xpathCtxt->extra = ctxt
     36 
     37 /*
     38  * Interfaces for the variable module.
     39  */
     40 
     41 XSLTPUBFUN int XSLTCALL
     42 		xsltEvalGlobalVariables		(xsltTransformContextPtr ctxt);
     43 XSLTPUBFUN int XSLTCALL
     44 		xsltEvalUserParams		(xsltTransformContextPtr ctxt,
     45 						 const char **params);
     46 XSLTPUBFUN int XSLTCALL
     47     		xsltQuoteUserParams		(xsltTransformContextPtr ctxt,
     48 						 const char **params);
     49 XSLTPUBFUN int XSLTCALL
     50 		xsltEvalOneUserParam		(xsltTransformContextPtr ctxt,
     51     						 const xmlChar * name,
     52 						 const xmlChar * value);
     53 XSLTPUBFUN int XSLTCALL
     54     		xsltQuoteOneUserParam		(xsltTransformContextPtr ctxt,
     55     						 const xmlChar * name,
     56 						 const xmlChar * value);
     57 
     58 XSLTPUBFUN void XSLTCALL
     59     		xsltParseGlobalVariable		(xsltStylesheetPtr style,
     60 						 xmlNodePtr cur);
     61 XSLTPUBFUN void XSLTCALL
     62     		xsltParseGlobalParam		(xsltStylesheetPtr style,
     63 						 xmlNodePtr cur);
     64 XSLTPUBFUN void XSLTCALL
     65     		xsltParseStylesheetVariable	(xsltTransformContextPtr ctxt,
     66 						 xmlNodePtr cur);
     67 XSLTPUBFUN void XSLTCALL
     68     		xsltParseStylesheetParam	(xsltTransformContextPtr ctxt,
     69 						 xmlNodePtr cur);
     70 XSLTPUBFUN xsltStackElemPtr XSLTCALL
     71 		xsltParseStylesheetCallerParam	(xsltTransformContextPtr ctxt,
     72 						 xmlNodePtr cur);
     73 XSLTPUBFUN int XSLTCALL
     74     		xsltAddStackElemList		(xsltTransformContextPtr ctxt,
     75 						 xsltStackElemPtr elems);
     76 XSLTPUBFUN void XSLTCALL
     77     		xsltFreeGlobalVariables		(xsltTransformContextPtr ctxt);
     78 XSLTPUBFUN xmlXPathObjectPtr XSLTCALL
     79 		xsltVariableLookup		(xsltTransformContextPtr ctxt,
     80 						 const xmlChar *name,
     81 						 const xmlChar *ns_uri);
     82 XSLTPUBFUN xmlXPathObjectPtr XSLTCALL
     83 		xsltXPathVariableLookup		(void *ctxt,
     84 						 const xmlChar *name,
     85 						 const xmlChar *ns_uri);
     86 #ifdef __cplusplus
     87 }
     88 #endif
     89 
     90 #endif /* __XML_XSLT_VARIABLES_H__ */
     91 
     92