xpathInternals.inc 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  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. *)
  11. {$IFDEF LIBXML_XPATH_ENABLED}
  12. {$IFDEF _FUNCTION}
  13. (************************************************************************
  14. * *
  15. * Helpers *
  16. * *
  17. ************************************************************************)
  18. (*
  19. * Many of these macros may later turn into functions. They
  20. * shouldn't be used in {'s preprocessor instructions.
  21. *)
  22. (**
  23. * xmlXPathSetError:
  24. * @ctxt: an XPath parser context
  25. * @err: an xmlXPathError code
  26. *
  27. * Raises an error.
  28. *)
  29. #define xmlXPathSetError(ctxt, err) \
  30. { xmlXPatherror((ctxt), __FILE__, __LINE__, (err)); \
  31. if ((ctxt) != NULL) (ctxt)->error = (err); }
  32. (**
  33. * xmlXPathSetArityError:
  34. * @ctxt: an XPath parser context
  35. *
  36. * Raises an XPATH_INVALID_ARITY error.
  37. *)
  38. #define xmlXPathSetArityError(ctxt) \
  39. xmlXPathSetError((ctxt), XPATH_INVALID_ARITY)
  40. (**
  41. * xmlXPathSetTypeError:
  42. * @ctxt: an XPath parser context
  43. *
  44. * Raises an XPATH_INVALID_TYPE error.
  45. *)
  46. #define xmlXPathSetTypeError(ctxt) \
  47. xmlXPathSetError((ctxt), XPATH_INVALID_TYPE)
  48. (**
  49. * xmlXPathGetError:
  50. * @ctxt: an XPath parser context
  51. *
  52. * Get the error code of an XPath context.
  53. *
  54. * Returns the context error.
  55. *)
  56. #define xmlXPathGetError(ctxt) ((ctxt)->error)
  57. (**
  58. * xmlXPathCheckError:
  59. * @ctxt: an XPath parser context
  60. *
  61. * Check if an XPath error was raised.
  62. *
  63. * Returns true if an error has been raised, false otherwise.
  64. *)
  65. #define xmlXPathCheckError(ctxt) ((ctxt)->error != XPATH_EXPRESSION_OK)
  66. (**
  67. * xmlXPathGetDocument:
  68. * @ctxt: an XPath parser context
  69. *
  70. * Get the document of an XPath context.
  71. *
  72. * Returns the context document.
  73. *)
  74. #define xmlXPathGetDocument(ctxt) ((ctxt)->context->doc)
  75. (**
  76. * xmlXPathGetContextNode:
  77. * @ctxt: an XPath parser context
  78. *
  79. * Get the context node of an XPath context.
  80. *
  81. * Returns the context node.
  82. *)
  83. #define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node)
  84. external xml2lib int EXTDECL
  85. xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt);
  86. external xml2lib double EXTDECL
  87. xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
  88. external xml2lib xmlChar * EXTDECL
  89. xmlXPathPopString (xmlXPathParserContextPtr ctxt);
  90. external xml2lib xmlNodeSetPtr EXTDECL
  91. xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
  92. external xml2lib void * EXTDECL
  93. xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
  94. (**
  95. * xmlXPathReturnBoolean:
  96. * @ctxt: an XPath parser context
  97. * @val: a boolean
  98. *
  99. * Pushes the boolean @val on the context stack.
  100. *)
  101. #define xmlXPathReturnBoolean(ctxt, val) \
  102. valuePush((ctxt), xmlXPathNewBoolean(val))
  103. (**
  104. * xmlXPathReturnTrue:
  105. * @ctxt: an XPath parser context
  106. *
  107. * Pushes true on the context stack.
  108. *)
  109. #define xmlXPathReturnTrue(ctxt) xmlXPathReturnBoolean((ctxt), 1)
  110. (**
  111. * xmlXPathReturnFalse:
  112. * @ctxt: an XPath parser context
  113. *
  114. * Pushes false on the context stack.
  115. *)
  116. #define xmlXPathReturnFalse(ctxt) xmlXPathReturnBoolean((ctxt), 0)
  117. (**
  118. * xmlXPathReturnNumber:
  119. * @ctxt: an XPath parser context
  120. * @val: a double
  121. *
  122. * Pushes the double @val on the context stack.
  123. *)
  124. #define xmlXPathReturnNumber(ctxt, val) \
  125. valuePush((ctxt), xmlXPathNewFloat(val))
  126. (**
  127. * xmlXPathReturnString:
  128. * @ctxt: an XPath parser context
  129. * @str: a string
  130. *
  131. * Pushes the string @str on the context stack.
  132. *)
  133. #define xmlXPathReturnString(ctxt, str) \
  134. valuePush((ctxt), xmlXPathWrapString(str))
  135. (**
  136. * xmlXPathReturnEmptyString:
  137. * @ctxt: an XPath parser context
  138. *
  139. * Pushes an empty string on the stack.
  140. *)
  141. #define xmlXPathReturnEmptyString(ctxt) \
  142. valuePush((ctxt), xmlXPathNewCString(""))
  143. (**
  144. * xmlXPathReturnNodeSet:
  145. * @ctxt: an XPath parser context
  146. * @ns: a node-set
  147. *
  148. * Pushes the node-set @ns on the context stack.
  149. *)
  150. #define xmlXPathReturnNodeSet(ctxt, ns) \
  151. valuePush((ctxt), xmlXPathWrapNodeSet(ns))
  152. (**
  153. * xmlXPathReturnEmptyNodeSet:
  154. * @ctxt: an XPath parser context
  155. *
  156. * Pushes an empty node-set on the context stack.
  157. *)
  158. #define xmlXPathReturnEmptyNodeSet(ctxt) \
  159. valuePush((ctxt), xmlXPathNewNodeSet(NULL))
  160. (**
  161. * xmlXPathReturnExternal:
  162. * @ctxt: an XPath parser context
  163. * @val: user data
  164. *
  165. * Pushes user data on the context stack.
  166. *)
  167. #define xmlXPathReturnExternal(ctxt, val) \
  168. valuePush((ctxt), xmlXPathWrapExternal(val))
  169. (**
  170. * xmlXPathStackIsNodeSet:
  171. * @ctxt: an XPath parser context
  172. *
  173. * Check if the current value on the XPath stack is a node set or
  174. * an XSLT value tree.
  175. *
  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. * xmlXPathStackIsExternal:
  184. * @ctxt: an XPath parser context
  185. *
  186. * Checks if the current value on the XPath stack is an external
  187. * object.
  188. *
  189. * Returns true if the current object on the stack is an external
  190. * object.
  191. *)
  192. #define xmlXPathStackIsExternal(ctxt) \
  193. ((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS))
  194. (**
  195. * xmlXPathEmptyNodeSet:
  196. * @ns: a node-set
  197. *
  198. * Empties a node-set.
  199. *)
  200. #define xmlXPathEmptyNodeSet(ns) \
  201. { while ((ns)->nodeNr > 0) (ns)->nodeTab[(ns)->nodeNr--] = NULL; }
  202. (**
  203. * CHECK_ERROR:
  204. *
  205. * Macro to return from the function if an XPath error was detected.
  206. *)
  207. #define CHECK_ERROR \
  208. if (ctxt->error != XPATH_EXPRESSION_OK) return
  209. (**
  210. * CHECK_ERROR0:
  211. *
  212. * Macro to return 0 from the function if an XPath error was detected.
  213. *)
  214. #define CHECK_ERROR0 \
  215. if (ctxt->error != XPATH_EXPRESSION_OK) return(0)
  216. (**
  217. * XP_ERROR:
  218. * @X: the error code
  219. *
  220. * Macro to raise an XPath error and return.
  221. *)
  222. #define XP_ERROR(X) \
  223. { xmlXPathErr(ctxt, X); return; }
  224. (**
  225. * XP_ERROR0:
  226. * @X: the error code
  227. *
  228. * Macro to raise an XPath error and return 0.
  229. *)
  230. #define XP_ERROR0(X) \
  231. { xmlXPathErr(ctxt, X); return(0); }
  232. (**
  233. * CHECK_TYPE:
  234. * @typeval: the XPath type
  235. *
  236. * Macro to check that the value on top of the XPath stack is of a given
  237. * type.
  238. *)
  239. #define CHECK_TYPE(typeval) \
  240. if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
  241. XP_ERROR(XPATH_INVALID_TYPE)
  242. (**
  243. * CHECK_TYPE0:
  244. * @typeval: the XPath type
  245. *
  246. * Macro to check that the value on top of the XPath stack is of a given
  247. * type. Return(0) in case of failure
  248. *)
  249. #define CHECK_TYPE0(typeval) \
  250. if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
  251. XP_ERROR0(XPATH_INVALID_TYPE)
  252. (**
  253. * CHECK_ARITY:
  254. * @x: the number of expected args
  255. *
  256. * Macro to check that the number of args passed to an XPath function matches.
  257. *)
  258. #define CHECK_ARITY(x) \
  259. if (ctxt == NULL) return; \
  260. if (nargs != (x)) \
  261. XP_ERROR(XPATH_INVALID_ARITY);
  262. (**
  263. * CAST_TO_STRING:
  264. *
  265. * Macro to try to cast the value on the top of the XPath stack to a string.
  266. *)
  267. #define CAST_TO_STRING \
  268. if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING)) \
  269. xmlXPathStringFunction(ctxt, 1);
  270. (**
  271. * CAST_TO_NUMBER:
  272. *
  273. * Macro to try to cast the value on the top of the XPath stack to a number.
  274. *)
  275. #define CAST_TO_NUMBER \
  276. if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER)) \
  277. xmlXPathNumberFunction(ctxt, 1);
  278. (**
  279. * CAST_TO_BOOLEAN:
  280. *
  281. * Macro to try to cast the value on the top of the XPath stack to a boolean.
  282. *)
  283. #define CAST_TO_BOOLEAN \
  284. if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN)) \
  285. xmlXPathBooleanFunction(ctxt, 1);
  286. {$ENDIF}
  287. {$IFDEF FUNCTION}
  288. (*
  289. * Variable Lookup forwarding.
  290. *)
  291. procedure xmlXPathRegisterVariableLookup(ctxt: xmlXPathContextPtr; f: xmlXPathVariableLookupFunc; data: pointer); EXTDECL; external xml2lib;
  292. (*
  293. * Function Lookup forwarding.
  294. *)
  295. procedure xmlXPathRegisterFuncLookup(ctxt: xmlXPathContextPtr; f: xmlXPathFuncLookupFunc; funcCtxt: pointer); EXTDECL; external xml2lib;
  296. (*
  297. * Error reporting.
  298. *)
  299. //procedure __xmlXPatherror(ctxt: xmlXPathParserContextPtr; _file: pchar; line, no: cint); EXTDECL; external xml2lib name 'xmlXPatherror';
  300. procedure xmlXPathErr(ctxt: xmlXPathParserContextPtr; error: cint); EXTDECL; external xml2lib;
  301. {$IFDEF LIBXML_DEBUG_ENABLED}
  302. procedure xmlXPathDebugDumpObject(output: PFILE; cur: xmlXPathObjectPtr; depth: cint); EXTDECL; external xml2lib;
  303. procedure xmlXPathDebugDumpCompExpr(output: PFILE; comp: xmlXPathCompExprPtr; depth: cint); EXTDECL; external xml2lib;
  304. {$ENDIF}
  305. (**
  306. * NodeSet handling.
  307. *)
  308. function xmlXPathNodeSetContains(cur: xmlNodeSetPtr; val: xmlNodePtr): cint; EXTDECL; external xml2lib;
  309. function xmlXPathDifference(nodes1, nodes2: xmlNodeSetPtr): xmlNodeSetPtr; EXTDECL; external xml2lib;
  310. function xmlXPathIntersection(nodes1, nodes2: xmlNodeSetPtr): xmlNodeSetPtr; EXTDECL; external xml2lib;
  311. function xmlXPathDistinctSorted(nodes: xmlNodeSetPtr): xmlNodeSetPtr; EXTDECL; external xml2lib;
  312. function xmlXPathDistinct(nodes: xmlNodeSetPtr): xmlNodeSetPtr; EXTDECL; external xml2lib;
  313. function xmlXPathHasSameNodes(nodes1, nodes2: xmlNodeSetPtr): cint; EXTDECL; external xml2lib;
  314. function xmlXPathNodeLeadingSorted(nodes: xmlNodeSetPtr; node: xmlNodePtr): xmlNodeSetPtr; EXTDECL; external xml2lib;
  315. function xmlXPathLeadingSorted(nodes1, nodes2: xmlNodeSetPtr): xmlNodeSetPtr; EXTDECL; external xml2lib;
  316. function xmlXPathNodeLeading(nodes: xmlNodeSetPtr; node: xmlNodePtr): xmlNodeSetPtr; EXTDECL; external xml2lib;
  317. function xmlXPathLeading(nodes1, nodes2: xmlNodeSetPtr): xmlNodeSetPtr; EXTDECL; external xml2lib;
  318. function xmlXPathNodeTrailingSorted(nodes: xmlNodeSetPtr; node: xmlNodePtr): xmlNodeSetPtr; EXTDECL; external xml2lib;
  319. function xmlXPathTrailingSorted(nodes1, nodes2: xmlNodeSetPtr): xmlNodeSetPtr; EXTDECL; external xml2lib;
  320. function xmlXPathNodeTrailing(nodes: xmlNodeSetPtr; node: xmlNodePtr): xmlNodeSetPtr; EXTDECL; external xml2lib;
  321. function xmlXPathTrailing(nodes1, nodes2: xmlNodeSetPtr): xmlNodeSetPtr; EXTDECL; external xml2lib;
  322. (**
  323. * Extending a context.
  324. *)
  325. function xmlXPathRegisterNs(ctxt: xmlXPathContextPtr; prefix, ns_uri: xmlCharPtr): cint; EXTDECL; external xml2lib;
  326. function xmlXPathNsLookup(ctxt: xmlXPathContextPtr; prefix: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  327. procedure xmlXPathDebugDumpCompExpr(ctxt: xmlXPathContextPtr); EXTDECL; external xml2lib;
  328. function xmlXPathRegisterFunc(ctxt: xmlXPathContextPtr; name: xmlCharPtr; f: xmlXPathFunction): cint; EXTDECL; external xml2lib;
  329. function xmlXPathRegisterFuncNS(ctxt: xmlXPathContextPtr; name, ns_uri: xmlCharPtr; f: xmlXPathFunction): cint; EXTDECL; external xml2lib;
  330. function xmlXPathRegisterVariable(ctxt: xmlXPathContextPtr; name: xmlCharPtr; value: xmlXPathObjectPtr): cint; EXTDECL; external xml2lib;
  331. function xmlXPathRegisterVariableNS(ctxt: xmlXPathContextPtr; name, ns_uri: xmlCharPtr; value: xmlXPathObjectPtr): cint; EXTDECL; external xml2lib;
  332. function xmlXPathFunctionLookup(ctxt: xmlXPathContextPtr; name: xmlCharPtr): xmlXPathFunction; EXTDECL; external xml2lib;
  333. function xmlXPathFunctionLookupNS(ctxt: xmlXPathContextPtr; name, ns_uri: xmlCharPtr): xmlXPathFunction; EXTDECL; external xml2lib;
  334. procedure xmlXPathRegisteredFuncsCleanup(ctxt: xmlXPathContextPtr); EXTDECL; external xml2lib;
  335. function xmlXPathVariableLookup(ctxt: xmlXPathContextPtr; name: xmlCharPtr): xmlXPathObjectPtr; EXTDECL; external xml2lib;
  336. function xmlXPathVariableLookupNS(ctxt: xmlXPathContextPtr; name, ns_uri: xmlCharPtr): xmlXPathObjectPtr; EXTDECL; external xml2lib;
  337. procedure xmlXPathRegisteredVariablesCleanup(ctxt: xmlXPathContextPtr); EXTDECL; external xml2lib;
  338. (**
  339. * Utilities to extend XPath.
  340. *)
  341. function xmlXPathNewParserContext(str: xmlCharPtr; ctxt: xmlXPathContextPtr): xmlXPathParserContextPtr; EXTDECL; external xml2lib;
  342. procedure xmlXPathFreeParserContext(ctxt: xmlXPathParserContextPtr); EXTDECL; external xml2lib;
  343. (* TODO: remap to xmlXPathValuePop and Push. *)
  344. function valuePop(ctxt: xmlXPathParserContextPtr): xmlXPathObjectPtr; EXTDECL; external xml2lib;
  345. function valuePush(ctxt: xmlXPathParserContextPtr): cint; EXTDECL; external xml2lib;
  346. function xmlXPathNewString(val: xmlCharPtr): xmlXPathObjectPtr; EXTDECL; external xml2lib;
  347. function xmlXPathNewCString(val: pchar): xmlXPathObjectPtr; EXTDECL; external xml2lib;
  348. function xmlXPathWrapString(val: xmlCharPtr): xmlXPathObjectPtr; EXTDECL; external xml2lib;
  349. function xmlXPathWrapCString(val: pchar): xmlXPathObjectPtr; EXTDECL; external xml2lib;
  350. function xmlXPathNewFloat(val: cdouble): xmlXPathObjectPtr; EXTDECL; external xml2lib;
  351. function xmlXPathNewBoolean(val: cint): xmlXPathObjectPtr; EXTDECL; external xml2lib;
  352. function xmlXPathNewNodeSet(val: xmlNodePtr): xmlXPathObjectPtr; EXTDECL; external xml2lib;
  353. function xmlXPathNewValueTree(val: xmlNodePtr): xmlXPathObjectPtr; EXTDECL; external xml2lib;
  354. procedure xmlXPathNodeSetAddUnique(cur: xmlNodeSetPtr; val: xmlNodePtr); EXTDECL; external xml2lib;
  355. procedure xmlXPathNodeSetAdd(cur: xmlNodeSetPtr; val: xmlNodePtr); EXTDECL; external xml2lib;
  356. procedure xmlXPathNodeSetAddNs(cur: xmlNodeSetPtr; node: xmlNodePtr; ns: xmlNsPtr); EXTDECL; external xml2lib;
  357. procedure xmlXPathNodeSetSort(_set: xmlNodeSetPtr); EXTDECL; external xml2lib;
  358. procedure xmlXPathRoot(ctxt: xmlXPathParserContextPtr); EXTDECL; external xml2lib;
  359. procedure xmlXPathEvalExpr(ctxt: xmlXPathParserContextPtr); EXTDECL; external xml2lib;
  360. function xmlXPathParseName(ctxt: xmlXPathParserContextPtr): xmlCharPtr; EXTDECL; external xml2lib;
  361. function xmlXPathParseNCName(ctxt: xmlXPathParserContextPtr): xmlCharPtr; EXTDECL; external xml2lib;
  362. (*
  363. * Existing functions.
  364. *)
  365. {external xml2lib double EXTDECL
  366. xmlXPathStringEvalNumber (xmlChar *str);
  367. external xml2lib int EXTDECL
  368. xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
  369. xmlXPathObjectPtr res);
  370. external xml2lib void EXTDECL
  371. xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt);
  372. external xml2lib xmlNodeSetPtr EXTDECL
  373. xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
  374. xmlNodeSetPtr val2);
  375. external xml2lib void EXTDECL
  376. xmlXPathNodeSetDel (xmlNodeSetPtr cur,
  377. xmlNodePtr val);
  378. external xml2lib void EXTDECL
  379. xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
  380. int val);
  381. external xml2lib xmlXPathObjectPtr EXTDECL
  382. xmlXPathNewNodeSetList (xmlNodeSetPtr val);
  383. external xml2lib xmlXPathObjectPtr EXTDECL
  384. xmlXPathWrapNodeSet (xmlNodeSetPtr val);
  385. external xml2lib xmlXPathObjectPtr EXTDECL
  386. xmlXPathWrapExternal (void *val);}
  387. function xmlXPathEqualValues(ctxt: xmlXPathParserContextPtr): cint; EXTDECL; external xml2lib;
  388. function xmlXPathNotEqualValues(ctxt: xmlXPathParserContextPtr): cint; EXTDECL; external xml2lib;
  389. function xmlXPathCompareValues(ctxt: xmlXPathParserContextPtr; inf, strict: cint): cint; EXTDECL; external xml2lib;
  390. procedure xmlXPathValueFlipSign(ctxt: xmlXPathParserContextPtr); EXTDECL; external xml2lib;
  391. procedure xmlXPathAddValues(ctxt: xmlXPathParserContextPtr); EXTDECL; external xml2lib;
  392. procedure xmlXPathSubValues(ctxt: xmlXPathParserContextPtr); EXTDECL; external xml2lib;
  393. procedure xmlXPathMultValues(ctxt: xmlXPathParserContextPtr); EXTDECL; external xml2lib;
  394. procedure xmlXPathDivValues(ctxt: xmlXPathParserContextPtr); EXTDECL; external xml2lib;
  395. procedure xmlXPathModValues(ctxt: xmlXPathParserContextPtr); EXTDECL; external xml2lib;
  396. function xmlXPathIsNodeType(name: xmlCharPtr): cint; EXTDECL; external xml2lib;
  397. (*
  398. * Some of the axis navigation routines.
  399. *)
  400. function xmlXPathNextSelf(ctxt: xmlXPathParserContextPtr; cur: xmlNodePtr): xmlNodePtr; EXTDECL; external xml2lib;
  401. function xmlXPathNextChild(ctxt: xmlXPathParserContextPtr; cur: xmlNodePtr): xmlNodePtr; EXTDECL; external xml2lib;
  402. function xmlXPathNextDescendant(ctxt: xmlXPathParserContextPtr; cur: xmlNodePtr): xmlNodePtr; EXTDECL; external xml2lib;
  403. function xmlXPathNextDescendantOrSelf(ctxt: xmlXPathParserContextPtr; cur: xmlNodePtr): xmlNodePtr; EXTDECL; external xml2lib;
  404. function xmlXPathNextParent(ctxt: xmlXPathParserContextPtr; cur: xmlNodePtr): xmlNodePtr; EXTDECL; external xml2lib;
  405. function xmlXPathNextAncestorOrSelf(ctxt: xmlXPathParserContextPtr; cur: xmlNodePtr): xmlNodePtr; EXTDECL; external xml2lib;
  406. function xmlXPathNextFollowingSibling(ctxt: xmlXPathParserContextPtr; cur: xmlNodePtr): xmlNodePtr; EXTDECL; external xml2lib;
  407. function xmlXPathNextFollowing(ctxt: xmlXPathParserContextPtr; cur: xmlNodePtr): xmlNodePtr; EXTDECL; external xml2lib;
  408. function xmlXPathNextNamespace(ctxt: xmlXPathParserContextPtr; cur: xmlNodePtr): xmlNodePtr; EXTDECL; external xml2lib;
  409. function xmlXPathNextAttribute(ctxt: xmlXPathParserContextPtr; cur: xmlNodePtr): xmlNodePtr; EXTDECL; external xml2lib;
  410. function xmlXPathNextPreceding(ctxt: xmlXPathParserContextPtr; cur: xmlNodePtr): xmlNodePtr; EXTDECL; external xml2lib;
  411. function xmlXPathNextAncestor(ctxt: xmlXPathParserContextPtr; cur: xmlNodePtr): xmlNodePtr; EXTDECL; external xml2lib;
  412. function xmlXPathNextPrecedingSibling(ctxt: xmlXPathParserContextPtr; cur: xmlNodePtr): xmlNodePtr; EXTDECL; external xml2lib;
  413. (*
  414. * The official core of XPath functions.
  415. *)
  416. procedure xmlXPathLastFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  417. procedure xmlXPathPositionFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  418. procedure xmlXPathCountFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  419. procedure xmlXPathIdFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  420. procedure xmlXPathLocalNameFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  421. procedure xmlXPathNamespaceURIFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  422. procedure xmlXPathStringFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  423. procedure xmlXPathStringLengthFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  424. procedure xmlXPathConcatFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  425. procedure xmlXPathContainsFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  426. procedure xmlXPathStartsWithFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  427. procedure xmlXPathSubstringFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  428. procedure xmlXPathSubstringBeforeFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  429. procedure xmlXPathSubstringAfterFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  430. procedure xmlXPathNormalizeFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  431. procedure xmlXPathTranslateFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  432. procedure xmlXPathNotFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  433. procedure xmlXPathTrueFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  434. procedure xmlXPathFalseFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  435. procedure xmlXPathLangFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  436. procedure xmlXPathNumberFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  437. procedure xmlXPathSumFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  438. procedure xmlXPathFloorFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  439. procedure xmlXPathCeilingFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  440. procedure xmlXPathRoundFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  441. procedure xmlXPathBooleanFunction(ctxt: xmlXPathParserContextPtr; nargs: cint); EXTDECL; external xml2lib;
  442. (**
  443. * Really internal functions
  444. *)
  445. procedure xmlXPathNodeSetFreeNs(ns: xmlNsPtr); EXTDECL; external xml2lib;
  446. {$ENDIF}
  447. {$ENDIF} (* LIBXML_XPATH_ENABLED *)