19#ifndef __XML_XPATH_H__
20#define __XML_XPATH_H__
24#ifdef LIBXML_XPATH_ENABLED
31#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
37#ifdef LIBXML_XPATH_ENABLED
39typedef struct _xmlXPathContext xmlXPathContext;
40typedef xmlXPathContext *xmlXPathContextPtr;
41typedef struct _xmlXPathParserContext xmlXPathParserContext;
42typedef xmlXPathParserContext *xmlXPathParserContextPtr;
49 XPATH_EXPRESSION_OK = 0,
51 XPATH_UNFINISHED_LITERAL_ERROR,
52 XPATH_START_LITERAL_ERROR,
53 XPATH_VARIABLE_REF_ERROR,
54 XPATH_UNDEF_VARIABLE_ERROR,
55 XPATH_INVALID_PREDICATE_ERROR,
58 XPATH_UNKNOWN_FUNC_ERROR,
59 XPATH_INVALID_OPERAND,
62 XPATH_INVALID_CTXT_SIZE,
63 XPATH_INVALID_CTXT_POSITION,
67 XPTR_SUB_RESOURCE_ERROR,
68 XPATH_UNDEF_PREFIX_ERROR,
70 XPATH_INVALID_CHAR_ERROR,
73 XPATH_FORBID_VARIABLE_ERROR,
74 XPATH_OP_LIMIT_EXCEEDED,
75 XPATH_RECURSION_LIMIT_EXCEEDED
81typedef struct _xmlNodeSet xmlNodeSet;
82typedef xmlNodeSet *xmlNodeSetPtr;
107#ifdef LIBXML_XPTR_LOCS_ENABLED
110 XPATH_LOCATIONSET = 7,
116#ifndef LIBXML_XPTR_LOCS_ENABLED
120#define XPATH_LOCATIONSET 7
124typedef struct _xmlXPathObject xmlXPathObject;
125typedef xmlXPathObject *xmlXPathObjectPtr;
126struct _xmlXPathObject {
127 xmlXPathObjectType
type;
128 xmlNodeSetPtr nodesetval;
148typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr
obj,
int type);
154typedef struct _xmlXPathType xmlXPathType;
155typedef xmlXPathType *xmlXPathTypePtr;
156struct _xmlXPathType {
158 xmlXPathConvertFunc
func;
165typedef struct _xmlXPathVariable xmlXPathVariable;
166typedef xmlXPathVariable *xmlXPathVariablePtr;
167struct _xmlXPathVariable {
169 xmlXPathObjectPtr
value;
180typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt,
187typedef struct _xmlXPathFunct xmlXPathFunct;
188typedef xmlXPathFunct *xmlXPathFuncPtr;
189struct _xmlXPathFunct {
191 xmlXPathEvalFunc
func;
206typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt,
207 xmlXPathObjectPtr
cur);
213typedef struct _xmlXPathAxis xmlXPathAxis;
214typedef xmlXPathAxis *xmlXPathAxisPtr;
215struct _xmlXPathAxis {
217 xmlXPathAxisFunc
func;
230typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt,
int nargs);
247typedef xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (
void *ctxt,
262typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (
void *ctxt,
275#define XML_XPATH_CHECKNS (1<<0)
281#define XML_XPATH_NOVAR (1<<1)
300struct _xmlXPathContext {
304 int nb_variables_unused;
305 int max_variables_unused;
310 xmlXPathTypePtr
types;
313 int max_funcs_unused;
318 xmlXPathAxisPtr axis;
327 int proximityPosition;
336 xmlXPathVariableLookupFunc varLookupFunc;
347 xmlXPathFuncLookupFunc funcLookupFunc;
348 void *funcLookupData;
369 unsigned long opLimit;
370 unsigned long opCount;
378typedef struct _xmlXPathCompExpr xmlXPathCompExpr;
379typedef xmlXPathCompExpr *xmlXPathCompExprPtr;
387struct _xmlXPathParserContext {
394 xmlXPathObjectPtr
value;
397 xmlXPathObjectPtr *valueTab;
399 xmlXPathCompExprPtr comp;
429#define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0)
440#define xmlXPathNodeSetItem(ns, index) \
441 ((((ns) != NULL) && \
442 ((index) >= 0) && ((index) < (ns)->nodeNr)) ? \
443 (ns)->nodeTab[(index)] \
453#define xmlXPathNodeSetIsEmpty(ns) \
454 (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
458 xmlXPathFreeObject (xmlXPathObjectPtr
obj);
462 xmlXPathFreeNodeSetList (xmlXPathObjectPtr
obj);
464 xmlXPathFreeNodeSet (xmlNodeSetPtr
obj);
466 xmlXPathObjectCopy (xmlXPathObjectPtr
val);
474 xmlXPathCastNumberToBoolean (
double val);
476 xmlXPathCastStringToBoolean (
const xmlChar *
val);
478 xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr
ns);
480 xmlXPathCastToBoolean (xmlXPathObjectPtr
val);
483 xmlXPathCastBooleanToNumber (
int val);
485 xmlXPathCastStringToNumber (
const xmlChar *
val);
489 xmlXPathCastNodeSetToNumber (xmlNodeSetPtr
ns);
491 xmlXPathCastToNumber (xmlXPathObjectPtr
val);
494 xmlXPathCastBooleanToString (
int val);
496 xmlXPathCastNumberToString (
double val);
500 xmlXPathCastNodeSetToString (xmlNodeSetPtr
ns);
502 xmlXPathCastToString (xmlXPathObjectPtr
val);
505 xmlXPathConvertBoolean (xmlXPathObjectPtr
val);
507 xmlXPathConvertNumber (xmlXPathObjectPtr
val);
509 xmlXPathConvertString (xmlXPathObjectPtr
val);
517 xmlXPathFreeContext (xmlXPathContextPtr ctxt);
519 xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
530 xmlXPathContextPtr
ctx);
534 xmlXPathContextPtr
ctx);
537 xmlXPathContextPtr
ctx);
540 xmlXPathContextPtr ctxt);
542 xmlXPathEvalPredicate (xmlXPathContextPtr ctxt,
543 xmlXPathObjectPtr
res);
550 xmlXPathCtxtCompile (xmlXPathContextPtr ctxt,
553 xmlXPathCompiledEval (xmlXPathCompExprPtr comp,
554 xmlXPathContextPtr
ctx);
556 xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
557 xmlXPathContextPtr ctxt);
559 xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
561#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
566 xmlXPathIsNaN (
double val);
568 xmlXPathIsInf (
double val);
void user(int argc, const char *argv[])
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLint GLint GLsizei GLsizei GLsizei depth
GLuint GLuint GLsizei GLenum type
void(XMLCDECL *) typedef void(XMLCALL * xmlStructuredErrorFunc)(void *userData, xmlErrorPtr error)