epoc32/include/stdapis/libxml2/libxml2_xpathinternals.h
branchSymbian3
changeset 4 837f303aceeb
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
       
     1 /*
       
     2  * Summary: internal interfaces for XML Path Language implementation
       
     3  * Description: internal interfaces for XML Path Language implementation
       
     4  *              used to build new modules on top of XPath like XPointer and
       
     5  *              XSLT
       
     6  *
       
     7  * Copy: See Copyright for the status of this software.
       
     8  *
       
     9  * Author: Daniel Veillard
       
    10  * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. 
       
    11  */
       
    12 
       
    13 /** @file
       
    14 @publishedAll
       
    15 @released
       
    16 */
       
    17 
       
    18 #ifndef XML_XPATH_INTERNALS_H
       
    19 #define XML_XPATH_INTERNALS_H
       
    20 
       
    21 #include <stdapis/libxml2/libxml2_xpath.h>
       
    22 
       
    23 #ifdef __cplusplus
       
    24 extern "C" {
       
    25 #endif
       
    26 
       
    27 
       
    28 /************************************************************************
       
    29  *                                                                      *
       
    30  *          Helpers                                                     *
       
    31  *                                                                      *
       
    32  ************************************************************************/
       
    33 
       
    34 /*
       
    35  * Many of these macros may later turn into functions. They
       
    36  * shouldn't be used in #ifdef's preprocessor instructions.
       
    37  */
       
    38 /**
       
    39  * xmlXPathSetError:
       
    40  * @param ctxt an XPath parser context
       
    41  * @param err an xmlXPathError code
       
    42  *
       
    43  * Raises an error.
       
    44  */
       
    45 #define xmlXPathSetError(ctxt, err)                 \
       
    46     { xmlXPatherror((ctxt), __FILE__, __LINE__, (err));         \
       
    47       (ctxt)->error = (err); }
       
    48 
       
    49 /**
       
    50  * xmlXPathSetArityError:
       
    51  * @param ctxt an XPath parser context
       
    52  *
       
    53  * Raises an XPATH_INVALID_ARITY error.
       
    54  */
       
    55 #define xmlXPathSetArityError(ctxt)                 \
       
    56     xmlXPathSetError((ctxt), XPATH_INVALID_ARITY)
       
    57 
       
    58 /**
       
    59  * xmlXPathSetTypeError:
       
    60  * @param ctxt an XPath parser context
       
    61  *
       
    62  * Raises an XPATH_INVALID_TYPE error.
       
    63  */
       
    64 #define xmlXPathSetTypeError(ctxt)                  \
       
    65     xmlXPathSetError((ctxt), XPATH_INVALID_TYPE)
       
    66 
       
    67 /**
       
    68  * xmlXPathGetError:
       
    69  * @param ctxt an XPath parser context
       
    70  *
       
    71  * Get the error code of an XPath context.
       
    72  *
       
    73  * Returns the context error.
       
    74  */
       
    75 #define xmlXPathGetError(ctxt)    ((ctxt)->error)
       
    76 
       
    77 /**
       
    78  * xmlXPathCheckError:
       
    79  * @param ctxt an XPath parser context
       
    80  *
       
    81  * Check if an XPath error was raised.
       
    82  *
       
    83  * Returns true if an error has been raised, false otherwise.
       
    84  */
       
    85 #define xmlXPathCheckError(ctxt)  ((ctxt)->error != XPATH_EXPRESSION_OK)
       
    86 
       
    87 /**
       
    88  * xmlXPathGetDocument:
       
    89  * @param ctxt an XPath parser context
       
    90  *
       
    91  * Get the document of an XPath context.
       
    92  *
       
    93  * Returns the context document.
       
    94  */
       
    95 #define xmlXPathGetDocument(ctxt)   ((ctxt)->context->doc)
       
    96 
       
    97 /**
       
    98  * xmlXPathGetContextNode:
       
    99  * @param ctxt an XPath parser context
       
   100  *
       
   101  * Get the context node of an XPath context.
       
   102  *
       
   103  * Returns the context node.
       
   104  */
       
   105 #define xmlXPathGetContextNode(ctxt)    ((ctxt)->context->node)
       
   106 
       
   107 XMLPUBFUN int XMLCALL
       
   108             xmlXPathPopBoolean  (xmlXPathParserContextPtr ctxt);
       
   109 XMLPUBFUN double XMLCALL
       
   110             xmlXPathPopNumber   (xmlXPathParserContextPtr ctxt);
       
   111 XMLPUBFUN xmlChar * XMLCALL
       
   112             xmlXPathPopString   (xmlXPathParserContextPtr ctxt);
       
   113 XMLPUBFUN xmlNodeSetPtr XMLCALL
       
   114             xmlXPathPopNodeSet  (xmlXPathParserContextPtr ctxt);
       
   115 XMLPUBFUN void * XMLCALL
       
   116             xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
       
   117 
       
   118 /**
       
   119  * xmlXPathReturnBoolean:
       
   120  * @param ctxt an XPath parser context
       
   121  * @param val a boolean
       
   122  *
       
   123  * Pushes the boolean val on the context stack.
       
   124  */
       
   125 #define xmlXPathReturnBoolean(ctxt, val)                \
       
   126     valuePush((ctxt), xmlXPathNewBoolean(val))
       
   127 
       
   128 /**
       
   129  * xmlXPathReturnTrue:
       
   130  * @param ctxt an XPath parser context
       
   131  *
       
   132  * Pushes true on the context stack.
       
   133  */
       
   134 #define xmlXPathReturnTrue(ctxt)   xmlXPathReturnBoolean((ctxt), 1)
       
   135 
       
   136 /**
       
   137  * xmlXPathReturnFalse:
       
   138  * @param ctxt an XPath parser context
       
   139  *
       
   140  * Pushes false on the context stack.
       
   141  */
       
   142 #define xmlXPathReturnFalse(ctxt)  xmlXPathReturnBoolean((ctxt), 0)
       
   143 
       
   144 /**
       
   145  * xmlXPathReturnNumber:
       
   146  * @param ctxt an XPath parser context
       
   147  * @param val a double
       
   148  *
       
   149  * Pushes the double val on the context stack.
       
   150  */
       
   151 #define xmlXPathReturnNumber(ctxt, val)                 \
       
   152     valuePush((ctxt), xmlXPathNewFloat(val))
       
   153 
       
   154 /**
       
   155  * xmlXPathReturnString:
       
   156  * @param ctxt an XPath parser context
       
   157  * @param str a string
       
   158  *
       
   159  * Pushes the string str on the context stack.
       
   160  */
       
   161 #define xmlXPathReturnString(ctxt, str)                 \
       
   162     valuePush((ctxt), xmlXPathWrapString(str))
       
   163 
       
   164 /**
       
   165  * xmlXPathReturnEmptyString:
       
   166  * @param ctxt an XPath parser context
       
   167  *
       
   168  * Pushes an empty string on the stack.
       
   169  */
       
   170 #define xmlXPathReturnEmptyString(ctxt)                 \
       
   171     valuePush((ctxt), xmlXPathNewCString(""))
       
   172 
       
   173 /**
       
   174  * xmlXPathReturnNodeSet:
       
   175  * @param ctxt an XPath parser context
       
   176  * @param ns a node-set
       
   177  *
       
   178  * Pushes the node-set ns on the context stack.
       
   179  */
       
   180 #define xmlXPathReturnNodeSet(ctxt, ns)                 \
       
   181     valuePush((ctxt), xmlXPathWrapNodeSet(ns))
       
   182 
       
   183 /**
       
   184  * xmlXPathReturnEmptyNodeSet:
       
   185  * @param ctxt an XPath parser context
       
   186  *
       
   187  * Pushes an empty node-set on the context stack.
       
   188  */
       
   189 #define xmlXPathReturnEmptyNodeSet(ctxt)                \
       
   190     valuePush((ctxt), xmlXPathNewNodeSet(NULL))
       
   191 
       
   192 /**
       
   193  * xmlXPathReturnExternal:
       
   194  * @param ctxt an XPath parser context
       
   195  * @param val user data
       
   196  *
       
   197  * Pushes user data on the context stack.
       
   198  */
       
   199 #define xmlXPathReturnExternal(ctxt, val)               \
       
   200     valuePush((ctxt), xmlXPathWrapExternal(val))
       
   201 
       
   202 /**
       
   203  * xmlXPathStackIsNodeSet:
       
   204  * @param ctxt an XPath parser context
       
   205  *
       
   206  * Check if the current value on the XPath stack is a node set or
       
   207  * an XSLT value tree.
       
   208  *
       
   209  * Returns true if the current object on the stack is a node-set.
       
   210  */
       
   211 #define xmlXPathStackIsNodeSet(ctxt)                    \
       
   212     (((ctxt)->value != NULL)                        \
       
   213      && (((ctxt)->value->type == XPATH_NODESET)             \
       
   214          || ((ctxt)->value->type == XPATH_XSLT_TREE)))
       
   215 
       
   216 /**
       
   217  * xmlXPathStackIsExternal:
       
   218  * @param ctxt an XPath parser context
       
   219  *
       
   220  * Checks if the current value on the XPath stack is an external
       
   221  * object.
       
   222  *
       
   223  * Returns true if the current object on the stack is an external
       
   224  * object.
       
   225  */
       
   226 #define xmlXPathStackIsExternal(ctxt)                   \
       
   227     ((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS))
       
   228 
       
   229 /**
       
   230  * xmlXPathEmptyNodeSet:
       
   231  * @param ns a node-set
       
   232  *
       
   233  * Empties a node-set.
       
   234  */
       
   235 #define xmlXPathEmptyNodeSet(ns)                    \
       
   236     { while ((ns)->nodeNr > 0) (ns)->nodeTab[(ns)->nodeNr--] = NULL; }
       
   237 
       
   238 /**
       
   239  * CHECK_ERROR:
       
   240  *
       
   241  * Macro to return from the function if an XPath error was detected.
       
   242  */
       
   243 #define CHECK_ERROR                         \
       
   244     if (ctxt->error != XPATH_EXPRESSION_OK) return
       
   245 
       
   246 /**
       
   247  * CHECK_ERROR0:
       
   248  *
       
   249  * Macro to return 0 from the function if an XPath error was detected.
       
   250  */
       
   251 #define CHECK_ERROR0                            \
       
   252     if (ctxt->error != XPATH_EXPRESSION_OK) return(0)
       
   253 
       
   254 /**
       
   255  * XP_ERROR:
       
   256  * @param X the error code
       
   257  *
       
   258  * Macro to raise an XPath error and return.
       
   259  */
       
   260 #define XP_ERROR(X)                         \
       
   261     { xmlXPathErr(ctxt, X); return; }
       
   262 
       
   263 /**
       
   264  * XP_ERROR0:
       
   265  * @param X the error code
       
   266  *
       
   267  * Macro to raise an XPath error and return 0.
       
   268  */
       
   269 #define XP_ERROR0(X)                            \
       
   270     { xmlXPathErr(ctxt, X); return(0); }
       
   271 
       
   272 /**
       
   273  * CHECK_TYPE:
       
   274  * @param typeval the XPath type
       
   275  *
       
   276  * Macro to check that the value on top of the XPath stack is of a given
       
   277  * type.
       
   278  */
       
   279 #define CHECK_TYPE(typeval)                     \
       
   280     if ((ctxt->value == NULL) || (ctxt->value->type != typeval))    \
       
   281         XP_ERROR(XPATH_INVALID_TYPE)
       
   282 
       
   283 /**
       
   284  * CHECK_TYPE0:
       
   285  * @param typeval the XPath type
       
   286  *
       
   287  * Macro to check that the value on top of the XPath stack is of a given
       
   288  * type. Return(0) in case of failure
       
   289  */
       
   290 #define CHECK_TYPE0(typeval)                        \
       
   291     if ((ctxt->value == NULL) || (ctxt->value->type != typeval))    \
       
   292         XP_ERROR0(XPATH_INVALID_TYPE)
       
   293 
       
   294 /**
       
   295  * CHECK_ARITY:
       
   296  * @param x the number of expected args
       
   297  *
       
   298  * Macro to check that the number of args passed to an XPath function matches.
       
   299  */
       
   300 #define CHECK_ARITY(x)                          \
       
   301     if (nargs != (x))                           \
       
   302         XP_ERROR(XPATH_INVALID_ARITY);
       
   303 
       
   304 /**
       
   305  * CAST_TO_STRING:
       
   306  *
       
   307  * Macro to try to cast the value on the top of the XPath stack to a string.
       
   308  */
       
   309 #define CAST_TO_STRING                          \
       
   310     if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING))   \
       
   311         xmlXPathStringFunction(ctxt, 1);
       
   312 
       
   313 /**
       
   314  * CAST_TO_NUMBER:
       
   315  *
       
   316  * Macro to try to cast the value on the top of the XPath stack to a number.
       
   317  */
       
   318 #define CAST_TO_NUMBER                          \
       
   319     if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER))   \
       
   320         xmlXPathNumberFunction(ctxt, 1);
       
   321 
       
   322 /**
       
   323  * CAST_TO_BOOLEAN:
       
   324  *
       
   325  * Macro to try to cast the value on the top of the XPath stack to a boolean.
       
   326  */
       
   327 #define CAST_TO_BOOLEAN                         \
       
   328     if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN))  \
       
   329         xmlXPathBooleanFunction(ctxt, 1);
       
   330 
       
   331 /*
       
   332  * Variable Lookup forwarding.
       
   333  */
       
   334 /**
       
   335  * xmlXPathVariableLookupFunc:
       
   336  * @param ctxt an XPath context
       
   337  * @param name name of the variable
       
   338  * @param ns_uri the namespace name hosting this variable
       
   339  *
       
   340  * Prototype for callbacks used to plug variable lookup in the XPath
       
   341  * engine.
       
   342  *
       
   343  * Returns the XPath object value or NULL if not found.
       
   344  */
       
   345 typedef xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt,
       
   346                      const xmlChar *name,
       
   347                      const xmlChar *ns_uri);
       
   348 
       
   349 XMLPUBFUN void XMLCALL
       
   350     xmlXPathRegisterVariableLookup  (xmlXPathContextPtr ctxt,
       
   351                      xmlXPathVariableLookupFunc f,
       
   352                      void *data);
       
   353 
       
   354 /*
       
   355  * Function Lookup forwarding.
       
   356  */
       
   357 /**
       
   358  * xmlXPathFuncLookupFunc:
       
   359  * @param ctxt an XPath context
       
   360  * @param name name of the function
       
   361  * @param ns_uri the namespace name hosting this function
       
   362  *
       
   363  * Prototype for callbacks used to plug function lookup in the XPath
       
   364  * engine.
       
   365  *
       
   366  * Returns the XPath function or NULL if not found.
       
   367  */
       
   368 typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
       
   369                      const xmlChar *name,
       
   370                      const xmlChar *ns_uri);
       
   371 
       
   372 XMLPUBFUN void XMLCALL
       
   373         xmlXPathRegisterFuncLookup  (xmlXPathContextPtr ctxt,
       
   374                      xmlXPathFuncLookupFunc f,
       
   375                      void *funcCtxt);
       
   376 
       
   377 /*
       
   378  * Error reporting.
       
   379  */
       
   380 
       
   381 
       
   382 // DONE: Replaced with macro
       
   383 #define xmlXPatherror(ctxt,file,line,no)  xmlXPathErr(ctxt, no)
       
   384 //XMLPUBFUN void XMLCALL
       
   385 //      xmlXPatherror   (xmlXPathParserContextPtr ctxt,
       
   386 //               const char *file,
       
   387 //               int line,
       
   388 //               int no);
       
   389 
       
   390 XMLPUBFUN void XMLCALL
       
   391         xmlXPathErr (xmlXPathParserContextPtr ctxt, int error);
       
   392 
       
   393 #ifdef LIBXML_DEBUG_ENABLED
       
   394 XMLPUBFUN void XMLCALL
       
   395         xmlXPathDebugDumpObject (FILE *output,
       
   396                      xmlXPathObjectPtr cur,
       
   397                      int depth);
       
   398 XMLPUBFUN void XMLCALL
       
   399         xmlXPathDebugDumpCompExpr(FILE *output,
       
   400                      xmlXPathCompExprPtr comp,
       
   401                      int depth);
       
   402 #endif
       
   403 /**
       
   404  * NodeSet handling.
       
   405  */
       
   406 XMLPUBFUN int XMLCALL
       
   407         xmlXPathNodeSetContains     (xmlNodeSetPtr cur,
       
   408                          xmlNodePtr val);
       
   409 XMLPUBFUN xmlNodeSetPtr XMLCALL
       
   410         xmlXPathDifference      (xmlNodeSetPtr nodes1,
       
   411                          xmlNodeSetPtr nodes2);
       
   412 XMLPUBFUN xmlNodeSetPtr XMLCALL
       
   413         xmlXPathIntersection        (xmlNodeSetPtr nodes1,
       
   414                          xmlNodeSetPtr nodes2);
       
   415 
       
   416 XMLPUBFUN xmlNodeSetPtr XMLCALL
       
   417         xmlXPathDistinctSorted      (xmlNodeSetPtr nodes);
       
   418 XMLPUBFUN xmlNodeSetPtr XMLCALL
       
   419         xmlXPathDistinct        (xmlNodeSetPtr nodes);
       
   420 
       
   421 XMLPUBFUN int XMLCALL
       
   422         xmlXPathHasSameNodes        (xmlNodeSetPtr nodes1,
       
   423                          xmlNodeSetPtr nodes2);
       
   424 
       
   425 XMLPUBFUN xmlNodeSetPtr XMLCALL
       
   426         xmlXPathNodeLeadingSorted   (xmlNodeSetPtr nodes,
       
   427                          xmlNodePtr node);
       
   428 XMLPUBFUN xmlNodeSetPtr XMLCALL
       
   429         xmlXPathLeadingSorted       (xmlNodeSetPtr nodes1,
       
   430                          xmlNodeSetPtr nodes2);
       
   431 XMLPUBFUN xmlNodeSetPtr XMLCALL
       
   432         xmlXPathNodeLeading     (xmlNodeSetPtr nodes,
       
   433                          xmlNodePtr node);
       
   434 XMLPUBFUN xmlNodeSetPtr XMLCALL
       
   435         xmlXPathLeading         (xmlNodeSetPtr nodes1,
       
   436                          xmlNodeSetPtr nodes2);
       
   437 
       
   438 XMLPUBFUN xmlNodeSetPtr XMLCALL
       
   439         xmlXPathNodeTrailingSorted  (xmlNodeSetPtr nodes,
       
   440                          xmlNodePtr node);
       
   441 XMLPUBFUN xmlNodeSetPtr XMLCALL
       
   442         xmlXPathTrailingSorted      (xmlNodeSetPtr nodes1,
       
   443                          xmlNodeSetPtr nodes2);
       
   444 XMLPUBFUN xmlNodeSetPtr XMLCALL
       
   445         xmlXPathNodeTrailing        (xmlNodeSetPtr nodes,
       
   446                          xmlNodePtr node);
       
   447 XMLPUBFUN xmlNodeSetPtr XMLCALL
       
   448         xmlXPathTrailing        (xmlNodeSetPtr nodes1,
       
   449                          xmlNodeSetPtr nodes2);
       
   450 
       
   451 
       
   452 /**
       
   453  * Extending a context.
       
   454  */
       
   455 
       
   456 XMLPUBFUN int XMLCALL
       
   457         xmlXPathRegisterNs      (xmlXPathContextPtr ctxt,
       
   458                          const xmlChar *prefix,
       
   459                          const xmlChar *ns_uri);
       
   460 XMLPUBFUN const xmlChar * XMLCALL
       
   461         xmlXPathNsLookup        (xmlXPathContextPtr ctxt,
       
   462                          const xmlChar *prefix);
       
   463 XMLPUBFUN void XMLCALL
       
   464         xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt);
       
   465 
       
   466 XMLPUBFUN int XMLCALL
       
   467         xmlXPathRegisterFunc        (xmlXPathContextPtr ctxt,
       
   468                          const xmlChar *name,
       
   469                          xmlXPathFunction f);
       
   470 XMLPUBFUN int XMLCALL
       
   471         xmlXPathRegisterFuncNS      (xmlXPathContextPtr ctxt,
       
   472                          const xmlChar *name,
       
   473                          const xmlChar *ns_uri,
       
   474                          xmlXPathFunction f);
       
   475 XMLPUBFUN int XMLCALL
       
   476         xmlXPathRegisterVariable    (xmlXPathContextPtr ctxt,
       
   477                          const xmlChar *name,
       
   478                          xmlXPathObjectPtr value);
       
   479 XMLPUBFUN int XMLCALL
       
   480         xmlXPathRegisterVariableNS  (xmlXPathContextPtr ctxt,
       
   481                          const xmlChar *name,
       
   482                          const xmlChar *ns_uri,
       
   483                          xmlXPathObjectPtr value);
       
   484 XMLPUBFUN xmlXPathFunction XMLCALL
       
   485         xmlXPathFunctionLookup      (xmlXPathContextPtr ctxt,
       
   486                          const xmlChar *name);
       
   487 XMLPUBFUN xmlXPathFunction XMLCALL
       
   488         xmlXPathFunctionLookupNS    (xmlXPathContextPtr ctxt,
       
   489                          const xmlChar *name,
       
   490                          const xmlChar *ns_uri);
       
   491 XMLPUBFUN void XMLCALL
       
   492         xmlXPathRegisteredFuncsCleanup  (xmlXPathContextPtr ctxt);
       
   493 XMLPUBFUN xmlXPathObjectPtr XMLCALL
       
   494         xmlXPathVariableLookup      (xmlXPathContextPtr ctxt,
       
   495                          const xmlChar *name);
       
   496 XMLPUBFUN xmlXPathObjectPtr XMLCALL
       
   497         xmlXPathVariableLookupNS    (xmlXPathContextPtr ctxt,
       
   498                          const xmlChar *name,
       
   499                          const xmlChar *ns_uri);
       
   500 XMLPUBFUN void XMLCALL
       
   501         xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
       
   502 
       
   503 /**
       
   504  * Utilities to extend XPath.
       
   505  */
       
   506 XMLPUBFUN xmlXPathParserContextPtr XMLCALL
       
   507         xmlXPathNewParserContext (const xmlChar *str, xmlXPathContextPtr ctxt);
       
   508 XMLPUBFUN void XMLCALL
       
   509         xmlXPathFreeParserContext(xmlXPathParserContextPtr ctxt);
       
   510 
       
   511 
       
   512 XMLPUBFUN xmlXPathObjectPtr XMLCALL
       
   513         valuePop  (xmlXPathParserContextPtr ctxt);
       
   514 XMLPUBFUN int XMLCALL
       
   515         valuePush (xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr value);
       
   516 XMLPUBFUN xmlXPathObjectPtr XMLCALL
       
   517         xmlXPathNewString   (const xmlChar *val);
       
   518 XMLPUBFUN xmlXPathObjectPtr XMLCALL
       
   519         xmlXPathNewCString  (const char *val);
       
   520 XMLPUBFUN xmlXPathObjectPtr XMLCALL
       
   521         xmlXPathWrapString  (xmlChar *val);
       
   522 XMLPUBFUN xmlXPathObjectPtr XMLCALL
       
   523         xmlXPathWrapCString (char * val);
       
   524 XMLPUBFUN xmlXPathObjectPtr XMLCALL
       
   525         xmlXPathNewFloat    (double val);
       
   526 XMLPUBFUN xmlXPathObjectPtr XMLCALL
       
   527         xmlXPathNewBoolean  (int val);
       
   528 XMLPUBFUN xmlXPathObjectPtr XMLCALL
       
   529         xmlXPathNewNodeSet  (xmlNodePtr val);
       
   530 XMLPUBFUN xmlXPathObjectPtr XMLCALL
       
   531         xmlXPathNewValueTree(xmlNodePtr val);
       
   532 XMLPUBFUN void XMLCALL
       
   533         xmlXPathNodeSetAdd  (xmlNodeSetPtr cur, xmlNodePtr val);
       
   534 XMLPUBFUN void XMLCALL
       
   535         xmlXPathNodeSetAddUnique(xmlNodeSetPtr cur, xmlNodePtr val);
       
   536 XMLPUBFUN void XMLCALL
       
   537         xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns);
       
   538 XMLPUBFUN void XMLCALL
       
   539         xmlXPathNodeSetSort (xmlNodeSetPtr set);
       
   540 XMLPUBFUN void XMLCALL
       
   541         xmlXPathRoot        (xmlXPathParserContextPtr ctxt);
       
   542 XMLPUBFUN void XMLCALL
       
   543         xmlXPathEvalExpr    (xmlXPathParserContextPtr ctxt);
       
   544 XMLPUBFUN xmlChar * XMLCALL
       
   545         xmlXPathParseName   (xmlXPathParserContextPtr ctxt);
       
   546 XMLPUBFUN xmlChar * XMLCALL
       
   547         xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
       
   548 
       
   549 /*
       
   550  * Existing functions.
       
   551  */
       
   552 XMLPUBFUN double XMLCALL
       
   553         xmlXPathStringEvalNumber (const xmlChar *str);
       
   554 XMLPUBFUN int XMLCALL
       
   555         xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr res);
       
   556 XMLPUBFUN void XMLCALL
       
   557         xmlXPathRegisterAllFunctions(xmlXPathContextPtr ctxt);
       
   558 XMLPUBFUN xmlNodeSetPtr XMLCALL
       
   559         xmlXPathNodeSetMerge        (xmlNodeSetPtr val1, xmlNodeSetPtr val2);
       
   560 XMLPUBFUN void XMLCALL
       
   561         xmlXPathNodeSetDel          (xmlNodeSetPtr cur, xmlNodePtr val);
       
   562 XMLPUBFUN void XMLCALL
       
   563         xmlXPathNodeSetRemove       (xmlNodeSetPtr cur, int val);
       
   564 XMLPUBFUN xmlXPathObjectPtr XMLCALL
       
   565         xmlXPathNewNodeSetList      (xmlNodeSetPtr val);
       
   566 XMLPUBFUN xmlXPathObjectPtr XMLCALL
       
   567         xmlXPathWrapNodeSet         (xmlNodeSetPtr val);
       
   568 XMLPUBFUN xmlXPathObjectPtr XMLCALL
       
   569         xmlXPathWrapExternal        (void *val);
       
   570 
       
   571 XMLPUBFUN int  XMLCALL xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
       
   572 XMLPUBFUN int  XMLCALL xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt);
       
   573 XMLPUBFUN int  XMLCALL xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
       
   574 XMLPUBFUN void XMLCALL xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt);
       
   575 XMLPUBFUN void XMLCALL xmlXPathAddValues(xmlXPathParserContextPtr ctxt);
       
   576 XMLPUBFUN void XMLCALL xmlXPathSubValues(xmlXPathParserContextPtr ctxt);
       
   577 XMLPUBFUN void XMLCALL xmlXPathMultValues(xmlXPathParserContextPtr ctxt);
       
   578 XMLPUBFUN void XMLCALL xmlXPathDivValues(xmlXPathParserContextPtr ctxt);
       
   579 XMLPUBFUN void XMLCALL xmlXPathModValues(xmlXPathParserContextPtr ctxt);
       
   580 
       
   581 XMLPUBFUN int XMLCALL xmlXPathIsNodeType(const xmlChar *name);
       
   582 
       
   583 /*
       
   584  * Some of the axis navigation routines.
       
   585  */
       
   586 XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
       
   587 XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextChild(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
       
   588 XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
       
   589 XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
       
   590 XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextParent(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
       
   591 XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
       
   592 XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
       
   593 XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
       
   594 XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
       
   595 XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
       
   596 XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
       
   597 XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
       
   598 XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
       
   599 /*
       
   600  * The official core of XPath functions.
       
   601  */
       
   602 XMLPUBFUN void XMLCALL xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   603 XMLPUBFUN void XMLCALL xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   604 XMLPUBFUN void XMLCALL xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   605 XMLPUBFUN void XMLCALL xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   606 XMLPUBFUN void XMLCALL xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   607 XMLPUBFUN void XMLCALL xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   608 XMLPUBFUN void XMLCALL xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   609 XMLPUBFUN void XMLCALL xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   610 XMLPUBFUN void XMLCALL xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   611 XMLPUBFUN void XMLCALL xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   612 XMLPUBFUN void XMLCALL xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   613 XMLPUBFUN void XMLCALL xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   614 XMLPUBFUN void XMLCALL xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   615 XMLPUBFUN void XMLCALL xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   616 XMLPUBFUN void XMLCALL xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   617 XMLPUBFUN void XMLCALL xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   618 XMLPUBFUN void XMLCALL xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   619 XMLPUBFUN void XMLCALL xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   620 XMLPUBFUN void XMLCALL xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   621 XMLPUBFUN void XMLCALL xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   622 XMLPUBFUN void XMLCALL xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   623 XMLPUBFUN void XMLCALL xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   624 XMLPUBFUN void XMLCALL xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   625 XMLPUBFUN void XMLCALL xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   626 XMLPUBFUN void XMLCALL xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   627 XMLPUBFUN void XMLCALL xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
       
   628 
       
   629 /**
       
   630  * Really internal functions
       
   631  */
       
   632 XMLPUBFUN void XMLCALL xmlXPathNodeSetFreeNs(xmlNsPtr ns);
       
   633 
       
   634 // XMLENGINE: NEW CODE -- XForms extensions support
       
   635 void addNodeSetsFromStackToDependencyList(xmlXPathParserContextPtr ctxt, int nargs);
       
   636 // END NEW CODE
       
   637 
       
   638 #ifdef __cplusplus
       
   639 }
       
   640 #endif
       
   641 #endif /* XML_XPATH_INTERNALS_H */
       
   642