* xmlXIncludeProcessNode: * @ctxt: an existing XInclude context * @node: a node in an XML document * * Implement the XInclude substitution for the given subtree reusing * the information and data coming from the given context. * * Returns 0 if no substitution were done, -1 if some processing failed * or the number of substitutions done. */
| 2435 | * or the number of substitutions done. |
| 2436 | */ |
| 2437 | int |
| 2438 | xmlXIncludeProcessNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) { |
| 2439 | int ret = 0; |
| 2440 | |
| 2441 | if ((node == NULL) || (node->type == XML_NAMESPACE_DECL) || |
| 2442 | (node->doc == NULL) || (ctxt == NULL)) |
| 2443 | return(-1); |
| 2444 | ret = xmlXIncludeDoProcessRoot(ctxt, node); |
| 2445 | if ((ret >= 0) && (ctxt->nbErrors > 0)) |
| 2446 | ret = -1; |
| 2447 | return(ret); |
| 2448 | } |
| 2449 | |
| 2450 | #else /* !LIBXML_XINCLUDE_ENABLED */ |
| 2451 | #endif |