Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:19:33

0001 /*
0002  * Summary: internal interfaces for XML Path Language implementation
0003  * Description: internal interfaces for XML Path Language implementation
0004  *              used to build new modules on top of XPath like XPointer and
0005  *              XSLT
0006  *
0007  * Copy: See Copyright for the status of this software.
0008  *
0009  * Author: Daniel Veillard
0010  */
0011 
0012 #ifndef __XML_XPATH_INTERNALS_H__
0013 #define __XML_XPATH_INTERNALS_H__
0014 
0015 #include <stdio.h>
0016 #include <libxml/xmlversion.h>
0017 #include <libxml/xpath.h>
0018 
0019 #ifdef LIBXML_XPATH_ENABLED
0020 
0021 #ifdef __cplusplus
0022 extern "C" {
0023 #endif
0024 
0025 /************************************************************************
0026  *                                  *
0027  *          Helpers                     *
0028  *                                  *
0029  ************************************************************************/
0030 
0031 /*
0032  * Many of these macros may later turn into functions. They
0033  * shouldn't be used in #ifdef's preprocessor instructions.
0034  */
0035 /**
0036  * xmlXPathSetError:
0037  * @ctxt:  an XPath parser context
0038  * @err:  an xmlXPathError code
0039  *
0040  * Raises an error.
0041  */
0042 #define xmlXPathSetError(ctxt, err)                 \
0043     { xmlXPatherror((ctxt), __FILE__, __LINE__, (err));         \
0044       if ((ctxt) != NULL) (ctxt)->error = (err); }
0045 
0046 /**
0047  * xmlXPathSetArityError:
0048  * @ctxt:  an XPath parser context
0049  *
0050  * Raises an XPATH_INVALID_ARITY error.
0051  */
0052 #define xmlXPathSetArityError(ctxt)                 \
0053     xmlXPathSetError((ctxt), XPATH_INVALID_ARITY)
0054 
0055 /**
0056  * xmlXPathSetTypeError:
0057  * @ctxt:  an XPath parser context
0058  *
0059  * Raises an XPATH_INVALID_TYPE error.
0060  */
0061 #define xmlXPathSetTypeError(ctxt)                  \
0062     xmlXPathSetError((ctxt), XPATH_INVALID_TYPE)
0063 
0064 /**
0065  * xmlXPathGetError:
0066  * @ctxt:  an XPath parser context
0067  *
0068  * Get the error code of an XPath context.
0069  *
0070  * Returns the context error.
0071  */
0072 #define xmlXPathGetError(ctxt)    ((ctxt)->error)
0073 
0074 /**
0075  * xmlXPathCheckError:
0076  * @ctxt:  an XPath parser context
0077  *
0078  * Check if an XPath error was raised.
0079  *
0080  * Returns true if an error has been raised, false otherwise.
0081  */
0082 #define xmlXPathCheckError(ctxt)  ((ctxt)->error != XPATH_EXPRESSION_OK)
0083 
0084 /**
0085  * xmlXPathGetDocument:
0086  * @ctxt:  an XPath parser context
0087  *
0088  * Get the document of an XPath context.
0089  *
0090  * Returns the context document.
0091  */
0092 #define xmlXPathGetDocument(ctxt)   ((ctxt)->context->doc)
0093 
0094 /**
0095  * xmlXPathGetContextNode:
0096  * @ctxt: an XPath parser context
0097  *
0098  * Get the context node of an XPath context.
0099  *
0100  * Returns the context node.
0101  */
0102 #define xmlXPathGetContextNode(ctxt)    ((ctxt)->context->node)
0103 
0104 XMLPUBFUN int
0105         xmlXPathPopBoolean  (xmlXPathParserContextPtr ctxt);
0106 XMLPUBFUN double
0107         xmlXPathPopNumber   (xmlXPathParserContextPtr ctxt);
0108 XMLPUBFUN xmlChar *
0109         xmlXPathPopString   (xmlXPathParserContextPtr ctxt);
0110 XMLPUBFUN xmlNodeSetPtr
0111         xmlXPathPopNodeSet  (xmlXPathParserContextPtr ctxt);
0112 XMLPUBFUN void *
0113         xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
0114 
0115 /**
0116  * xmlXPathReturnBoolean:
0117  * @ctxt:  an XPath parser context
0118  * @val:  a boolean
0119  *
0120  * Pushes the boolean @val on the context stack.
0121  */
0122 #define xmlXPathReturnBoolean(ctxt, val)                \
0123     valuePush((ctxt), xmlXPathNewBoolean(val))
0124 
0125 /**
0126  * xmlXPathReturnTrue:
0127  * @ctxt:  an XPath parser context
0128  *
0129  * Pushes true on the context stack.
0130  */
0131 #define xmlXPathReturnTrue(ctxt)   xmlXPathReturnBoolean((ctxt), 1)
0132 
0133 /**
0134  * xmlXPathReturnFalse:
0135  * @ctxt:  an XPath parser context
0136  *
0137  * Pushes false on the context stack.
0138  */
0139 #define xmlXPathReturnFalse(ctxt)  xmlXPathReturnBoolean((ctxt), 0)
0140 
0141 /**
0142  * xmlXPathReturnNumber:
0143  * @ctxt:  an XPath parser context
0144  * @val:  a double
0145  *
0146  * Pushes the double @val on the context stack.
0147  */
0148 #define xmlXPathReturnNumber(ctxt, val)                 \
0149     valuePush((ctxt), xmlXPathNewFloat(val))
0150 
0151 /**
0152  * xmlXPathReturnString:
0153  * @ctxt:  an XPath parser context
0154  * @str:  a string
0155  *
0156  * Pushes the string @str on the context stack.
0157  */
0158 #define xmlXPathReturnString(ctxt, str)                 \
0159     valuePush((ctxt), xmlXPathWrapString(str))
0160 
0161 /**
0162  * xmlXPathReturnEmptyString:
0163  * @ctxt:  an XPath parser context
0164  *
0165  * Pushes an empty string on the stack.
0166  */
0167 #define xmlXPathReturnEmptyString(ctxt)                 \
0168     valuePush((ctxt), xmlXPathNewCString(""))
0169 
0170 /**
0171  * xmlXPathReturnNodeSet:
0172  * @ctxt:  an XPath parser context
0173  * @ns:  a node-set
0174  *
0175  * Pushes the node-set @ns on the context stack.
0176  */
0177 #define xmlXPathReturnNodeSet(ctxt, ns)                 \
0178     valuePush((ctxt), xmlXPathWrapNodeSet(ns))
0179 
0180 /**
0181  * xmlXPathReturnEmptyNodeSet:
0182  * @ctxt:  an XPath parser context
0183  *
0184  * Pushes an empty node-set on the context stack.
0185  */
0186 #define xmlXPathReturnEmptyNodeSet(ctxt)                \
0187     valuePush((ctxt), xmlXPathNewNodeSet(NULL))
0188 
0189 /**
0190  * xmlXPathReturnExternal:
0191  * @ctxt:  an XPath parser context
0192  * @val:  user data
0193  *
0194  * Pushes user data on the context stack.
0195  */
0196 #define xmlXPathReturnExternal(ctxt, val)               \
0197     valuePush((ctxt), xmlXPathWrapExternal(val))
0198 
0199 /**
0200  * xmlXPathStackIsNodeSet:
0201  * @ctxt: an XPath parser context
0202  *
0203  * Check if the current value on the XPath stack is a node set or
0204  * an XSLT value tree.
0205  *
0206  * Returns true if the current object on the stack is a node-set.
0207  */
0208 #define xmlXPathStackIsNodeSet(ctxt)                    \
0209     (((ctxt)->value != NULL)                        \
0210      && (((ctxt)->value->type == XPATH_NODESET)             \
0211          || ((ctxt)->value->type == XPATH_XSLT_TREE)))
0212 
0213 /**
0214  * xmlXPathStackIsExternal:
0215  * @ctxt: an XPath parser context
0216  *
0217  * Checks if the current value on the XPath stack is an external
0218  * object.
0219  *
0220  * Returns true if the current object on the stack is an external
0221  * object.
0222  */
0223 #define xmlXPathStackIsExternal(ctxt)                   \
0224     ((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS))
0225 
0226 /**
0227  * xmlXPathEmptyNodeSet:
0228  * @ns:  a node-set
0229  *
0230  * Empties a node-set.
0231  */
0232 #define xmlXPathEmptyNodeSet(ns)                    \
0233     { while ((ns)->nodeNr > 0) (ns)->nodeTab[--(ns)->nodeNr] = NULL; }
0234 
0235 /**
0236  * CHECK_ERROR:
0237  *
0238  * Macro to return from the function if an XPath error was detected.
0239  */
0240 #define CHECK_ERROR                         \
0241     if (ctxt->error != XPATH_EXPRESSION_OK) return
0242 
0243 /**
0244  * CHECK_ERROR0:
0245  *
0246  * Macro to return 0 from the function if an XPath error was detected.
0247  */
0248 #define CHECK_ERROR0                            \
0249     if (ctxt->error != XPATH_EXPRESSION_OK) return(0)
0250 
0251 /**
0252  * XP_ERROR:
0253  * @X:  the error code
0254  *
0255  * Macro to raise an XPath error and return.
0256  */
0257 #define XP_ERROR(X)                         \
0258     { xmlXPathErr(ctxt, X); return; }
0259 
0260 /**
0261  * XP_ERROR0:
0262  * @X:  the error code
0263  *
0264  * Macro to raise an XPath error and return 0.
0265  */
0266 #define XP_ERROR0(X)                            \
0267     { xmlXPathErr(ctxt, X); return(0); }
0268 
0269 /**
0270  * CHECK_TYPE:
0271  * @typeval:  the XPath type
0272  *
0273  * Macro to check that the value on top of the XPath stack is of a given
0274  * type.
0275  */
0276 #define CHECK_TYPE(typeval)                     \
0277     if ((ctxt->value == NULL) || (ctxt->value->type != typeval))    \
0278         XP_ERROR(XPATH_INVALID_TYPE)
0279 
0280 /**
0281  * CHECK_TYPE0:
0282  * @typeval:  the XPath type
0283  *
0284  * Macro to check that the value on top of the XPath stack is of a given
0285  * type. Return(0) in case of failure
0286  */
0287 #define CHECK_TYPE0(typeval)                        \
0288     if ((ctxt->value == NULL) || (ctxt->value->type != typeval))    \
0289         XP_ERROR0(XPATH_INVALID_TYPE)
0290 
0291 /**
0292  * CHECK_ARITY:
0293  * @x:  the number of expected args
0294  *
0295  * Macro to check that the number of args passed to an XPath function matches.
0296  */
0297 #define CHECK_ARITY(x)                          \
0298     if (ctxt == NULL) return;                       \
0299     if (nargs != (x))                           \
0300         XP_ERROR(XPATH_INVALID_ARITY);                  \
0301     if (ctxt->valueNr < (x))                        \
0302         XP_ERROR(XPATH_STACK_ERROR);
0303 
0304 /**
0305  * CAST_TO_STRING:
0306  *
0307  * Macro to try to cast the value on the top of the XPath stack to a string.
0308  */
0309 #define CAST_TO_STRING                          \
0310     if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING))   \
0311         xmlXPathStringFunction(ctxt, 1);
0312 
0313 /**
0314  * CAST_TO_NUMBER:
0315  *
0316  * Macro to try to cast the value on the top of the XPath stack to a number.
0317  */
0318 #define CAST_TO_NUMBER                          \
0319     if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER))   \
0320         xmlXPathNumberFunction(ctxt, 1);
0321 
0322 /**
0323  * CAST_TO_BOOLEAN:
0324  *
0325  * Macro to try to cast the value on the top of the XPath stack to a boolean.
0326  */
0327 #define CAST_TO_BOOLEAN                         \
0328     if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN))  \
0329         xmlXPathBooleanFunction(ctxt, 1);
0330 
0331 /*
0332  * Variable Lookup forwarding.
0333  */
0334 
0335 XMLPUBFUN void
0336     xmlXPathRegisterVariableLookup  (xmlXPathContextPtr ctxt,
0337                      xmlXPathVariableLookupFunc f,
0338                      void *data);
0339 
0340 /*
0341  * Function Lookup forwarding.
0342  */
0343 
0344 XMLPUBFUN void
0345         xmlXPathRegisterFuncLookup  (xmlXPathContextPtr ctxt,
0346                      xmlXPathFuncLookupFunc f,
0347                      void *funcCtxt);
0348 
0349 /*
0350  * Error reporting.
0351  */
0352 XMLPUBFUN void
0353         xmlXPatherror   (xmlXPathParserContextPtr ctxt,
0354                  const char *file,
0355                  int line,
0356                  int no);
0357 
0358 XMLPUBFUN void
0359         xmlXPathErr (xmlXPathParserContextPtr ctxt,
0360                  int error);
0361 
0362 #ifdef LIBXML_DEBUG_ENABLED
0363 XMLPUBFUN void
0364         xmlXPathDebugDumpObject (FILE *output,
0365                      xmlXPathObjectPtr cur,
0366                      int depth);
0367 XMLPUBFUN void
0368         xmlXPathDebugDumpCompExpr(FILE *output,
0369                      xmlXPathCompExprPtr comp,
0370                      int depth);
0371 #endif
0372 /**
0373  * NodeSet handling.
0374  */
0375 XMLPUBFUN int
0376         xmlXPathNodeSetContains     (xmlNodeSetPtr cur,
0377                          xmlNodePtr val);
0378 XMLPUBFUN xmlNodeSetPtr
0379         xmlXPathDifference      (xmlNodeSetPtr nodes1,
0380                          xmlNodeSetPtr nodes2);
0381 XMLPUBFUN xmlNodeSetPtr
0382         xmlXPathIntersection        (xmlNodeSetPtr nodes1,
0383                          xmlNodeSetPtr nodes2);
0384 
0385 XMLPUBFUN xmlNodeSetPtr
0386         xmlXPathDistinctSorted      (xmlNodeSetPtr nodes);
0387 XMLPUBFUN xmlNodeSetPtr
0388         xmlXPathDistinct        (xmlNodeSetPtr nodes);
0389 
0390 XMLPUBFUN int
0391         xmlXPathHasSameNodes        (xmlNodeSetPtr nodes1,
0392                          xmlNodeSetPtr nodes2);
0393 
0394 XMLPUBFUN xmlNodeSetPtr
0395         xmlXPathNodeLeadingSorted   (xmlNodeSetPtr nodes,
0396                          xmlNodePtr node);
0397 XMLPUBFUN xmlNodeSetPtr
0398         xmlXPathLeadingSorted       (xmlNodeSetPtr nodes1,
0399                          xmlNodeSetPtr nodes2);
0400 XMLPUBFUN xmlNodeSetPtr
0401         xmlXPathNodeLeading     (xmlNodeSetPtr nodes,
0402                          xmlNodePtr node);
0403 XMLPUBFUN xmlNodeSetPtr
0404         xmlXPathLeading         (xmlNodeSetPtr nodes1,
0405                          xmlNodeSetPtr nodes2);
0406 
0407 XMLPUBFUN xmlNodeSetPtr
0408         xmlXPathNodeTrailingSorted  (xmlNodeSetPtr nodes,
0409                          xmlNodePtr node);
0410 XMLPUBFUN xmlNodeSetPtr
0411         xmlXPathTrailingSorted      (xmlNodeSetPtr nodes1,
0412                          xmlNodeSetPtr nodes2);
0413 XMLPUBFUN xmlNodeSetPtr
0414         xmlXPathNodeTrailing        (xmlNodeSetPtr nodes,
0415                          xmlNodePtr node);
0416 XMLPUBFUN xmlNodeSetPtr
0417         xmlXPathTrailing        (xmlNodeSetPtr nodes1,
0418                          xmlNodeSetPtr nodes2);
0419 
0420 
0421 /**
0422  * Extending a context.
0423  */
0424 
0425 XMLPUBFUN int
0426         xmlXPathRegisterNs      (xmlXPathContextPtr ctxt,
0427                          const xmlChar *prefix,
0428                          const xmlChar *ns_uri);
0429 XMLPUBFUN const xmlChar *
0430         xmlXPathNsLookup        (xmlXPathContextPtr ctxt,
0431                          const xmlChar *prefix);
0432 XMLPUBFUN void
0433         xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt);
0434 
0435 XMLPUBFUN int
0436         xmlXPathRegisterFunc        (xmlXPathContextPtr ctxt,
0437                          const xmlChar *name,
0438                          xmlXPathFunction f);
0439 XMLPUBFUN int
0440         xmlXPathRegisterFuncNS      (xmlXPathContextPtr ctxt,
0441                          const xmlChar *name,
0442                          const xmlChar *ns_uri,
0443                          xmlXPathFunction f);
0444 XMLPUBFUN int
0445         xmlXPathRegisterVariable    (xmlXPathContextPtr ctxt,
0446                          const xmlChar *name,
0447                          xmlXPathObjectPtr value);
0448 XMLPUBFUN int
0449         xmlXPathRegisterVariableNS  (xmlXPathContextPtr ctxt,
0450                          const xmlChar *name,
0451                          const xmlChar *ns_uri,
0452                          xmlXPathObjectPtr value);
0453 XMLPUBFUN xmlXPathFunction
0454         xmlXPathFunctionLookup      (xmlXPathContextPtr ctxt,
0455                          const xmlChar *name);
0456 XMLPUBFUN xmlXPathFunction
0457         xmlXPathFunctionLookupNS    (xmlXPathContextPtr ctxt,
0458                          const xmlChar *name,
0459                          const xmlChar *ns_uri);
0460 XMLPUBFUN void
0461         xmlXPathRegisteredFuncsCleanup  (xmlXPathContextPtr ctxt);
0462 XMLPUBFUN xmlXPathObjectPtr
0463         xmlXPathVariableLookup      (xmlXPathContextPtr ctxt,
0464                          const xmlChar *name);
0465 XMLPUBFUN xmlXPathObjectPtr
0466         xmlXPathVariableLookupNS    (xmlXPathContextPtr ctxt,
0467                          const xmlChar *name,
0468                          const xmlChar *ns_uri);
0469 XMLPUBFUN void
0470         xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
0471 
0472 /**
0473  * Utilities to extend XPath.
0474  */
0475 XMLPUBFUN xmlXPathParserContextPtr
0476           xmlXPathNewParserContext  (const xmlChar *str,
0477                          xmlXPathContextPtr ctxt);
0478 XMLPUBFUN void
0479         xmlXPathFreeParserContext   (xmlXPathParserContextPtr ctxt);
0480 
0481 /* TODO: remap to xmlXPathValuePop and Push. */
0482 XMLPUBFUN xmlXPathObjectPtr
0483         valuePop            (xmlXPathParserContextPtr ctxt);
0484 XMLPUBFUN int
0485         valuePush           (xmlXPathParserContextPtr ctxt,
0486                          xmlXPathObjectPtr value);
0487 
0488 XMLPUBFUN xmlXPathObjectPtr
0489         xmlXPathNewString       (const xmlChar *val);
0490 XMLPUBFUN xmlXPathObjectPtr
0491         xmlXPathNewCString      (const char *val);
0492 XMLPUBFUN xmlXPathObjectPtr
0493         xmlXPathWrapString      (xmlChar *val);
0494 XMLPUBFUN xmlXPathObjectPtr
0495         xmlXPathWrapCString     (char * val);
0496 XMLPUBFUN xmlXPathObjectPtr
0497         xmlXPathNewFloat        (double val);
0498 XMLPUBFUN xmlXPathObjectPtr
0499         xmlXPathNewBoolean      (int val);
0500 XMLPUBFUN xmlXPathObjectPtr
0501         xmlXPathNewNodeSet      (xmlNodePtr val);
0502 XMLPUBFUN xmlXPathObjectPtr
0503         xmlXPathNewValueTree        (xmlNodePtr val);
0504 XMLPUBFUN int
0505         xmlXPathNodeSetAdd      (xmlNodeSetPtr cur,
0506                          xmlNodePtr val);
0507 XMLPUBFUN int
0508         xmlXPathNodeSetAddUnique    (xmlNodeSetPtr cur,
0509                          xmlNodePtr val);
0510 XMLPUBFUN int
0511         xmlXPathNodeSetAddNs        (xmlNodeSetPtr cur,
0512                          xmlNodePtr node,
0513                          xmlNsPtr ns);
0514 XMLPUBFUN void
0515         xmlXPathNodeSetSort     (xmlNodeSetPtr set);
0516 
0517 XMLPUBFUN void
0518         xmlXPathRoot            (xmlXPathParserContextPtr ctxt);
0519 XMLPUBFUN void
0520         xmlXPathEvalExpr        (xmlXPathParserContextPtr ctxt);
0521 XMLPUBFUN xmlChar *
0522         xmlXPathParseName       (xmlXPathParserContextPtr ctxt);
0523 XMLPUBFUN xmlChar *
0524         xmlXPathParseNCName     (xmlXPathParserContextPtr ctxt);
0525 
0526 /*
0527  * Existing functions.
0528  */
0529 XMLPUBFUN double
0530         xmlXPathStringEvalNumber    (const xmlChar *str);
0531 XMLPUBFUN int
0532         xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
0533                          xmlXPathObjectPtr res);
0534 XMLPUBFUN void
0535         xmlXPathRegisterAllFunctions    (xmlXPathContextPtr ctxt);
0536 XMLPUBFUN xmlNodeSetPtr
0537         xmlXPathNodeSetMerge        (xmlNodeSetPtr val1,
0538                          xmlNodeSetPtr val2);
0539 XMLPUBFUN void
0540         xmlXPathNodeSetDel      (xmlNodeSetPtr cur,
0541                          xmlNodePtr val);
0542 XMLPUBFUN void
0543         xmlXPathNodeSetRemove       (xmlNodeSetPtr cur,
0544                          int val);
0545 XMLPUBFUN xmlXPathObjectPtr
0546         xmlXPathNewNodeSetList      (xmlNodeSetPtr val);
0547 XMLPUBFUN xmlXPathObjectPtr
0548         xmlXPathWrapNodeSet     (xmlNodeSetPtr val);
0549 XMLPUBFUN xmlXPathObjectPtr
0550         xmlXPathWrapExternal        (void *val);
0551 
0552 XMLPUBFUN int xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
0553 XMLPUBFUN int xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt);
0554 XMLPUBFUN int xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
0555 XMLPUBFUN void xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt);
0556 XMLPUBFUN void xmlXPathAddValues(xmlXPathParserContextPtr ctxt);
0557 XMLPUBFUN void xmlXPathSubValues(xmlXPathParserContextPtr ctxt);
0558 XMLPUBFUN void xmlXPathMultValues(xmlXPathParserContextPtr ctxt);
0559 XMLPUBFUN void xmlXPathDivValues(xmlXPathParserContextPtr ctxt);
0560 XMLPUBFUN void xmlXPathModValues(xmlXPathParserContextPtr ctxt);
0561 
0562 XMLPUBFUN int xmlXPathIsNodeType(const xmlChar *name);
0563 
0564 /*
0565  * Some of the axis navigation routines.
0566  */
0567 XMLPUBFUN xmlNodePtr xmlXPathNextSelf(xmlXPathParserContextPtr ctxt,
0568             xmlNodePtr cur);
0569 XMLPUBFUN xmlNodePtr xmlXPathNextChild(xmlXPathParserContextPtr ctxt,
0570             xmlNodePtr cur);
0571 XMLPUBFUN xmlNodePtr xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt,
0572             xmlNodePtr cur);
0573 XMLPUBFUN xmlNodePtr xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt,
0574             xmlNodePtr cur);
0575 XMLPUBFUN xmlNodePtr xmlXPathNextParent(xmlXPathParserContextPtr ctxt,
0576             xmlNodePtr cur);
0577 XMLPUBFUN xmlNodePtr xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt,
0578             xmlNodePtr cur);
0579 XMLPUBFUN xmlNodePtr xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt,
0580             xmlNodePtr cur);
0581 XMLPUBFUN xmlNodePtr xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt,
0582             xmlNodePtr cur);
0583 XMLPUBFUN xmlNodePtr xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt,
0584             xmlNodePtr cur);
0585 XMLPUBFUN xmlNodePtr xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt,
0586             xmlNodePtr cur);
0587 XMLPUBFUN xmlNodePtr xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt,
0588             xmlNodePtr cur);
0589 XMLPUBFUN xmlNodePtr xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt,
0590             xmlNodePtr cur);
0591 XMLPUBFUN xmlNodePtr xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
0592             xmlNodePtr cur);
0593 /*
0594  * The official core of XPath functions.
0595  */
0596 XMLPUBFUN void xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
0597 XMLPUBFUN void xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
0598 XMLPUBFUN void xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
0599 XMLPUBFUN void xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs);
0600 XMLPUBFUN void xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
0601 XMLPUBFUN void xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs);
0602 XMLPUBFUN void xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
0603 XMLPUBFUN void xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs);
0604 XMLPUBFUN void xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs);
0605 XMLPUBFUN void xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs);
0606 XMLPUBFUN void xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs);
0607 XMLPUBFUN void xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs);
0608 XMLPUBFUN void xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs);
0609 XMLPUBFUN void xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs);
0610 XMLPUBFUN void xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs);
0611 XMLPUBFUN void xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs);
0612 XMLPUBFUN void xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs);
0613 XMLPUBFUN void xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs);
0614 XMLPUBFUN void xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs);
0615 XMLPUBFUN void xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs);
0616 XMLPUBFUN void xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
0617 XMLPUBFUN void xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs);
0618 XMLPUBFUN void xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs);
0619 XMLPUBFUN void xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs);
0620 XMLPUBFUN void xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs);
0621 XMLPUBFUN void xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
0622 
0623 /**
0624  * Really internal functions
0625  */
0626 XMLPUBFUN void xmlXPathNodeSetFreeNs(xmlNsPtr ns);
0627 
0628 #ifdef __cplusplus
0629 }
0630 #endif
0631 
0632 #endif /* LIBXML_XPATH_ENABLED */
0633 #endif /* ! __XML_XPATH_INTERNALS_H__ */