xpathInternals.h 17 KB

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