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

Function xmlXIncludeRecurseDoc

ThirdParty/libxml2/vtklibxml2/xinclude.c:576–607  ·  view source on GitHub ↗

* xmlXIncludeRecurseDoc: * @ctxt: the XInclude context * @doc: the new document * @url: the associated URL * * The XInclude recursive nature is handled at this point. */

Source from the content-addressed store, hash-verified

574 * The XInclude recursive nature is handled at this point.
575 */
576static void
577xmlXIncludeRecurseDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc) {
578 xmlDocPtr oldDoc;
579 xmlXIncludeRefPtr *oldIncTab;
580 int oldIncMax, oldIncNr, oldIsStream;
581 int i;
582
583 oldDoc = ctxt->doc;
584 oldIncMax = ctxt->incMax;
585 oldIncNr = ctxt->incNr;
586 oldIncTab = ctxt->incTab;
587 oldIsStream = ctxt->isStream;
588 ctxt->doc = doc;
589 ctxt->incMax = 0;
590 ctxt->incNr = 0;
591 ctxt->incTab = NULL;
592 ctxt->isStream = 0;
593
594 xmlXIncludeDoProcess(ctxt, xmlDocGetRootElement(doc));
595
596 if (ctxt->incTab != NULL) {
597 for (i = 0; i < ctxt->incNr; i++)
598 xmlXIncludeFreeRef(ctxt->incTab[i]);
599 xmlFree(ctxt->incTab);
600 }
601
602 ctxt->doc = oldDoc;
603 ctxt->incMax = oldIncMax;
604 ctxt->incNr = oldIncNr;
605 ctxt->incTab = oldIncTab;
606 ctxt->isStream = oldIsStream;
607}
608
609/************************************************************************
610 * *

Callers 1

xmlXIncludeLoadDocFunction · 0.85

Calls 3

xmlXIncludeDoProcessFunction · 0.85
xmlDocGetRootElementFunction · 0.85
xmlXIncludeFreeRefFunction · 0.85

Tested by

no test coverage detected