Some infrastructure work, and of course some debug:
[platform/upstream/libxslt.git] / libxslt / xsltutils.h
1 /*
2  * xsltutils.h: interfaces for the utilities module of the XSLT engine
3  *
4  * See Copyright for the status of this software.
5  *
6  * Daniel.Veillard@w3.org
7  */
8
9 #ifndef __XML_XSLTUTILS_H__
10 #define __XML_XSLTUTILS_H__
11
12 #include <libxml/xpath.h>
13 #include <libxml/xmlerror.h>
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 /*
20  * To cleanup
21  */
22 xmlChar *xmlSplitQName2(const xmlChar *name, xmlChar **prefix);
23 void xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
24
25 /*
26  * Useful macros
27  */
28
29 #define TODO                                                            \
30     xsltGenericError(xsltGenericErrorContext,                           \
31             "Unimplemented block at %s:%d\n",                           \
32             __FILE__, __LINE__);
33
34 #define STRANGE                                                         \
35     xsltGenericError(xsltGenericErrorContext,                           \
36             "Internal error at %s:%d\n",                                \
37             __FILE__, __LINE__);
38
39 #define IS_XSLT_ELEM(n)                                                 \
40     ((n)->ns != NULL) && (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE))
41
42 #define IS_XSLT_NAME(n, val)                                            \
43     (xmlStrEqual((n)->name, (const xmlChar *) (val)))
44
45
46 /*
47  * XSLT specific error and debug reporting functions
48  */
49 extern xmlGenericErrorFunc xsltGenericError;
50 extern void *xsltGenericErrorContext;
51 extern xmlGenericErrorFunc xsltGenericDebug;
52 extern void *xsltGenericDebugContext;
53
54 void            xsltSetGenericErrorFunc         (void *ctx,
55                                                  xmlGenericErrorFunc handler);
56 void            xsltSetGenericDebugFunc         (void *ctx,
57                                                  xmlGenericErrorFunc handler);
58 #ifdef __cplusplus
59 }
60 #endif
61
62 #endif /* __XML_XSLTUTILS_H__ */
63