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