Lines Matching defs:doc
55 xmlDocPtr doc; /* the parsed document */
59 int count; /* how many refs use that specific doc */
65 xmlDocPtr doc; /* the source document */
90 xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree);
198 if (ref->doc != NULL) {
200 xmlGenericError(xmlGenericErrorContext, "Freeing doc %s\n", ref->URI);
202 xmlFreeDoc(ref->doc);
242 ret->doc = NULL;
272 * @doc: an XML Document
279 xmlXIncludeNewContext(xmlDocPtr doc) {
285 if (doc == NULL)
289 xmlXIncludeErrMemory(NULL, (xmlNodePtr) doc,
294 ret->doc = doc;
442 if ((ctxt->doc != NULL) && (ctxt->doc->dict != NULL) &&
445 pctxt->dict = ctxt->doc->dict;
543 base = xmlNodeGetBase(ctxt->doc, cur);
545 URI = xmlBuildURI(href, ctxt->doc->URL);
637 ref->doc = NULL;
647 * @doc: the new document
653 xmlXIncludeRecurseDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc,
661 if (xmlStrEqual(doc->URL, ctxt->urlTab[i]))
667 xmlGenericError(xmlGenericErrorContext, "Recursing in doc %s\n", doc->URL);
673 newctxt = xmlXIncludeNewContext(doc);
683 xmlXIncludeErrMemory(ctxt, (xmlNodePtr) doc, "processing doc");
713 xmlXIncludeDoProcess(newctxt, doc, xmlDocGetRootElement(doc));
730 xmlGenericError(xmlGenericErrorContext, "Done recursing in doc %s\n", url);
1107 source = ctxt->doc;
1228 xmlDocPtr doc;
1235 * @doc: the including doc
1244 xmlDocPtr doc;
1250 doc = data->doc;
1251 if ((ctxt == NULL) || (doc == NULL))
1263 ret = xmlAddDocEntity(doc, ent->name, ent->etype, ent->ExternalID,
1269 prev = xmlGetDocEntity(doc, ent->name);
1310 * @doc: the including doc
1311 * @from: the included doc
1318 xmlXIncludeMergeEntities(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc,
1329 target = doc->intSubset;
1331 cur = xmlDocGetRootElement(doc);
1334 target = xmlCreateIntSubset(doc, cur->name, NULL, NULL);
1344 data.doc = doc;
1354 data.doc = doc;
1380 xmlDocPtr doc;
1390 xmlGenericError(xmlGenericErrorContext, "Loading doc %s:%d\n", url, nr);
1429 * directly through ctxt->doc.
1432 ((ctxt->doc != NULL) && (xmlStrEqual(URL, ctxt->doc->URL)))) {
1433 doc = NULL;
1442 (ctxt->incTab[i]->doc != NULL)) {
1443 doc = ctxt->incTab[i]->doc;
1469 doc = xmlXIncludeParseFile(ctxt, (const char *)URL);
1473 if (doc == NULL) {
1479 ctxt->incTab[nr]->doc = doc;
1483 * To check for this, we compare the URL with that of the doc
1486 if (!xmlStrEqual(URL, doc->URL)) {
1488 URL = xmlStrdup(doc->URL);
1503 xmlXIncludeMergeEntities(ctxt, ctxt->doc, doc);
1507 if (doc->intSubset != NULL) {
1508 xmlUnlinkNode((xmlNodePtr) doc->intSubset);
1509 xmlFreeNode((xmlNodePtr) doc->intSubset);
1510 doc->intSubset = NULL;
1512 if (doc->extSubset != NULL) {
1513 xmlUnlinkNode((xmlNodePtr) doc->extSubset);
1514 xmlFreeNode((xmlNodePtr) doc->extSubset);
1515 doc->extSubset = NULL;
1518 xmlXIncludeRecurseDoc(ctxt, doc, URL);
1525 if (doc == NULL)
1529 ctxt->incTab[nr]->inc = xmlCopyNodeList(ctxt->doc->children);
1531 ctxt->incTab[nr]->inc = xmlXIncludeCopyNodeList(ctxt, ctxt->doc,
1532 doc, doc->children);
1545 if (doc == NULL) {
1546 xptrctxt = xmlXPtrNewContext(ctxt->doc, ctxt->incTab[nr]->ref,
1549 xptrctxt = xmlXPtrNewContext(doc, NULL, NULL);
1621 nodeBase = xmlNodeGetBase(el->doc, el);
1623 if (!xmlStrEqual(nodeBase, el->doc->URL))
1663 if (doc == NULL) {
1668 xmlXIncludeCopyXPointer(ctxt, ctxt->doc, doc, xptr);
1679 if ((doc != NULL) && (URL != NULL) && (xmlStrchr(URL, (xmlChar) '/'))) {
1713 curBase = xmlNodeGetBase(node->doc, node);
1723 if (xmlStrEqual(curBase, node->doc->URL)) {
1758 if ((nr < ctxt->incNr) && (ctxt->incTab[nr]->doc != NULL) &&
1761 printf("freeing %s\n", ctxt->incTab[nr]->doc->URL);
1763 xmlFreeDoc(ctxt->incTab[nr]->doc);
1764 ctxt->incTab[nr]->doc = NULL;
1816 * directly through ctxt->doc.
1930 newctxt = xmlXIncludeNewContext(ctxt->doc);
1935 ret = xmlXIncludeDoProcess(newctxt, ctxt->doc, fallback->children);
1942 ctxt->incTab[nr]->inc = xmlDocCopyNodeList(ctxt->doc,
2031 base = xmlNodeGetBase(ctxt->doc, cur);
2033 URI = xmlBuildURI(href, ctxt->doc->URL);
2157 xmlXIncludeCopyXPointer(ctxt, ctxt->doc, ctxt->doc,
2205 end = xmlNewDocNode(cur->doc, cur->ns, cur->name, NULL);
2309 * @doc: an XML document
2312 * Implement the XInclude substitution on the XML document @doc
2318 xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
2323 if ((doc == NULL) || (tree == NULL))
2328 if (doc->URL != NULL) {
2329 ret = xmlXIncludeURLPush(ctxt, doc->URL);
2397 if (doc->URL != NULL)
2421 * @doc: an XML document
2426 * Implement the XInclude substitution on the XML document @doc
2432 xmlXIncludeProcessFlagsData(xmlDocPtr doc, int flags, void *data) {
2437 if (doc == NULL)
2439 tree = xmlDocGetRootElement(doc);
2442 ctxt = xmlXIncludeNewContext(doc);
2446 ctxt->base = xmlStrdup((xmlChar *)doc->URL);
2448 ret = xmlXIncludeDoProcess(ctxt, doc, tree);
2458 * @doc: an XML document
2461 * Implement the XInclude substitution on the XML document @doc
2467 xmlXIncludeProcessFlags(xmlDocPtr doc, int flags) {
2468 return xmlXIncludeProcessFlagsData(doc, flags, NULL);
2473 * @doc: an XML document
2475 * Implement the XInclude substitution on the XML document @doc
2481 xmlXIncludeProcess(xmlDocPtr doc) {
2482 return(xmlXIncludeProcessFlags(doc, 0));
2500 if ((tree == NULL) || (tree->doc == NULL))
2502 ctxt = xmlXIncludeNewContext(tree->doc);
2505 ctxt->base = xmlNodeGetBase(tree->doc, tree);
2507 ret = xmlXIncludeDoProcess(ctxt, tree->doc, tree);
2544 if ((node == NULL) || (node->doc == NULL) || (ctxt == NULL))
2546 ret = xmlXIncludeDoProcess(ctxt, node->doc, node);