epoc32/include/stdapis/libxml2/libxml2_xpath.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/libxml2/libxml2_xpath.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,550 @@
     1.4 +/*
     1.5 + * Summary: XML Path Language implementation
     1.6 + * Description: API for the XML Path Language implementation
     1.7 + *
     1.8 + * XML Path Language implementation
     1.9 + * XPath is a language for addressing parts of an XML document,
    1.10 + * designed to be used by both XSLT and XPointer
    1.11 + *     http://www.w3.org/TR/xpath
    1.12 + *
    1.13 + * Implements
    1.14 + * W3C Recommendation 16 November 1999
    1.15 + *     http://www.w3.org/TR/1999/REC-xpath-19991116
    1.16 + *
    1.17 + * Copy: See Copyright for the status of this software.
    1.18 + *
    1.19 + * Author: Daniel Veillard
    1.20 + * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. 
    1.21 + */
    1.22 +
    1.23 +/** @file
    1.24 +@publishedAll
    1.25 +@released
    1.26 +*/
    1.27 +
    1.28 +#ifndef XML_XPATH_H
    1.29 +#define XML_XPATH_H
    1.30 +
    1.31 +#include <stdapis/libxml2/libxml2_hash.h>
    1.32 +#include <stdapis/libxml2/libxml2_dict.h>
    1.33 +#include <stdapis/libxml2/libxml2_xmlerror.h>
    1.34 +
    1.35 +#ifdef __cplusplus
    1.36 +extern "C" {
    1.37 +#endif
    1.38 +
    1.39 +
    1.40 +typedef struct _xmlXPathContext xmlXPathContext;
    1.41 +typedef xmlXPathContext *xmlXPathContextPtr;
    1.42 +typedef struct _xmlXPathParserContext xmlXPathParserContext;
    1.43 +typedef xmlXPathParserContext *xmlXPathParserContextPtr;
    1.44 +
    1.45 +/**
    1.46 + * The set of XPath error codes.
    1.47 + */
    1.48 +typedef enum {
    1.49 +    XPATH_EXPRESSION_OK = 0,
    1.50 +    XPATH_NUMBER_ERROR,
    1.51 +    XPATH_UNFINISHED_LITERAL_ERROR,
    1.52 +    XPATH_START_LITERAL_ERROR,
    1.53 +    XPATH_VARIABLE_REF_ERROR,
    1.54 +    XPATH_UNDEF_VARIABLE_ERROR,
    1.55 +    XPATH_INVALID_PREDICATE_ERROR,
    1.56 +    XPATH_EXPR_ERROR,
    1.57 +    XPATH_UNCLOSED_ERROR,
    1.58 +    XPATH_UNKNOWN_FUNC_ERROR,
    1.59 +    XPATH_INVALID_OPERAND,
    1.60 +    XPATH_INVALID_TYPE,
    1.61 +    XPATH_INVALID_ARITY,
    1.62 +    XPATH_INVALID_CTXT_SIZE,
    1.63 +    XPATH_INVALID_CTXT_POSITION,
    1.64 +    XPATH_MEMORY_ERROR,
    1.65 +    XPTR_SYNTAX_ERROR,
    1.66 +    XPTR_RESOURCE_ERROR,
    1.67 +    XPTR_SUB_RESOURCE_ERROR,
    1.68 +    XPATH_UNDEF_PREFIX_ERROR,
    1.69 +    XPATH_ENCODING_ERROR,
    1.70 +    XPATH_INVALID_CHAR_ERROR,
    1.71 +    XPATH_XE_EXTENSION_FUNC_ERROR
    1.72 +} xmlXPathError;
    1.73 +
    1.74 +/*
    1.75 + * A node-set (an unordered collection of nodes without duplicates).
    1.76 + */
    1.77 +typedef struct _xmlNodeSet xmlNodeSet;
    1.78 +typedef xmlNodeSet *xmlNodeSetPtr;
    1.79 +struct _xmlNodeSet {
    1.80 +    int nodeNr;             /* number of nodes in the set */
    1.81 +    int nodeMax;            /* size of the array as allocated */
    1.82 +    xmlNodePtr* nodeTab;    /* array of nodes in no particular order */
    1.83 +    /* @@ with_ns to check wether namespace nodes should be looked at @@ */
    1.84 +};
    1.85 +
    1.86 +/*
    1.87 + * An expression is evaluated to yield an object, which
    1.88 + * has one of the following four basic types:
    1.89 + *   - node-set
    1.90 + *   - boolean
    1.91 + *   - number
    1.92 + *   - string
    1.93 + *
    1.94 + * @@ XPointer will add more types !
    1.95 + */
    1.96 +
    1.97 +typedef enum {
    1.98 +    XPATH_UNDEFINED = 0,
    1.99 +    XPATH_NODESET = 1,
   1.100 +    XPATH_BOOLEAN = 2,
   1.101 +    XPATH_NUMBER = 3,
   1.102 +    XPATH_STRING = 4,
   1.103 +    XPATH_POINT = 5,
   1.104 +    XPATH_RANGE = 6,
   1.105 +    XPATH_LOCATIONSET = 7,
   1.106 +    XPATH_USERS = 8,
   1.107 +    XPATH_XSLT_TREE = 9  /* An XSLT value tree, non modifiable */
   1.108 +} xmlXPathObjectType;
   1.109 +
   1.110 +typedef struct _xmlXPathObject xmlXPathObject;
   1.111 +typedef xmlXPathObject *xmlXPathObjectPtr;
   1.112 +struct _xmlXPathObject {
   1.113 +    xmlXPathObjectType  type;
   1.114 +    xmlNodeSetPtr       nodesetval;
   1.115 +    int                 boolval;
   1.116 +    double              floatval;
   1.117 +    xmlChar*            stringval;
   1.118 +    void*               user;
   1.119 +    int                 index;
   1.120 +    void*               user2;
   1.121 +    int                 index2;
   1.122 +};
   1.123 +
   1.124 +/**
   1.125 + * xmlXPathConvertFunc:
   1.126 + * @param obj an XPath object
   1.127 + * @param type the number of the target type
   1.128 + *
   1.129 + * A conversion function is associated to a type and used to cast
   1.130 + * the new type to primitive values.
   1.131 + *
   1.132 + * Returns -1 in case of error, 0 otherwise
   1.133 + */
   1.134 +typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type);
   1.135 +
   1.136 +/*
   1.137 + * Extra type: a name and a conversion function.
   1.138 + */
   1.139 +
   1.140 +typedef struct _xmlXPathType xmlXPathType;
   1.141 +typedef xmlXPathType *xmlXPathTypePtr;
   1.142 +struct _xmlXPathType {
   1.143 +    const xmlChar       *name;      /* the type name */
   1.144 +    xmlXPathConvertFunc func;       /* the conversion function */
   1.145 +};
   1.146 +
   1.147 +/*
   1.148 + * Extra variable: a name and a value.
   1.149 + */
   1.150 +
   1.151 +typedef struct _xmlXPathVariable xmlXPathVariable;
   1.152 +typedef xmlXPathVariable *xmlXPathVariablePtr;
   1.153 +struct _xmlXPathVariable {
   1.154 +    const xmlChar     *name;        /* the variable name */
   1.155 +    xmlXPathObjectPtr value;        /* the value */
   1.156 +};
   1.157 +
   1.158 +/**
   1.159 + * xmlXPathEvalFunc:
   1.160 + * @param ctxt an XPath parser context
   1.161 + * @param nargs the number of arguments passed to the function
   1.162 + *
   1.163 + * An XPath evaluation function, the parameters are on the XPath context stack.
   1.164 + */
   1.165 +
   1.166 +typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt, int nargs);
   1.167 +
   1.168 +/*
   1.169 + * Extra function: a name and a evaluation function.
   1.170 + */
   1.171 +
   1.172 +typedef struct _xmlXPathFunct xmlXPathFunct;
   1.173 +typedef xmlXPathFunct *xmlXPathFuncPtr;
   1.174 +struct _xmlXPathFunct {
   1.175 +    const xmlChar      *name;       /* the function name */
   1.176 +    xmlXPathEvalFunc func;      /* the evaluation function */
   1.177 +};
   1.178 +
   1.179 +/**
   1.180 + * xmlXPathAxisFunc:
   1.181 + * @param ctxt the XPath interpreter context
   1.182 + * @param cur the previous node being explored on that axis
   1.183 + *
   1.184 + * An axis traversal function. To traverse an axis, the engine calls
   1.185 + * the first time with cur == NULL and repeat until the function returns
   1.186 + * NULL indicating the end of the axis traversal.
   1.187 + *
   1.188 + * Returns the next node in that axis or NULL if at the end of the axis.
   1.189 + */
   1.190 +
   1.191 +typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr cur);
   1.192 +
   1.193 +/*
   1.194 + * Extra axis: a name and an axis function.
   1.195 + */
   1.196 +
   1.197 +typedef struct _xmlXPathAxis xmlXPathAxis;
   1.198 +typedef xmlXPathAxis* xmlXPathAxisPtr;
   1.199 +struct _xmlXPathAxis {
   1.200 +    const xmlChar*   name;       /* the axis name */
   1.201 +    xmlXPathAxisFunc func;       /* the search function */
   1.202 +};
   1.203 +
   1.204 +// XMLENGINE: NEW CODE -- XForms extensions support
   1.205 +/**
   1.206 +Callback for resolving prefix names into namespace URIs
   1.207 +
   1.208 +@return Namespace URI for aNs prefix.
   1.209 +
   1.210 +Resolving is made with aCtxt context.
   1.211 +
   1.212 +This function is used internally by for implementation of
   1.213 +namespace-resovling feature in XPath API of XML Engine
   1.214 +(MXmlEngNamespaceResolver interface is called by libxml2)
   1.215 +*/
   1.216 +typedef const xmlChar* (*xeXPathNsResolverFunc)(void* aCtxt, const xmlChar* aNs);
   1.217 +//---
   1.218 +
   1.219 +/**
   1.220 + * xmlXPathContext:
   1.221 + *
   1.222 + * Expression evaluation occurs with respect to a context.
   1.223 + * the context consists of:
   1.224 + *    - a node (the context node)
   1.225 + *    - a node list (the context node list)
   1.226 + *    - a set of variable bindings
   1.227 + *    - a function library
   1.228 + *    - the set of namespace declarations in scope for the expression
   1.229 + * Following the switch to hash tables, this need to be trimmed up at
   1.230 + * the next binary incompatible release.
   1.231 + */
   1.232 +struct _xmlXPathContext {
   1.233 +    xmlDocPtr doc;          /* The current document */
   1.234 +    xmlNodePtr node;            /* The current node */
   1.235 +
   1.236 +    //int nb_variables_unused;        /* unused (hash table) */
   1.237 +    //int max_variables_unused;       /* unused (hash table) */
   1.238 +    xmlHashTablePtr varHash;        /* Hash table of defined variables */
   1.239 +
   1.240 +    int nb_types;           /* number of defined types */
   1.241 +    int max_types;          /* max number of types */
   1.242 +    xmlXPathTypePtr types;      /* Array of defined types */
   1.243 +
   1.244 +    //int nb_funcs_unused;        /* unused (hash table) */
   1.245 +    //int max_funcs_unused;       /* unused (hash table) */
   1.246 +    xmlHashTablePtr funcHash;       /* Hash table of defined funcs */
   1.247 +
   1.248 +    int nb_axis;            /* number of defined axis */
   1.249 +    int max_axis;           /* max number of axis */
   1.250 +    xmlXPathAxisPtr axis;       /* Array of defined axis */
   1.251 +
   1.252 +    /* the namespace nodes of the context node */
   1.253 +    xmlNsPtr *namespaces;       /* Array of namespaces */
   1.254 +    int nsNr;               /* number of namespace in scope */
   1.255 +    void *user;             /* function to free */
   1.256 +
   1.257 +    /* extra variables */
   1.258 +    int contextSize;            /* the context size */
   1.259 +    int proximityPosition;      /* the proximity position */
   1.260 +
   1.261 +    /* extra stuff for XPointer */
   1.262 +    int xptr;               /* it this an XPointer context */
   1.263 +    xmlNodePtr here;            /* for here() */
   1.264 +    xmlNodePtr origin;          /* for origin() */
   1.265 +
   1.266 +    /* the set of namespace declarations in scope for the expression */
   1.267 +    xmlHashTablePtr nsHash;         /* The namespaces hash table */
   1.268 +    void* varLookupFunc;            /* variable lookup func */
   1.269 +    void* varLookupData;            /* variable lookup data */
   1.270 +
   1.271 +    /* Possibility to link in an extra item */
   1.272 +    void* extra;                    /* needed for XSLT */
   1.273 +
   1.274 +    /* The function name and URI when calling a function */
   1.275 +    const xmlChar* function;
   1.276 +    const xmlChar* functionURI;
   1.277 +
   1.278 +    /* function lookup function and data */
   1.279 +    void* funcLookupFunc;           /* function lookup func */
   1.280 +    void* funcLookupData;           /* function lookup data */
   1.281 +
   1.282 +    /* temporary namespace lists kept for walking the namespace axis */
   1.283 +    xmlNsPtr* tmpNsList;            /* Array of namespaces */
   1.284 +    int       tmpNsNr;              /* number of namespace in scope */
   1.285 +
   1.286 +    /* error reporting mechanism */
   1.287 +    void*   userData;               /* user specific data block */
   1.288 +    xmlStructuredErrorFunc error;   /* the callback in case of errors */
   1.289 +    xmlError lastError;             /* the last error */
   1.290 +    xmlNodePtr debugNode;           /* the source node XSLT */
   1.291 +
   1.292 +    /* dictionnary */
   1.293 +    xmlDictPtr dict;                /* dictionnary if any */
   1.294 +
   1.295 +// XMLENGINE: NEW CODE -- XForms extensions support
   1.296 +    xmlHashTablePtr instanceDocs;  /* hash table that stores instance XForms instance docs,
   1.297 +                                      not owned by the structure, will be freed by the client*/
   1.298 +    xmlNodeSetPtr   dependencyList;/* nodes that the expression depends on */
   1.299 +    xeXPathNsResolverFunc xeResolveNs; /* find namespace URI bound to prefix in the current context */
   1.300 +    void*                 xeResolveNsCtxt; /* resolver-specific context for processing */
   1.301 +// END NEW CODE
   1.302 +
   1.303 +};
   1.304 +
   1.305 +/*
   1.306 + * The structure of a compiled expression form has become public in XML ENGINE
   1.307 + */
   1.308 +
   1.309 +typedef enum {
   1.310 +    XPATH_OP_END=0,
   1.311 +    XPATH_OP_AND,
   1.312 +    XPATH_OP_OR,
   1.313 +    XPATH_OP_EQUAL,
   1.314 +    XPATH_OP_CMP,
   1.315 +    XPATH_OP_PLUS,
   1.316 +    XPATH_OP_MULT,
   1.317 +    XPATH_OP_UNION,
   1.318 +    XPATH_OP_ROOT,
   1.319 +    XPATH_OP_NODE,
   1.320 +    XPATH_OP_RESET,
   1.321 +    XPATH_OP_COLLECT,
   1.322 +    XPATH_OP_VALUE,
   1.323 +    XPATH_OP_VARIABLE,
   1.324 +    XPATH_OP_FUNCTION,
   1.325 +    XPATH_OP_ARG,
   1.326 +    XPATH_OP_PREDICATE,
   1.327 +    XPATH_OP_FILTER,
   1.328 +    XPATH_OP_SORT
   1.329 +#ifdef LIBXML_XPTR_ENABLED
   1.330 +    ,XPATH_OP_RANGETO
   1.331 +#endif
   1.332 +} xmlXPathOp;
   1.333 +
   1.334 +typedef struct _xmlXPathStepOp xmlXPathStepOp;
   1.335 +typedef xmlXPathStepOp *xmlXPathStepOpPtr;
   1.336 +struct _xmlXPathStepOp {
   1.337 +    xmlXPathOp  op;      /* The identifier of the operation */
   1.338 +    int        ch1;      /* First child */
   1.339 +    int        ch2;      /* Second child */
   1.340 +    int      value;
   1.341 +    int     value2;
   1.342 +    int     value3;
   1.343 +    void*   value4;
   1.344 +    void*   value5;
   1.345 +    void*    cache;
   1.346 +    void* cacheURI;
   1.347 +};
   1.348 +
   1.349 +
   1.350 +/**
   1.351 + The initial size of 'steps' table in the precompiled XPath exression
   1.352 +
   1.353 + Double-it policy for growth is used in the code
   1.354 +*/
   1.355 +#define XPATH_STEPS_GRANULARITY 10
   1.356 +
   1.357 +typedef struct _xmlXPathCompExpr xmlXPathCompExpr;
   1.358 +typedef xmlXPathCompExpr*   xmlXPathCompExprPtr;
   1.359 +struct _xmlXPathCompExpr {
   1.360 +    int nbStep;             /* Number of steps in this expression */
   1.361 +    int maxStep;            /* Maximum number of steps allocated */
   1.362 +    xmlXPathStepOp* steps;  /* ops for computation of this expression */
   1.363 +    int last;               /* index of last step in expression */
   1.364 +    xmlChar*    expr;       /* the expression being computed */
   1.365 +    xmlDictPtr  dict;       /* the dictionnary to use if any */
   1.366 +#ifdef DEBUG_EVAL_COUNTS
   1.367 +    int nb;
   1.368 +    xmlChar*  string;
   1.369 +#endif
   1.370 +//XMLENGINE: NEW CODE
   1.371 +    void* extendedContext;  /* some data set by API users and available for XPath extension functions */
   1.372 +    void* xeNsResolver;     /* default namespace resolver supplied when compiling expression */
   1.373 +//XMLENGINE: END NEW CODE
   1.374 +};
   1.375 +/**
   1.376 + * xmlXPathParserContext:
   1.377 + *
   1.378 + * An XPath parser context. It contains pure parsing informations,
   1.379 + * an xmlXPathContext, and the stack of objects.
   1.380 + */
   1.381 +struct _xmlXPathParserContext {
   1.382 +    const xmlChar *cur;             /* the current char being parsed */
   1.383 +    const xmlChar *base;            /* the full expression */
   1.384 +
   1.385 +    int error;                      /* error code */
   1.386 +
   1.387 +    xmlXPathContextPtr  context;    /* the evaluation context */
   1.388 +    xmlXPathObjectPtr     value;    /* the current value */
   1.389 +    int                 valueNr;    /* number of values stacked */
   1.390 +    int                valueMax;    /* max number of values stacked */
   1.391 +    xmlXPathObjectPtr *valueTab;    /* stack of values */
   1.392 +
   1.393 +    xmlXPathCompExprPtr comp;       /* the precompiled expression */
   1.394 +    int xptr;                       /* it this an XPointer expression */
   1.395 +    xmlNodePtr         ancestor;    /* used for walking preceding axis */
   1.396 +};
   1.397 +
   1.398 +/**
   1.399 + * xmlXPathFunction:
   1.400 + * @param ctxt the XPath interprestation context
   1.401 + * @param nargs the number of arguments
   1.402 + *
   1.403 + * An XPath function.
   1.404 + * The arguments (if any) are popped out from the context stack
   1.405 + * and the result is pushed on the stack.
   1.406 + */
   1.407 +
   1.408 +typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
   1.409 +
   1.410 +/************************************************************************
   1.411 + *                                                                      *
   1.412 + *          Public API                                                  *
   1.413 + *                                                                      *
   1.414 + ************************************************************************/
   1.415 +
   1.416 +/*
   1.417 +NOTE: Now defined as local inline functions in xpath.c
   1.418 +      It seems that no one uses them from outside..
   1.419 +     --> used by libxslt
   1.420 +*/
   1.421 +
   1.422 +#define xmlXPathIsNaN(val) trio_isnan(val)
   1.423 +#define xmlXPathIsInf(val) trio_isinf(val)
   1.424 +
   1.425 +
   1.426 +/* These macros may later turn into functions */
   1.427 +/**
   1.428 + * xmlXPathNodeSetGetLength:
   1.429 + * @param ns a node-set
   1.430 + *
   1.431 + * Implements a functionality similar to the DOM NodeList.length.
   1.432 + *
   1.433 + * Returns the number of nodes in the node-set.
   1.434 + */
   1.435 +#define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0)
   1.436 +/**
   1.437 + * xmlXPathNodeSetItem:
   1.438 + * @param ns a node-set
   1.439 + * @param index index of a node in the set
   1.440 + *
   1.441 + * Implements a functionality similar to the DOM NodeList.item().
   1.442 + *
   1.443 + * Returns the xmlNodePtr at the given index in ns or NULL if
   1.444 + *         index is out of range (0 to length-1)
   1.445 + */
   1.446 +#define xmlXPathNodeSetItem(ns, index)                          \
   1.447 +        (( (ns) && ((index) >= 0) && ((index) < (ns)->nodeNr) ) \
   1.448 +        ? (ns)->nodeTab[(index)]                                \
   1.449 +        : NULL)
   1.450 +/**
   1.451 + * xmlXPathNodeSetIsEmpty:
   1.452 + * @param ns a node-set
   1.453 + *
   1.454 + * Checks whether ns is empty or not.
   1.455 + *
   1.456 + * Returns %TRUE if ns is an empty node-set.
   1.457 + */
   1.458 +#define xmlXPathNodeSetIsEmpty(ns)                                      \
   1.459 +    (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
   1.460 +
   1.461 +
   1.462 +XMLPUBFUN void XMLCALL
   1.463 +            xmlXPathFreeObject      (xmlXPathObjectPtr obj);
   1.464 +XMLPUBFUN xmlNodeSetPtr XMLCALL
   1.465 +            xmlXPathNodeSetCreate   (xmlNodePtr val);
   1.466 +XMLPUBFUN void XMLCALL
   1.467 +            xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj);
   1.468 +XMLPUBFUN void XMLCALL
   1.469 +            xmlXPathFreeNodeSet     (xmlNodeSetPtr obj);
   1.470 +XMLPUBFUN xmlXPathObjectPtr XMLCALL
   1.471 +            xmlXPathObjectCopy      (xmlXPathObjectPtr val);
   1.472 +XMLPUBFUN int XMLCALL
   1.473 +            xmlXPathCmpNodes        (xmlNodePtr node1, xmlNodePtr node2);
   1.474 +/**
   1.475 + * Conversion functions to basic types.
   1.476 + */
   1.477 +XMLPUBFUN int XMLCALL
   1.478 +            xmlXPathCastNumberToBoolean (double val);
   1.479 +XMLPUBFUN int XMLCALL
   1.480 +            xmlXPathCastStringToBoolean (const xmlChar * val);
   1.481 +XMLPUBFUN int XMLCALL
   1.482 +            xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns);
   1.483 +XMLPUBFUN int XMLCALL
   1.484 +            xmlXPathCastToBoolean   (xmlXPathObjectPtr val);
   1.485 +
   1.486 +XMLPUBFUN double XMLCALL
   1.487 +            xmlXPathCastBooleanToNumber (int val);
   1.488 +XMLPUBFUN double XMLCALL
   1.489 +            xmlXPathCastStringToNumber  (const xmlChar * val);
   1.490 +XMLPUBFUN double XMLCALL
   1.491 +            xmlXPathCastNodeToNumber    (xmlNodePtr node);
   1.492 +XMLPUBFUN double XMLCALL
   1.493 +            xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns);
   1.494 +XMLPUBFUN double XMLCALL
   1.495 +            xmlXPathCastToNumber    (xmlXPathObjectPtr val);
   1.496 +
   1.497 +XMLPUBFUN xmlChar* XMLCALL
   1.498 +            xmlXPathCastBooleanToString (int val);
   1.499 +XMLPUBFUN xmlChar* XMLCALL
   1.500 +            xmlXPathCastNumberToString  (double val);
   1.501 +XMLPUBFUN xmlChar* XMLCALL
   1.502 +            xmlXPathCastNodeToString    (xmlNodePtr node);
   1.503 +XMLPUBFUN xmlChar* XMLCALL
   1.504 +            xmlXPathCastNodeSetToString (xmlNodeSetPtr ns);
   1.505 +XMLPUBFUN xmlChar* XMLCALL
   1.506 +            xmlXPathCastToString    (xmlXPathObjectPtr val);
   1.507 +
   1.508 +XMLPUBFUN xmlXPathObjectPtr XMLCALL
   1.509 +            xmlXPathConvertBoolean  (xmlXPathObjectPtr val);
   1.510 +XMLPUBFUN xmlXPathObjectPtr XMLCALL
   1.511 +            xmlXPathConvertNumber   (xmlXPathObjectPtr val);
   1.512 +XMLPUBFUN xmlXPathObjectPtr XMLCALL
   1.513 +            xmlXPathConvertString   (xmlXPathObjectPtr val);
   1.514 +
   1.515 +/**
   1.516 + * Context handling.
   1.517 + */
   1.518 +XMLPUBFUN void XMLCALL
   1.519 +            xmlXPathInit            (void);
   1.520 +XMLPUBFUN xmlXPathContextPtr XMLCALL
   1.521 +            xmlXPathNewContext      (xmlDocPtr doc);
   1.522 +XMLPUBFUN void XMLCALL
   1.523 +            xmlXPathFreeContext     (xmlXPathContextPtr ctxt);
   1.524 +
   1.525 +/**
   1.526 + * Evaluation functions.
   1.527 + */
   1.528 +XMLPUBFUN long XMLCALL
   1.529 +            xmlXPathOrderDocElems   (xmlDocPtr doc);
   1.530 +XMLPUBFUN xmlXPathObjectPtr XMLCALL
   1.531 +            xmlXPathEval            (const xmlChar *str, xmlXPathContextPtr ctx);
   1.532 +XMLPUBFUN xmlXPathObjectPtr XMLCALL
   1.533 +            xmlXPathEvalExpression  (const xmlChar *str, xmlXPathContextPtr ctxt);
   1.534 +XMLPUBFUN int XMLCALL
   1.535 +            xmlXPathEvalPredicate   (xmlXPathContextPtr ctxt, xmlXPathObjectPtr res);
   1.536 +/**
   1.537 + * Separate compilation/evaluation entry points.
   1.538 + */
   1.539 +XMLPUBFUN xmlXPathCompExprPtr XMLCALL
   1.540 +            xmlXPathCompile         (const xmlChar *str);
   1.541 +XMLPUBFUN xmlXPathCompExprPtr XMLCALL
   1.542 +            xmlXPathCtxtCompile     (xmlXPathContextPtr ctxt, const xmlChar *str);
   1.543 +XMLPUBFUN xmlXPathObjectPtr XMLCALL
   1.544 +            xmlXPathCompiledEval    (xmlXPathCompExprPtr comp,xmlXPathContextPtr ctx);
   1.545 +XMLPUBFUN void XMLCALL
   1.546 +            xmlXPathFreeCompExpr    (xmlXPathCompExprPtr comp);
   1.547 +
   1.548 +#ifdef __cplusplus
   1.549 +}
   1.550 +#endif
   1.551 +
   1.552 +#endif /* XML_XPATH_H */
   1.553 +