ReactOS 0.4.15-dev-8093-g3285f69
xsltutils.h
Go to the documentation of this file.
1/*
2 * Summary: set of utilities for the XSLT engine
3 * Description: interfaces for the utilities module of the XSLT engine.
4 * things like message handling, profiling, and other
5 * generally useful routines.
6 *
7 * Copy: See Copyright for the status of this software.
8 *
9 * Author: Daniel Veillard
10 */
11
12#ifndef __XML_XSLTUTILS_H__
13#define __XML_XSLTUTILS_H__
14
15#include <libxslt/xsltconfig.h>
16#include <libxml/xpath.h>
17#include <libxml/dict.h>
18#include <libxml/xmlerror.h>
19#include "xsltexports.h"
20#include "xsltInternals.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
31#define XSLT_TODO \
32 xsltGenericError(xsltGenericErrorContext, \
33 "Unimplemented block at %s:%d\n", \
34 __FILE__, __LINE__);
35
41#define XSLT_STRANGE \
42 xsltGenericError(xsltGenericErrorContext, \
43 "Internal error at %s:%d\n", \
44 __FILE__, __LINE__);
45
51#define IS_XSLT_ELEM(n) \
52 (((n) != NULL) && ((n)->type == XML_ELEMENT_NODE) && \
53 ((n)->ns != NULL) && (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE)))
54
60#define IS_XSLT_NAME(n, val) \
61 (xmlStrEqual((n)->name, (const xmlChar *) (val)))
62
68#define IS_XSLT_REAL_NODE(n) \
69 (((n) != NULL) && \
70 (((n)->type == XML_ELEMENT_NODE) || \
71 ((n)->type == XML_TEXT_NODE) || \
72 ((n)->type == XML_CDATA_SECTION_NODE) || \
73 ((n)->type == XML_ATTRIBUTE_NODE) || \
74 ((n)->type == XML_DOCUMENT_NODE) || \
75 ((n)->type == XML_HTML_DOCUMENT_NODE) || \
76 ((n)->type == XML_COMMENT_NODE) || \
77 ((n)->type == XML_PI_NODE)))
78
79/*
80 * Our own version of namespaced attributes lookup.
81 */
84 const xmlChar *name,
85 const xmlChar *nameSpace);
89 const xmlChar *name,
90 const xmlChar *nameSpace);
92 xsltGetUTF8Char (const unsigned char *utf,
93 int *len);
94
95/*
96 * XSLT Debug Tracing Tracing Types
97 */
98typedef enum {
119
125#define XSLT_TRACE(ctxt,code,call) \
126 if (ctxt->traceCode && (*(ctxt->traceCode) & code)) \
127 call
128
133
134/*
135 * XSLT specific error and debug reporting functions.
136 */
141
149 xmlNodePtr inst);
158 void *ctx,
164 const char *msg,
165 ...) LIBXSLT_ATTR_FORMAT(4,5);
166
169 int options);
170/*
171 * Sorting.
172 */
173
175 xsltDocumentSortFunction (xmlNodeSetPtr list);
183 xmlNodePtr *sorts,
184 int nbsorts);
187 xmlNodePtr * sorts,
188 int nbsorts);
189XSLTPUBFUN xmlXPathObjectPtr * XSLTCALL
192
193/*
194 * QNames handling.
195 */
196
200 const xmlChar **prefix);
203 xmlChar **name);
204
208 const xmlChar **name);
209
210/*
211 * Output, reuse libxml I/O buffers.
212 */
221 int compression);
231 xsltSaveResultToString (xmlChar **doc_txt_ptr,
232 int * doc_txt_len,
235
236/*
237 * XPath interface
238 */
239XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL
241 const xmlChar *str);
242XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL
245 int flags);
246
247/*
248 * Profiling.
249 */
252 FILE *output);
255
260
266#define XSLT_TIMESTAMP_TICS_PER_SEC 100000l
267
268/*
269 * Hooks for the debugger.
270 */
271
272typedef enum {
273 XSLT_DEBUG_NONE = 0, /* no debugging allowed */
284
286
291
303
304#ifdef __cplusplus
305}
306#endif
307
308#endif /* __XML_XSLTUTILS_H__ */
309
310
_STLP_MOVE_TO_STD_NAMESPACE void sort(_RandomAccessIter __first, _RandomAccessIter __last)
Definition: _algo.c:993
Arabic default style
Definition: afstyles.h:94
#define msg(x)
Definition: auth_time.c:54
_In_ fcb _In_ chunk _In_ uint64_t _In_ uint64_t _In_ bool _In_opt_ void _In_opt_ PIRP _In_ LIST_ENTRY _In_ uint8_t compression
Definition: btrfs_drv.h:1365
Definition: list.h:37
static WCHAR no[MAX_STRING_RESOURCE_LEN]
Definition: object.c:2340
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7482
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
FxCollectionEntry * cur
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLbitfield flags
Definition: glext.h:7161
GLuint GLfloat * val
Definition: glext.h:7180
GLenum GLsizei len
Definition: glext.h:6722
GLuint64EXT * result
Definition: glext.h:11304
const WCHAR * str
xmlOutputBuffer * xmlOutputBufferPtr
Definition: tree.h:32
static int fd
Definition: io.c:51
Definition: dict.c:111
Definition: tree.h:551
Definition: tree.h:489
Definition: fci.c:127
Definition: name.c:39
Definition: dlist.c:348
Definition: pdh_main.c:94
void(XMLCDECL * xmlGenericErrorFunc)(void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2
Definition: xmlerror.h:847
static unsigned int block
Definition: xmlmemory.c:101
unsigned char xmlChar
Definition: xmlstring.h:28
void(* xsltSortFunc)(xsltTransformContextPtr ctxt, xmlNodePtr *sorts, int nbsorts)
#define LIBXSLT_ATTR_FORMAT(fmt, args)
Definition: xsltconfig.h:159
#define XSLTCALL
Definition: xsltexports.h:39
#define XSLTPUBVAR
Definition: xsltexports.h:55
#define XSLTPUBFUN
Definition: xsltexports.h:48
XSLTPUBFUN void XSLTCALL xsltTransformError(xsltTransformContextPtr ctxt, xsltStylesheetPtr style, xmlNodePtr node, const char *msg,...) LIBXSLT_ATTR_FORMAT(4
xsltDebugStatusCodes
Definition: xsltutils.h:272
@ XSLT_DEBUG_STEP
Definition: xsltutils.h:275
@ XSLT_DEBUG_CONT
Definition: xsltutils.h:279
@ XSLT_DEBUG_STEPOUT
Definition: xsltutils.h:276
@ XSLT_DEBUG_INIT
Definition: xsltutils.h:274
@ XSLT_DEBUG_QUIT
Definition: xsltutils.h:282
@ XSLT_DEBUG_NEXT
Definition: xsltutils.h:277
@ XSLT_DEBUG_NONE
Definition: xsltutils.h:273
@ XSLT_DEBUG_RUN_RESTART
Definition: xsltutils.h:281
@ XSLT_DEBUG_STOP
Definition: xsltutils.h:278
@ XSLT_DEBUG_RUN
Definition: xsltutils.h:280
XSLTPUBFUN void XSLTCALL xslDropCall(void)
XSLTPUBFUN int XSLTCALL xsltGetDebuggerStatus(void)
Definition: xsltutils.c:2376
XSLTPUBFUN void XSLTCALL xsltSaveProfiling(xsltTransformContextPtr ctxt, FILE *output)
XSLTPUBVAR void * xsltGenericErrorContext
Definition: xsltutils.h:138
XSLTPUBFUN void XSLTCALL xsltDocumentSortFunction(xmlNodeSetPtr list)
Definition: xsltutils.c:903
XSLTPUBFUN int XSLTCALL xslAddCall(xsltTemplatePtr templ, xmlNodePtr source)
XSLTPUBFUN void XSLTCALL xsltSetDebuggerStatus(int value)
int(* xsltAddCallCallback)(xsltTemplatePtr templ, xmlNodePtr source)
Definition: xsltutils.h:289
XSLTPUBVAR xmlGenericErrorFunc xsltGenericDebug
Definition: xsltutils.h:139
void(* xsltHandleDebuggerCallback)(xmlNodePtr cur, xmlNodePtr node, xsltTemplatePtr templ, xsltTransformContextPtr ctxt)
Definition: xsltutils.h:287
XSLTPUBFUN void XSLTCALL xsltMessage(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst)
Definition: xsltutils.c:408
XSLTPUBVAR void * xsltGenericDebugContext
Definition: xsltutils.h:140
XSLTPUBVAR xmlGenericErrorFunc xsltGenericError
Definition: xsltutils.h:137
XSLTPUBFUN int XSLTCALL xsltSaveResultToFilename(const char *URI, xmlDocPtr result, xsltStylesheetPtr style, int compression)
Definition: xsltutils.c:1636
XSLTPUBVAR int xslDebugStatus
Definition: xsltutils.h:285
XSLTPUBFUN int XSLTCALL xsltSaveResultToFd(int fd, xmlDocPtr result, xsltStylesheetPtr style)
Definition: xsltutils.c:1724
XSLTPUBFUN int XSLTCALL xsltGetUTF8Char(const unsigned char *utf, int *len)
Definition: xsltutils.c:227
xsltDebugTraceCodes
Definition: xsltutils.h:98
@ XSLT_TRACE_VALUE_OF
Definition: xsltutils.h:108
@ XSLT_TRACE_FOR_EACH
Definition: xsltutils.h:113
@ XSLT_TRACE_COPY_OF
Definition: xsltutils.h:107
@ XSLT_TRACE_ALL
Definition: xsltutils.h:99
@ XSLT_TRACE_TEMPLATES
Definition: xsltutils.h:115
@ XSLT_TRACE_APPLY_TEMPLATE
Definition: xsltutils.h:103
@ XSLT_TRACE_COPY_TEXT
Definition: xsltutils.h:101
@ XSLT_TRACE_NONE
Definition: xsltutils.h:100
@ XSLT_TRACE_COPY
Definition: xsltutils.h:104
@ XSLT_TRACE_PROCESS_NODE
Definition: xsltutils.h:102
@ XSLT_TRACE_CHOOSE
Definition: xsltutils.h:111
@ XSLT_TRACE_COMMENT
Definition: xsltutils.h:105
@ XSLT_TRACE_PI
Definition: xsltutils.h:106
@ XSLT_TRACE_KEYS
Definition: xsltutils.h:116
@ XSLT_TRACE_CALL_TEMPLATE
Definition: xsltutils.h:109
@ XSLT_TRACE_STRIP_SPACES
Definition: xsltutils.h:114
@ XSLT_TRACE_APPLY_TEMPLATES
Definition: xsltutils.h:110
@ XSLT_TRACE_VARIABLES
Definition: xsltutils.h:117
@ XSLT_TRACE_IF
Definition: xsltutils.h:112
XSLTPUBFUN xsltDebugTraceCodes XSLTCALL xsltDebugGetDefaultTrace(void)
Definition: transform.c:460
XSLTPUBFUN void XSLTCALL xsltSetGenericDebugFunc(void *ctx, xmlGenericErrorFunc handler)
Definition: xsltutils.c:566
XSLTPUBFUN void XSLTCALL xsltCalibrateAdjust(long delta)
XSLTPUBFUN const xmlChar *XSLTCALL xsltGetQNameURI(xmlNodePtr node, xmlChar **name)
Definition: xsltutils.c:753
XSLTPUBFUN int XSLTCALL xsltSaveResultTo(xmlOutputBufferPtr buf, xmlDocPtr result, xsltStylesheetPtr style)
Definition: xsltutils.c:1460
XSLTPUBFUN void XSLTCALL xsltPrintErrorContext(xsltTransformContextPtr ctxt, xsltStylesheetPtr style, xmlNodePtr node)
Definition: xsltutils.c:583
void(* xsltDropCallCallback)(void)
Definition: xsltutils.h:290
XSLTPUBFUN const xmlChar *XSLTCALL xsltSplitQName(xmlDictPtr dict, const xmlChar *name, const xmlChar **prefix)
Definition: xsltutils.c:720
XSLTPUBFUN void XSLTCALL xsltDoSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts, int nbsorts)
Definition: xsltutils.c:1369
XSLTPUBFUN int XSLTCALL xsltSaveResultToFile(FILE *file, xmlDocPtr result, xsltStylesheetPtr style)
Definition: xsltutils.c:1680
XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL xsltXPathCompile(xsltStylesheetPtr style, const xmlChar *str)
Definition: xsltutils.c:2356
XSLTPUBFUN void XSLTCALL xsltSetTransformErrorFunc(xsltTransformContextPtr ctxt, void *ctx, xmlGenericErrorFunc handler)
Definition: xsltutils.c:659
XSLTPUBFUN void XSLTCALL xsltSetSortFunc(xsltSortFunc handler)
Definition: xsltutils.c:1386
XSLTPUBFUN void XSLTCALL xsltSetCtxtSortFunc(xsltTransformContextPtr ctxt, xsltSortFunc handler)
Definition: xsltutils.c:1404
XSLTPUBFUN xmlDocPtr XSLTCALL xsltGetProfileInformation(xsltTransformContextPtr ctxt)
XSLTPUBFUN void XSLTCALL xsltDefaultSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts, int nbsorts)
Definition: xsltutils.c:1081
XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL xsltXPathCompileFlags(xsltStylesheetPtr style, const xmlChar *str, int flags)
Definition: xsltutils.c:2313
XSLTPUBFUN long XSLTCALL xsltTimestamp(void)
XSLTPUBFUN void XSLTCALL xsltDebugSetDefaultTrace(xsltDebugTraceCodes val)
Definition: transform.c:449
XSLTPUBFUN xmlXPathObjectPtr *XSLTCALL xsltComputeSortResult(xsltTransformContextPtr ctxt, xmlNodePtr sort)
Definition: xsltutils.c:1067
XSLTPUBFUN int XSLTCALL xsltSaveResultToString(xmlChar **doc_txt_ptr, int *doc_txt_len, xmlDocPtr result, xsltStylesheetPtr style)
Definition: xsltutils.c:1767
XSLTPUBFUN int XSLTCALL xsltSetDebuggerCallbacks(int no, void *block)
XSLTPUBFUN void XSLTCALL xsltSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler)
Definition: xsltutils.c:520
XSLTPUBFUN const xmlChar *XSLTCALL xsltGetCNsProp(xsltStylesheetPtr style, xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace)
Definition: xsltutils.c:52
XSLTPUBFUN const xmlChar *XSLTCALL xsltGetQNameURI2(xsltStylesheetPtr style, xmlNodePtr node, const xmlChar **name)
Definition: xsltutils.c:827
XSLTPUBFUN void XSLTCALL XSLTPUBFUN int XSLTCALL xsltSetCtxtParseOptions(xsltTransformContextPtr ctxt, int options)
Definition: xsltutils.c:1425
XSLTPUBFUN xmlChar *XSLTCALL xsltGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace)
Definition: xsltutils.c:142
#define const
Definition: zconf.h:233