Lines Matching refs:doc
56 xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns);
870 xmlNewDtd(xmlDocPtr doc, const xmlChar *name, in xmlNewDtd() argument
874 if ((doc != NULL) && (doc->extSubset != NULL)) { in xmlNewDtd()
878 /* !!! */ (char *) name, doc->name, in xmlNewDtd()
879 /* !!! */ (char *)doc->extSubset->name); in xmlNewDtd()
901 if (doc != NULL) in xmlNewDtd()
902 doc->extSubset = cur; in xmlNewDtd()
903 cur->doc = doc; in xmlNewDtd()
919 xmlGetIntSubset(const xmlDoc *doc) { in xmlGetIntSubset() argument
922 if (doc == NULL) in xmlGetIntSubset()
924 cur = doc->children; in xmlGetIntSubset()
930 return((xmlDtdPtr) doc->intSubset); in xmlGetIntSubset()
944 xmlCreateIntSubset(xmlDocPtr doc, const xmlChar *name, in xmlCreateIntSubset() argument
948 if ((doc != NULL) && (xmlGetIntSubset(doc) != NULL)) { in xmlCreateIntSubset()
953 doc->name); in xmlCreateIntSubset()
999 if (doc != NULL) { in xmlCreateIntSubset()
1000 doc->intSubset = cur; in xmlCreateIntSubset()
1001 cur->parent = doc; in xmlCreateIntSubset()
1002 cur->doc = doc; in xmlCreateIntSubset()
1003 if (doc->children == NULL) { in xmlCreateIntSubset()
1004 doc->children = (xmlNodePtr) cur; in xmlCreateIntSubset()
1005 doc->last = (xmlNodePtr) cur; in xmlCreateIntSubset()
1007 if (doc->type == XML_HTML_DOCUMENT_NODE) { in xmlCreateIntSubset()
1010 prev = doc->children; in xmlCreateIntSubset()
1013 doc->children = (xmlNodePtr) cur; in xmlCreateIntSubset()
1017 next = doc->children; in xmlCreateIntSubset()
1021 cur->prev = doc->last; in xmlCreateIntSubset()
1024 doc->last = (xmlNodePtr) cur; in xmlCreateIntSubset()
1029 doc->children = (xmlNodePtr) cur; in xmlCreateIntSubset()
1104 if (cur->doc != NULL) dict = cur->doc->dict; in xmlFreeDtd()
1181 cur->doc = cur; in xmlNewDoc()
1269 xmlStringLenGetNodeList(const xmlDoc *doc, const xmlChar *value, int len) { in xmlStringLenGetNodeList() argument
1312 xmlTreeErr(XML_TREE_INVALID_HEX, (xmlNodePtr) doc, in xmlStringLenGetNodeList()
1336 xmlTreeErr(XML_TREE_INVALID_DEC, (xmlNodePtr) doc, in xmlStringLenGetNodeList()
1358 xmlTreeErr(XML_TREE_UNTERMINATED_ENTITY, (xmlNodePtr) doc, in xmlStringLenGetNodeList()
1367 ent = xmlGetDocEntity(doc, val); in xmlStringLenGetNodeList()
1379 node = xmlNewDocText(doc, NULL); in xmlStringLenGetNodeList()
1396 node = xmlNewReference(doc, val); in xmlStringLenGetNodeList()
1404 ent->children = xmlStringGetNodeList(doc, in xmlStringLenGetNodeList()
1449 node = xmlNewDocText(doc, NULL); in xmlStringLenGetNodeList()
1459 ret = xmlNewDocText(doc, BAD_CAST ""); in xmlStringLenGetNodeList()
1477 xmlStringGetNodeList(const xmlDoc *doc, const xmlChar *value) { in xmlStringGetNodeList() argument
1517 xmlTreeErr(XML_TREE_INVALID_HEX, (xmlNodePtr) doc, in xmlStringGetNodeList()
1535 xmlTreeErr(XML_TREE_INVALID_DEC, (xmlNodePtr) doc, in xmlStringGetNodeList()
1555 (xmlNodePtr) doc, (const char *) q); in xmlStringGetNodeList()
1563 ent = xmlGetDocEntity(doc, val); in xmlStringGetNodeList()
1575 node = xmlNewDocText(doc, NULL); in xmlStringGetNodeList()
1588 node = xmlNewReference(doc, val); in xmlStringGetNodeList()
1596 ent->children = xmlStringGetNodeList(doc, in xmlStringGetNodeList()
1638 node = xmlNewDocText(doc, NULL); in xmlStringGetNodeList()
1665 xmlNodeListGetString(xmlDocPtr doc, const xmlNode *list, int inLine) in xmlNodeListGetString() argument
1688 buffer = xmlEncodeAttributeEntities(doc, node->content); in xmlNodeListGetString()
1690 buffer = xmlEncodeEntitiesReentrant(doc, node->content); in xmlNodeListGetString()
1698 ent = xmlGetDocEntity(doc, node->name); in xmlNodeListGetString()
1709 buffer = xmlNodeListGetString(doc, ent->children, 1); in xmlNodeListGetString()
1755 xmlNodeListGetRawString(const xmlDoc *doc, const xmlNode *list, int inLine) in xmlNodeListGetRawString() argument
1772 buffer = xmlEncodeSpecialChars(doc, node->content); in xmlNodeListGetRawString()
1780 ent = xmlGetDocEntity(doc, node->name); in xmlNodeListGetRawString()
1792 xmlNodeListGetRawString(doc, ent->children, 1); in xmlNodeListGetRawString()
1831 xmlDocPtr doc = NULL; in xmlNewPropInternal() local
1835 ((node->doc == NULL) || in xmlNewPropInternal()
1836 (!(xmlDictOwns(node->doc->dict, name))))) in xmlNewPropInternal()
1847 ((node == NULL) || (node->doc == NULL) || in xmlNewPropInternal()
1848 (!(xmlDictOwns(node->doc->dict, name))))) in xmlNewPropInternal()
1858 doc = node->doc; in xmlNewPropInternal()
1859 cur->doc = doc; in xmlNewPropInternal()
1864 if ((doc != NULL) && (doc->dict != NULL)) in xmlNewPropInternal()
1865 cur->name = (xmlChar *) xmlDictLookup(doc->dict, name, -1); in xmlNewPropInternal()
1875 xmlTreeErr(XML_TREE_NOT_UTF8, (xmlNodePtr) doc, in xmlNewPropInternal()
1877 if (doc != NULL) in xmlNewPropInternal()
1878 doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1"); in xmlNewPropInternal()
1880 cur->children = xmlNewDocText(doc, value); in xmlNewPropInternal()
1908 (xmlIsID(node->doc, node, cur) == 1)) in xmlNewPropInternal()
1909 xmlAddID(NULL, node->doc, value, cur); in xmlNewPropInternal()
2002 xmlNewDocProp(xmlDocPtr doc, const xmlChar *name, const xmlChar *value) { in xmlNewDocProp() argument
2024 if ((doc != NULL) && (doc->dict != NULL)) in xmlNewDocProp()
2025 cur->name = xmlDictLookup(doc->dict, name, -1); in xmlNewDocProp()
2028 cur->doc = doc; in xmlNewDocProp()
2032 cur->children = xmlStringGetNodeList(doc, value); in xmlNewDocProp()
2077 if (cur->doc != NULL) dict = cur->doc->dict; in xmlFreeProp()
2083 if ((cur->doc != NULL) && (cur->atype == XML_ATTRIBUTE_ID)) { in xmlFreeProp()
2084 xmlRemoveID(cur->doc, cur); in xmlFreeProp()
2152 xmlNewDocPI(xmlDocPtr doc, const xmlChar *name, const xmlChar *content) { in xmlNewDocPI() argument
2174 if ((doc != NULL) && (doc->dict != NULL)) in xmlNewDocPI()
2175 cur->name = xmlDictLookup(doc->dict, name, -1); in xmlNewDocPI()
2181 cur->doc = doc; in xmlNewDocPI()
2304 xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns, in xmlNewDocNode() argument
2308 if ((doc != NULL) && (doc->dict != NULL)) in xmlNewDocNode()
2310 xmlDictLookup(doc->dict, name, -1)); in xmlNewDocNode()
2314 cur->doc = doc; in xmlNewDocNode()
2316 cur->children = xmlStringGetNodeList(doc, content); in xmlNewDocNode()
2341 xmlNewDocNodeEatName(xmlDocPtr doc, xmlNsPtr ns, in xmlNewDocNodeEatName() argument
2347 cur->doc = doc; in xmlNewDocNodeEatName()
2349 cur->children = xmlStringGetNodeList(doc, content); in xmlNewDocNodeEatName()
2354 if ((name != NULL) && (doc != NULL) && in xmlNewDocNodeEatName()
2355 (!(xmlDictOwns(doc->dict, name)))) in xmlNewDocNodeEatName()
2375 xmlNewDocRawNode(xmlDocPtr doc, xmlNsPtr ns, in xmlNewDocRawNode() argument
2379 cur = xmlNewDocNode(doc, ns, name, NULL); in xmlNewDocRawNode()
2381 cur->doc = doc; in xmlNewDocRawNode()
2383 cur->children = xmlNewDocText(doc, content); in xmlNewDocRawNode()
2398 xmlNewDocFragment(xmlDocPtr doc) { in xmlNewDocFragment() argument
2412 cur->doc = doc; in xmlNewDocFragment()
2498 cur = xmlNewDocRawNode(parent->doc, parent->ns, name, content); in xmlNewTextChild()
2500 cur = xmlNewDocRawNode(parent->doc, ns, name, content); in xmlNewTextChild()
2508 cur = xmlNewDocRawNode( parent->doc, ns, name, content); in xmlNewTextChild()
2519 cur->doc = parent->doc; in xmlNewTextChild()
2543 xmlNewCharRef(xmlDocPtr doc, const xmlChar *name) { in xmlNewCharRef() argument
2560 cur->doc = doc; in xmlNewCharRef()
2586 xmlNewReference(const xmlDoc *doc, const xmlChar *name) { in xmlNewReference() argument
2604 cur->doc = (xmlDoc *)doc; in xmlNewReference()
2616 ent = xmlGetDocEntity(doc, cur->name); in xmlNewReference()
2642 xmlNewDocText(const xmlDoc *doc, const xmlChar *content) { in xmlNewDocText() argument
2646 if (cur != NULL) cur->doc = (xmlDoc *)doc; in xmlNewDocText()
2694 xmlNewDocTextLen(xmlDocPtr doc, const xmlChar *content, int len) { in xmlNewDocTextLen() argument
2698 if (cur != NULL) cur->doc = doc; in xmlNewDocTextLen()
2744 xmlNewCDataBlock(xmlDocPtr doc, const xmlChar *content, int len) { in xmlNewCDataBlock() argument
2757 cur->doc = doc; in xmlNewCDataBlock()
2777 xmlNewDocComment(xmlDocPtr doc, const xmlChar *content) { in xmlNewDocComment() argument
2781 if (cur != NULL) cur->doc = doc; in xmlNewDocComment()
2793 xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) { in xmlSetTreeDoc() argument
2798 if (tree->doc != doc) { in xmlSetTreeDoc()
2803 xmlRemoveID(tree->doc, prop); in xmlSetTreeDoc()
2806 prop->doc = doc; in xmlSetTreeDoc()
2807 xmlSetListDoc(prop->children, doc); in xmlSetTreeDoc()
2816 if (xmlIsID(doc, tree, prop)) { in xmlSetTreeDoc()
2817 xmlChar *idVal = xmlNodeListGetString(doc, prop->children, in xmlSetTreeDoc()
2819 xmlAddID(NULL, doc, idVal, prop); in xmlSetTreeDoc()
2827 xmlSetListDoc(tree->children, doc); in xmlSetTreeDoc()
2828 tree->doc = doc; in xmlSetTreeDoc()
2840 xmlSetListDoc(xmlNodePtr list, xmlDocPtr doc) { in xmlSetListDoc() argument
2847 if (cur->doc != doc) in xmlSetListDoc()
2848 xmlSetTreeDoc(cur, doc); in xmlSetListDoc()
2897 cur = xmlNewDocNode(parent->doc, parent->ns, name, content); in xmlNewChild()
2899 cur = xmlNewDocNode(parent->doc, ns, name, content); in xmlNewChild()
2907 cur = xmlNewDocNode( parent->doc, ns, name, content); in xmlNewChild()
2918 cur->doc = parent->doc; in xmlNewChild()
2961 if (prop->doc != cur->doc) { in xmlAddPropSibling()
2962 xmlSetTreeDoc(prop, cur->doc); in xmlAddPropSibling()
3046 if (elem->doc != cur->doc) { in xmlAddNextSibling()
3047 xmlSetTreeDoc(elem, cur->doc); in xmlAddNextSibling()
3124 if (elem->doc != cur->doc) { in xmlAddPrevSibling()
3125 xmlSetTreeDoc(elem, cur->doc); in xmlAddPrevSibling()
3204 if (elem->doc != cur->doc) { in xmlAddSibling()
3205 xmlSetTreeDoc(elem, cur->doc); in xmlAddSibling()
3248 if ((cur->doc != NULL) && (parent->doc != NULL) && in xmlAddChildList()
3249 (cur->doc != parent->doc)) { in xmlAddChildList()
3287 if (cur->doc != parent->doc) { in xmlAddChildList()
3288 xmlSetTreeDoc(cur, parent->doc); in xmlAddChildList()
3294 if (cur->doc != parent->doc) { in xmlAddChildList()
3295 xmlSetTreeDoc(cur, parent->doc); in xmlAddChildList()
3367 if (cur->doc != parent->doc) { in xmlAddChild()
3368 xmlSetTreeDoc(cur, parent->doc); in xmlAddChild()
3671 if (cur->doc != NULL) dict = cur->doc->dict; in xmlFreeNodeList()
3746 if (cur->doc != NULL) dict = cur->doc->dict; in xmlFreeNode()
3810 xmlDocPtr doc; in xmlUnlinkNode() local
3811 doc = cur->doc; in xmlUnlinkNode()
3812 if (doc != NULL) { in xmlUnlinkNode()
3813 if (doc->intSubset == (xmlDtdPtr) cur) in xmlUnlinkNode()
3814 doc->intSubset = NULL; in xmlUnlinkNode()
3815 if (doc->extSubset == (xmlDtdPtr) cur) in xmlUnlinkNode()
3816 doc->extSubset = NULL; in xmlUnlinkNode()
3820 xmlDocPtr doc; in xmlUnlinkNode() local
3821 doc = cur->doc; in xmlUnlinkNode()
3822 if (doc != NULL) { in xmlUnlinkNode()
3823 if (doc->intSubset != NULL) { in xmlUnlinkNode()
3824 if (xmlHashLookup(doc->intSubset->entities, cur->name) == cur) in xmlUnlinkNode()
3825 xmlHashRemoveEntry(doc->intSubset->entities, cur->name, in xmlUnlinkNode()
3827 if (xmlHashLookup(doc->intSubset->pentities, cur->name) == cur) in xmlUnlinkNode()
3828 xmlHashRemoveEntry(doc->intSubset->pentities, cur->name, in xmlUnlinkNode()
3831 if (doc->extSubset != NULL) { in xmlUnlinkNode()
3832 if (xmlHashLookup(doc->extSubset->entities, cur->name) == cur) in xmlUnlinkNode()
3833 xmlHashRemoveEntry(doc->extSubset->entities, cur->name, in xmlUnlinkNode()
3835 if (xmlHashLookup(doc->extSubset->pentities, cur->name) == cur) in xmlUnlinkNode()
3836 xmlHashRemoveEntry(doc->extSubset->pentities, cur->name, in xmlUnlinkNode()
3907 xmlSetTreeDoc(cur, old->doc); in xmlReplaceNode()
3992 xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent);
3995 xmlCopyPropInternal(xmlDocPtr doc, xmlNodePtr target, xmlAttrPtr cur) { in xmlCopyPropInternal() argument
4002 ret = xmlNewDocProp(target->doc, cur->name, NULL); in xmlCopyPropInternal()
4003 else if (doc != NULL) in xmlCopyPropInternal()
4004 ret = xmlNewDocProp(doc, cur->name, NULL); in xmlCopyPropInternal()
4006 ret = xmlNewDocProp(cur->parent->doc, cur->name, NULL); in xmlCopyPropInternal()
4008 ret = xmlNewDocProp(cur->children->doc, cur->name, NULL); in xmlCopyPropInternal()
4017 ns = xmlSearchNs(target->doc, target, cur->ns->prefix); in xmlCopyPropInternal()
4024 ns = xmlSearchNs(cur->doc, cur->parent, cur->ns->prefix); in xmlCopyPropInternal()
4033 if (root == (xmlNodePtr) target->doc) { in xmlCopyPropInternal()
4053 ret->ns = xmlNewReconciliedNs(target->doc, target, cur->ns); in xmlCopyPropInternal()
4063 ret->children = xmlStaticCopyNodeList(cur->children, ret->doc, (xmlNodePtr) ret); in xmlCopyPropInternal()
4077 (target->doc != NULL) && (cur->doc != NULL) && in xmlCopyPropInternal()
4078 (cur->doc->ids != NULL) && (cur->parent != NULL)) { in xmlCopyPropInternal()
4079 if (xmlIsID(cur->doc, cur->parent, cur)) { in xmlCopyPropInternal()
4082 id = xmlNodeListGetString(cur->doc, cur->children, 1); in xmlCopyPropInternal()
4084 xmlAddID(NULL, target->doc, id, ret); in xmlCopyPropInternal()
4158 xmlStaticCopyNode(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent, in xmlStaticCopyNode() argument
4176 return((xmlNodePtr) xmlCopyPropInternal(doc, parent, (xmlAttrPtr) node)); in xmlStaticCopyNode()
4208 ret->doc = doc; in xmlStaticCopyNode()
4217 if ((doc != NULL) && (doc->dict != NULL)) in xmlStaticCopyNode()
4218 ret->name = xmlDictLookup(doc->dict, node->name, -1); in xmlStaticCopyNode()
4258 ns = xmlSearchNs(doc, ret, node->ns->prefix); in xmlStaticCopyNode()
4265 ns = xmlSearchNs(node->doc, node, node->ns->prefix); in xmlStaticCopyNode()
4272 ret->ns = xmlNewReconciliedNs(doc, ret, node->ns); in xmlStaticCopyNode()
4285 if ((doc == NULL) || (node->doc != doc)) { in xmlStaticCopyNode()
4292 ret->children = (xmlNodePtr) xmlGetDocEntity(doc, ret->name); in xmlStaticCopyNode()
4298 ret->children = xmlStaticCopyNodeList(node->children, doc, ret); in xmlStaticCopyNode()
4311 xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) { in xmlStaticCopyNodeList() argument
4318 if (doc == NULL) { in xmlStaticCopyNodeList()
4322 if (doc->intSubset == NULL) { in xmlStaticCopyNodeList()
4325 q->doc = doc; in xmlStaticCopyNodeList()
4327 doc->intSubset = (xmlDtdPtr) q; in xmlStaticCopyNodeList()
4330 q = (xmlNodePtr) doc->intSubset; in xmlStaticCopyNodeList()
4335 q = xmlStaticCopyNode(node, doc, parent, 1); in xmlStaticCopyNodeList()
4383 xmlDocCopyNode(xmlNodePtr node, xmlDocPtr doc, int extended) { in xmlDocCopyNode() argument
4386 ret = xmlStaticCopyNode(node, doc, NULL, extended); in xmlDocCopyNode()
4399 xmlNodePtr xmlDocCopyNodeList(xmlDocPtr doc, xmlNodePtr node) { in xmlDocCopyNodeList() argument
4400 xmlNodePtr ret = xmlStaticCopyNodeList(node, doc, NULL); in xmlDocCopyNodeList()
4517 xmlCopyDoc(xmlDocPtr doc, int recursive) { in xmlCopyDoc() argument
4520 if (doc == NULL) return(NULL); in xmlCopyDoc()
4521 ret = xmlNewDoc(doc->version); in xmlCopyDoc()
4523 if (doc->name != NULL) in xmlCopyDoc()
4524 ret->name = xmlMemStrdup(doc->name); in xmlCopyDoc()
4525 if (doc->encoding != NULL) in xmlCopyDoc()
4526 ret->encoding = xmlStrdup(doc->encoding); in xmlCopyDoc()
4527 if (doc->URL != NULL) in xmlCopyDoc()
4528 ret->URL = xmlStrdup(doc->URL); in xmlCopyDoc()
4529 ret->charset = doc->charset; in xmlCopyDoc()
4530 ret->compression = doc->compression; in xmlCopyDoc()
4531 ret->standalone = doc->standalone; in xmlCopyDoc()
4537 if (doc->intSubset != NULL) { in xmlCopyDoc()
4538 ret->intSubset = xmlCopyDtd(doc->intSubset); in xmlCopyDoc()
4547 if (doc->oldNs != NULL) in xmlCopyDoc()
4548 ret->oldNs = xmlCopyNamespaceList(doc->oldNs); in xmlCopyDoc()
4549 if (doc->children != NULL) { in xmlCopyDoc()
4552 ret->children = xmlStaticCopyNodeList(doc->children, ret, in xmlCopyDoc()
4895 xmlDocGetRootElement(const xmlDoc *doc) { in xmlDocGetRootElement() argument
4898 if (doc == NULL) return(NULL); in xmlDocGetRootElement()
4899 ret = doc->children; in xmlDocGetRootElement()
4921 xmlDocSetRootElement(xmlDocPtr doc, xmlNodePtr root) { in xmlDocSetRootElement() argument
4924 if (doc == NULL) return(NULL); in xmlDocSetRootElement()
4928 xmlSetTreeDoc(root, doc); in xmlDocSetRootElement()
4929 root->parent = (xmlNodePtr) doc; in xmlDocSetRootElement()
4930 old = doc->children; in xmlDocSetRootElement()
4937 if (doc->children == NULL) { in xmlDocSetRootElement()
4938 doc->children = root; in xmlDocSetRootElement()
4939 doc->last = root; in xmlDocSetRootElement()
4941 xmlAddSibling(doc->children, root); in xmlDocSetRootElement()
4991 ns = xmlSearchNsByHref(cur->doc, cur, XML_XML_NAMESPACE); in xmlNodeSetLang()
5065 ns = xmlSearchNsByHref(cur->doc, cur, XML_XML_NAMESPACE); in xmlNodeSetSpacePreserve()
5123 xmlDocPtr doc; in xmlNodeSetName() local
5156 doc = cur->doc; in xmlNodeSetName()
5157 if (doc != NULL) in xmlNodeSetName()
5158 dict = doc->dict; in xmlNodeSetName()
5217 xmlDocPtr doc = (xmlDocPtr) cur; in xmlNodeSetBase() local
5219 if (doc->URL != NULL) in xmlNodeSetBase()
5220 xmlFree((xmlChar *) doc->URL); in xmlNodeSetBase()
5222 doc->URL = NULL; in xmlNodeSetBase()
5224 doc->URL = xmlPathToURI(uri); in xmlNodeSetBase()
5229 ns = xmlSearchNsByHref(cur->doc, cur, XML_XML_NAMESPACE); in xmlNodeSetBase()
5260 xmlNodeGetBase(const xmlDoc *doc, const xmlNode *cur) { in xmlNodeGetBase() argument
5264 if ((cur == NULL) && (doc == NULL)) in xmlNodeGetBase()
5268 if (doc == NULL) doc = cur->doc; in xmlNodeGetBase()
5269 if ((doc != NULL) && (doc->type == XML_HTML_DOCUMENT_NODE)) { in xmlNodeGetBase()
5270 cur = doc->children; in xmlNodeGetBase()
5321 if ((doc != NULL) && (doc->URL != NULL)) { in xmlNodeGetBase()
5323 return(xmlStrdup(doc->URL)); in xmlNodeGetBase()
5324 newbase = xmlBuildURI(oldbase, doc->URL); in xmlNodeGetBase()
5453 ent = xmlGetDocEntity(cur->doc, cur->name); in xmlBufGetNodeContent()
5545 ent = xmlGetDocEntity(cur->doc, cur->name); in xmlNodeGetContent()
5632 cur->children = xmlStringGetNodeList(cur->doc, content); in xmlNodeSetContent()
5643 if (!((cur->doc != NULL) && (cur->doc->dict != NULL) && in xmlNodeSetContent()
5644 (xmlDictOwns(cur->doc->dict, cur->content)))) in xmlNodeSetContent()
5709 cur->children = xmlStringLenGetNodeList(cur->doc, content, len); in xmlNodeSetContentLen()
5721 if (!((cur->doc != NULL) && (cur->doc->dict != NULL) && in xmlNodeSetContentLen()
5722 (xmlDictOwns(cur->doc->dict, cur->content)))) in xmlNodeSetContentLen()
5807 ((cur->doc != NULL) && (cur->doc->dict != NULL) && in xmlNodeAddContentLen()
5808 xmlDictOwns(cur->doc->dict, cur->content))) { in xmlNodeAddContentLen()
5894 xmlGetNsList(const xmlDoc *doc ATTRIBUTE_UNUSED, const xmlNode *node) in xmlGetNsList()
5958 xmlTreeEnsureXMLDecl(xmlDocPtr doc) in xmlTreeEnsureXMLDecl() argument
5960 if (doc == NULL) in xmlTreeEnsureXMLDecl()
5962 if (doc->oldNs != NULL) in xmlTreeEnsureXMLDecl()
5963 return (doc->oldNs); in xmlTreeEnsureXMLDecl()
5976 doc->oldNs = ns; in xmlTreeEnsureXMLDecl()
5998 xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const xmlChar *nameSpace) { in xmlSearchNs() argument
6006 if ((doc == NULL) && (node->type == XML_ELEMENT_NODE)) { in xmlSearchNs()
6025 if (doc == NULL) { in xmlSearchNs()
6026 doc = node->doc; in xmlSearchNs()
6027 if (doc == NULL) in xmlSearchNs()
6033 if (doc->oldNs == NULL) in xmlSearchNs()
6034 return(xmlTreeEnsureXMLDecl(doc)); in xmlSearchNs()
6036 return(doc->oldNs); in xmlSearchNs()
6086 xmlNsInScope(xmlDocPtr doc ATTRIBUTE_UNUSED, xmlNodePtr node, in xmlNsInScope()
6127 xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href) in xmlSearchNsByHref() argument
6139 if ((doc == NULL) && (node->type == XML_ELEMENT_NODE)) { in xmlSearchNsByHref()
6158 if (doc == NULL) { in xmlSearchNsByHref()
6159 doc = node->doc; in xmlSearchNsByHref()
6160 if (doc == NULL) in xmlSearchNsByHref()
6166 if (doc->oldNs == NULL) in xmlSearchNsByHref()
6167 return(xmlTreeEnsureXMLDecl(doc)); in xmlSearchNsByHref()
6169 return(doc->oldNs); in xmlSearchNsByHref()
6183 (xmlNsInScope(doc, orig, node, cur->prefix) == 1)) in xmlSearchNsByHref()
6194 (xmlNsInScope(doc, orig, node, cur->prefix) == 1)) in xmlSearchNsByHref()
6219 xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns) { in xmlNewReconciliedNs() argument
6241 def = xmlSearchNsByHref(doc, tree, ns->href); in xmlNewReconciliedNs()
6254 def = xmlSearchNs(doc, tree, prefix); in xmlNewReconciliedNs()
6262 def = xmlSearchNs(doc, tree, prefix); in xmlNewReconciliedNs()
6288 xmlReconciliateNs(xmlDocPtr doc, xmlNodePtr tree) { in xmlReconciliateNs() argument
6300 if ((doc == NULL) || (doc->type != XML_DOCUMENT_NODE)) return(-1); in xmlReconciliateNs()
6301 if (node->doc != doc) return(-1); in xmlReconciliateNs()
6336 n = xmlNewReconciliedNs(doc, tree, node->ns); in xmlReconciliateNs()
6400 n = xmlNewReconciliedNs(doc, tree, attr->ns); in xmlReconciliateNs()
6513 if ((node->doc != NULL) && (node->doc->intSubset != NULL)) { in xmlGetPropNodeInternal()
6514 xmlDocPtr doc = node->doc; in xmlGetPropNodeInternal() local
6534 attrDecl = xmlGetDtdQAttrDesc(doc->intSubset, in xmlGetPropNodeInternal()
6536 if ((attrDecl == NULL) && (doc->extSubset != NULL)) { in xmlGetPropNodeInternal()
6537 attrDecl = xmlGetDtdQAttrDesc(doc->extSubset, in xmlGetPropNodeInternal()
6547 nsList = xmlGetNsList(node->doc, node); in xmlGetPropNodeInternal()
6556 attrDecl = xmlGetDtdQAttrDesc(doc->intSubset, elemQName, in xmlGetPropNodeInternal()
6560 if (doc->extSubset != NULL) { in xmlGetPropNodeInternal()
6561 attrDecl = xmlGetDtdQAttrDesc(doc->extSubset, elemQName, in xmlGetPropNodeInternal()
6605 ret = xmlNodeListGetString(prop->doc, prop->children, 1); in xmlGetPropNodeValueInternal()
6632 xmlDocPtr doc; in xmlHasProp() local
6652 doc = node->doc; in xmlHasProp()
6653 if (doc != NULL) { in xmlHasProp()
6655 if (doc->intSubset != NULL) { in xmlHasProp()
6656 attrDecl = xmlGetDtdAttrDesc(doc->intSubset, node->name, name); in xmlHasProp()
6657 if ((attrDecl == NULL) && (doc->extSubset != NULL)) in xmlHasProp()
6658 attrDecl = xmlGetDtdAttrDesc(doc->extSubset, node->name, name); in xmlHasProp()
6840 ns = xmlSearchNs(node->doc, node, prefix); in xmlSetProp()
6875 xmlRemoveID(node->doc, prop); in xmlSetNsProp()
6887 xmlTreeErr(XML_TREE_NOT_UTF8, (xmlNodePtr) node->doc, in xmlSetNsProp()
6889 if (node->doc != NULL) in xmlSetNsProp()
6890 node->doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1"); in xmlSetNsProp()
6892 prop->children = xmlNewDocText(node->doc, value); in xmlSetNsProp()
6903 xmlAddID(NULL, node->doc, value, prop); in xmlSetNsProp()
6983 ((node->doc != NULL) && (node->doc->dict != NULL) && in xmlTextConcat()
6984 xmlDictOwns(node->doc->dict, node->content))) { in xmlTextConcat()
7744 xmlGetDocCompressMode (const xmlDoc *doc) { in xmlGetDocCompressMode() argument
7745 if (doc == NULL) return(-1); in xmlGetDocCompressMode()
7746 return(doc->compression); in xmlGetDocCompressMode()
7758 xmlSetDocCompressMode (xmlDocPtr doc, int mode) { in xmlSetDocCompressMode() argument
7759 if (doc == NULL) return; in xmlSetDocCompressMode()
7760 if (mode < 0) doc->compression = 0; in xmlSetDocCompressMode()
7761 else if (mode > 9) doc->compression = 9; in xmlSetDocCompressMode()
7762 else doc->compression = mode; in xmlSetDocCompressMode()
7957 xmlDOMWrapStoreNs(xmlDocPtr doc, in xmlDOMWrapStoreNs() argument
7963 if (doc == NULL) in xmlDOMWrapStoreNs()
7965 ns = xmlTreeEnsureXMLDecl(doc); in xmlDOMWrapStoreNs()
8086 while ((cur != NULL) && (cur != (xmlNodePtr) cur->doc)) { in xmlDOMWrapNSNormGatherInScopeNs()
8207 xmlDOMWrapRemoveNode(xmlDOMWrapCtxtPtr ctxt, xmlDocPtr doc, in xmlDOMWrapRemoveNode() argument
8214 if ((node == NULL) || (doc == NULL) || (node->doc != doc)) in xmlDOMWrapRemoveNode()
8274 ns = xmlDOMWrapStoreNs(doc, node->ns->href, in xmlDOMWrapRemoveNode()
8340 xmlSearchNsByNamespaceStrict(xmlDocPtr doc, xmlNodePtr node, in xmlSearchNsByNamespaceStrict() argument
8347 if ((doc == NULL) || (nsName == NULL) || (retNs == NULL)) in xmlSearchNsByNamespaceStrict()
8354 *retNs = xmlTreeEnsureXMLDecl(doc); in xmlSearchNsByNamespaceStrict()
8400 ret = xmlNsInScope(doc, node, prev, ns->prefix); in xmlSearchNsByNamespaceStrict()
8424 } while ((cur != NULL) && (cur->doc != (xmlDocPtr) cur)); in xmlSearchNsByNamespaceStrict()
8442 xmlSearchNsByPrefixStrict(xmlDocPtr doc, xmlNodePtr node, in xmlSearchNsByPrefixStrict() argument
8449 if ((doc == NULL) || (node == NULL) || (node->type == XML_NAMESPACE_DECL)) in xmlSearchNsByPrefixStrict()
8456 *retNs = xmlTreeEnsureXMLDecl(doc); in xmlSearchNsByPrefixStrict()
8487 } while ((cur != NULL) && (cur->doc != (xmlDocPtr) cur)); in xmlSearchNsByPrefixStrict()
8507 xmlDOMWrapNSNormDeclareNsForced(xmlDocPtr doc, in xmlDOMWrapNSNormDeclareNsForced() argument
8519 if ((doc == NULL) || (elem == NULL) || (elem->type != XML_ELEMENT_NODE)) in xmlDOMWrapNSNormDeclareNsForced()
8533 ((xmlNodePtr) elem->parent->doc != elem->parent)) { in xmlDOMWrapNSNormDeclareNsForced()
8537 if (xmlSearchNsByPrefixStrict(doc, elem->parent, pref, NULL) == 1) in xmlDOMWrapNSNormDeclareNsForced()
8586 xmlDOMWrapNSNormAquireNormalizedNs(xmlDocPtr doc, in xmlDOMWrapNSNormAquireNormalizedNs() argument
8598 if ((doc == NULL) || (ns == NULL) || (retNs == NULL) || in xmlDOMWrapNSNormAquireNormalizedNs()
8610 *retNs = xmlTreeEnsureXMLDecl(doc); in xmlDOMWrapNSNormAquireNormalizedNs()
8660 tmpns = xmlDOMWrapStoreNs(doc, ns->href, ns->prefix); in xmlDOMWrapNSNormAquireNormalizedNs()
8675 tmpns = xmlDOMWrapNSNormDeclareNsForced(doc, elem, ns->href, in xmlDOMWrapNSNormAquireNormalizedNs()
8734 xmlDocPtr doc; in xmlDOMWrapReconcileNamespaces() local
8745 if ((elem == NULL) || (elem->doc == NULL) || in xmlDOMWrapReconcileNamespaces()
8749 doc = elem->doc; in xmlDOMWrapReconcileNamespaces()
8766 ((xmlNodePtr) elem->parent->doc != elem->parent)) { in xmlDOMWrapReconcileNamespaces()
8850 ((xmlNodePtr) elem->parent->doc != elem->parent)) { in xmlDOMWrapReconcileNamespaces()
8887 if (xmlDOMWrapNSNormAquireNormalizedNs(doc, curElem, in xmlDOMWrapReconcileNamespaces()
9044 if (cur->doc != sourceDoc) { in xmlDOMWrapAdoptBranch()
9056 (cur->doc == node->doc)) in xmlDOMWrapAdoptBranch()
9060 if (cur->doc != node->doc) in xmlDOMWrapAdoptBranch()
9063 cur->doc = destDoc; in xmlDOMWrapAdoptBranch()
9397 if ((node->doc != NULL) && (sourceDoc != NULL) && in xmlDOMWrapCloneNode()
9398 (node->doc != sourceDoc)) { in xmlDOMWrapCloneNode()
9405 sourceDoc = node->doc; in xmlDOMWrapCloneNode()
9423 if (cur->doc != sourceDoc) { in xmlDOMWrapCloneNode()
9505 clone->doc = destDoc; in xmlDOMWrapCloneNode()
9741 idVal = xmlNodeListGetString(cur->doc, cur->children, 1); in xmlDOMWrapCloneNode()
9899 attr->doc = destDoc; in xmlDOMWrapAdoptAttr()
9943 cur->doc = destDoc; in xmlDOMWrapAdoptAttr()
10028 ((destParent != NULL) && (destParent->doc != destDoc))) in xmlDOMWrapAdoptNode()
10033 if ((node->doc != NULL) && (sourceDoc != NULL) && in xmlDOMWrapAdoptNode()
10034 (node->doc != sourceDoc)) { in xmlDOMWrapAdoptNode()
10041 sourceDoc = node->doc; in xmlDOMWrapAdoptNode()
10075 cur->doc = destDoc; in xmlDOMWrapAdoptNode()