* xmlXIncludeRecurseDoc: * @ctxt: the XInclude context * @doc: the new document * @url: the associated URL * * The XInclude recursive nature is handled at this point. */
| 574 | * The XInclude recursive nature is handled at this point. |
| 575 | */ |
| 576 | static void |
| 577 | xmlXIncludeRecurseDoc(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 | * * |
no test coverage detected