* xmlXPathSetContextNode: * @node: the node to to use as the context node * @ctx: the XPath context * * Sets 'node' as the context node. The node must be in the same * document as that associated with the context. * * Returns -1 in case of error or 0 if successful */
| 13325 | * Returns -1 in case of error or 0 if successful |
| 13326 | */ |
| 13327 | int |
| 13328 | xmlXPathSetContextNode(xmlNodePtr node, xmlXPathContextPtr ctx) { |
| 13329 | if ((node == NULL) || (ctx == NULL)) |
| 13330 | return(-1); |
| 13331 | |
| 13332 | if (node->doc == ctx->doc) { |
| 13333 | ctx->node = node; |
| 13334 | return(0); |
| 13335 | } |
| 13336 | return(-1); |
| 13337 | } |
| 13338 | |
| 13339 | /** |
| 13340 | * xmlXPathNodeEval: |