MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlXIncludeProcessTreeFlags

Function xmlXIncludeProcessTreeFlags

ThirdParty/libxml2/vtklibxml2/xinclude.c:2392–2410  ·  view source on GitHub ↗

* xmlXIncludeProcessTreeFlags: * @tree: a node in an XML document * @flags: a set of xmlParserOption used for parsing XML includes * * Implement the XInclude substitution for the given subtree * * Returns 0 if no substitution were done, -1 if some processing failed * or the number of substitutions done. */

Source from the content-addressed store, hash-verified

2390 * or the number of substitutions done.
2391 */
2392int
2393xmlXIncludeProcessTreeFlags(xmlNodePtr tree, int flags) {
2394 xmlXIncludeCtxtPtr ctxt;
2395 int ret = 0;
2396
2397 if ((tree == NULL) || (tree->type == XML_NAMESPACE_DECL) ||
2398 (tree->doc == NULL))
2399 return(-1);
2400 ctxt = xmlXIncludeNewContext(tree->doc);
2401 if (ctxt == NULL)
2402 return(-1);
2403 xmlXIncludeSetFlags(ctxt, flags);
2404 ret = xmlXIncludeDoProcessRoot(ctxt, tree);
2405 if ((ret >= 0) && (ctxt->nbErrors > 0))
2406 ret = -1;
2407
2408 xmlXIncludeFreeContext(ctxt);
2409 return(ret);
2410}
2411
2412/**
2413 * xmlXIncludeProcessTree:

Callers 1

xmlXIncludeProcessTreeFunction · 0.85

Calls 4

xmlXIncludeNewContextFunction · 0.85
xmlXIncludeSetFlagsFunction · 0.85
xmlXIncludeDoProcessRootFunction · 0.85
xmlXIncludeFreeContextFunction · 0.85

Tested by

no test coverage detected