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