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()
1597 ent->children = xmlStringGetNodeList(doc, in xmlStringGetNodeList()
1639 node = xmlNewDocText(doc, NULL); in xmlStringGetNodeList()
1666 xmlNodeListGetString(xmlDocPtr doc, const xmlNode *list, int inLine) in xmlNodeListGetString() argument
1689 buffer = xmlEncodeAttributeEntities(doc, node->content); in xmlNodeListGetString()
1691 buffer = xmlEncodeEntitiesReentrant(doc, node->content); in xmlNodeListGetString()
1699 ent = xmlGetDocEntity(doc, node->name); in xmlNodeListGetString()
1710 buffer = xmlNodeListGetString(doc, ent->children, 1); in xmlNodeListGetString()
1756 xmlNodeListGetRawString(const xmlDoc *doc, const xmlNode *list, int inLine) in xmlNodeListGetRawString() argument
1773 buffer = xmlEncodeSpecialChars(doc, node->content); in xmlNodeListGetRawString()
1781 ent = xmlGetDocEntity(doc, node->name); in xmlNodeListGetRawString()
1793 xmlNodeListGetRawString(doc, ent->children, 1); in xmlNodeListGetRawString()
1832 xmlDocPtr doc = NULL; in xmlNewPropInternal() local
1836 ((node->doc == NULL) || in xmlNewPropInternal()
1837 (!(xmlDictOwns(node->doc->dict, name))))) in xmlNewPropInternal()
1848 ((node == NULL) || (node->doc == NULL) || in xmlNewPropInternal()
1849 (!(xmlDictOwns(node->doc->dict, name))))) in xmlNewPropInternal()
1859 doc = node->doc; in xmlNewPropInternal()
1860 cur->doc = doc; in xmlNewPropInternal()
1865 if ((doc != NULL) && (doc->dict != NULL)) in xmlNewPropInternal()
1866 cur->name = (xmlChar *) xmlDictLookup(doc->dict, name, -1); in xmlNewPropInternal()
1876 xmlTreeErr(XML_TREE_NOT_UTF8, (xmlNodePtr) doc, in xmlNewPropInternal()
1878 if (doc != NULL) in xmlNewPropInternal()
1879 doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1"); in xmlNewPropInternal()
1881 cur->children = xmlNewDocText(doc, value); in xmlNewPropInternal()
1909 (xmlIsID(node->doc, node, cur) == 1)) in xmlNewPropInternal()
1910 xmlAddID(NULL, node->doc, value, cur); in xmlNewPropInternal()
2003 xmlNewDocProp(xmlDocPtr doc, const xmlChar *name, const xmlChar *value) { in xmlNewDocProp() argument
2025 if ((doc != NULL) && (doc->dict != NULL)) in xmlNewDocProp()
2026 cur->name = xmlDictLookup(doc->dict, name, -1); in xmlNewDocProp()
2029 cur->doc = doc; in xmlNewDocProp()
2033 cur->children = xmlStringGetNodeList(doc, value); in xmlNewDocProp()
2078 if (cur->doc != NULL) dict = cur->doc->dict; in xmlFreeProp()
2084 if ((cur->doc != NULL) && (cur->atype == XML_ATTRIBUTE_ID)) { in xmlFreeProp()
2085 xmlRemoveID(cur->doc, cur); in xmlFreeProp()
2153 xmlNewDocPI(xmlDocPtr doc, const xmlChar *name, const xmlChar *content) { in xmlNewDocPI() argument
2175 if ((doc != NULL) && (doc->dict != NULL)) in xmlNewDocPI()
2176 cur->name = xmlDictLookup(doc->dict, name, -1); in xmlNewDocPI()
2182 cur->doc = doc; in xmlNewDocPI()
2305 xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns, in xmlNewDocNode() argument
2309 if ((doc != NULL) && (doc->dict != NULL)) in xmlNewDocNode()
2311 xmlDictLookup(doc->dict, name, -1)); in xmlNewDocNode()
2315 cur->doc = doc; in xmlNewDocNode()
2317 cur->children = xmlStringGetNodeList(doc, content); in xmlNewDocNode()
2342 xmlNewDocNodeEatName(xmlDocPtr doc, xmlNsPtr ns, in xmlNewDocNodeEatName() argument
2348 cur->doc = doc; in xmlNewDocNodeEatName()
2350 cur->children = xmlStringGetNodeList(doc, content); in xmlNewDocNodeEatName()
2355 if ((name != NULL) && (doc != NULL) && in xmlNewDocNodeEatName()
2356 (!(xmlDictOwns(doc->dict, name)))) in xmlNewDocNodeEatName()
2376 xmlNewDocRawNode(xmlDocPtr doc, xmlNsPtr ns, in xmlNewDocRawNode() argument
2380 cur = xmlNewDocNode(doc, ns, name, NULL); in xmlNewDocRawNode()
2382 cur->doc = doc; in xmlNewDocRawNode()
2384 cur->children = xmlNewDocText(doc, content); in xmlNewDocRawNode()
2399 xmlNewDocFragment(xmlDocPtr doc) { in xmlNewDocFragment() argument
2413 cur->doc = doc; in xmlNewDocFragment()
2499 cur = xmlNewDocRawNode(parent->doc, parent->ns, name, content); in xmlNewTextChild()
2501 cur = xmlNewDocRawNode(parent->doc, ns, name, content); in xmlNewTextChild()
2509 cur = xmlNewDocRawNode( parent->doc, ns, name, content); in xmlNewTextChild()
2520 cur->doc = parent->doc; in xmlNewTextChild()
2544 xmlNewCharRef(xmlDocPtr doc, const xmlChar *name) { in xmlNewCharRef() argument
2561 cur->doc = doc; in xmlNewCharRef()
2587 xmlNewReference(const xmlDoc *doc, const xmlChar *name) { in xmlNewReference() argument
2605 cur->doc = (xmlDoc *)doc; in xmlNewReference()
2617 ent = xmlGetDocEntity(doc, cur->name); in xmlNewReference()
2643 xmlNewDocText(const xmlDoc *doc, const xmlChar *content) { in xmlNewDocText() argument
2647 if (cur != NULL) cur->doc = (xmlDoc *)doc; in xmlNewDocText()
2695 xmlNewDocTextLen(xmlDocPtr doc, const xmlChar *content, int len) { in xmlNewDocTextLen() argument
2699 if (cur != NULL) cur->doc = doc; in xmlNewDocTextLen()
2745 xmlNewCDataBlock(xmlDocPtr doc, const xmlChar *content, int len) { in xmlNewCDataBlock() argument
2758 cur->doc = doc; in xmlNewCDataBlock()
2778 xmlNewDocComment(xmlDocPtr doc, const xmlChar *content) { in xmlNewDocComment() argument
2782 if (cur != NULL) cur->doc = doc; in xmlNewDocComment()
2794 xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) { in xmlSetTreeDoc() argument
2799 if (tree->doc != doc) { in xmlSetTreeDoc()
2804 xmlRemoveID(tree->doc, prop); in xmlSetTreeDoc()
2807 prop->doc = doc; in xmlSetTreeDoc()
2808 xmlSetListDoc(prop->children, doc); in xmlSetTreeDoc()
2817 if (xmlIsID(doc, tree, prop)) { in xmlSetTreeDoc()
2818 xmlChar *idVal = xmlNodeListGetString(doc, prop->children, in xmlSetTreeDoc()
2820 xmlAddID(NULL, doc, idVal, prop); in xmlSetTreeDoc()
2828 xmlSetListDoc(tree->children, doc); in xmlSetTreeDoc()
2829 tree->doc = doc; in xmlSetTreeDoc()
2841 xmlSetListDoc(xmlNodePtr list, xmlDocPtr doc) { in xmlSetListDoc() argument
2848 if (cur->doc != doc) in xmlSetListDoc()
2849 xmlSetTreeDoc(cur, doc); in xmlSetListDoc()
2898 cur = xmlNewDocNode(parent->doc, parent->ns, name, content); in xmlNewChild()
2900 cur = xmlNewDocNode(parent->doc, ns, name, content); in xmlNewChild()
2908 cur = xmlNewDocNode( parent->doc, ns, name, content); in xmlNewChild()
2919 cur->doc = parent->doc; in xmlNewChild()
2962 if (prop->doc != cur->doc) { in xmlAddPropSibling()
2963 xmlSetTreeDoc(prop, cur->doc); in xmlAddPropSibling()
3047 if (elem->doc != cur->doc) { in xmlAddNextSibling()
3048 xmlSetTreeDoc(elem, cur->doc); in xmlAddNextSibling()
3125 if (elem->doc != cur->doc) { in xmlAddPrevSibling()
3126 xmlSetTreeDoc(elem, cur->doc); in xmlAddPrevSibling()
3205 if (elem->doc != cur->doc) { in xmlAddSibling()
3206 xmlSetTreeDoc(elem, cur->doc); in xmlAddSibling()
3249 if ((cur->doc != NULL) && (parent->doc != NULL) && in xmlAddChildList()
3250 (cur->doc != parent->doc)) { in xmlAddChildList()
3288 if (cur->doc != parent->doc) { in xmlAddChildList()
3289 xmlSetTreeDoc(cur, parent->doc); in xmlAddChildList()
3295 if (cur->doc != parent->doc) { in xmlAddChildList()
3296 xmlSetTreeDoc(cur, parent->doc); in xmlAddChildList()
3368 if (cur->doc != parent->doc) { in xmlAddChild()
3369 xmlSetTreeDoc(cur, parent->doc); in xmlAddChild()
3672 if (cur->doc != NULL) dict = cur->doc->dict; in xmlFreeNodeList()
3747 if (cur->doc != NULL) dict = cur->doc->dict; in xmlFreeNode()
3811 xmlDocPtr doc; in xmlUnlinkNode() local
3812 doc = cur->doc; in xmlUnlinkNode()
3813 if (doc != NULL) { in xmlUnlinkNode()
3814 if (doc->intSubset == (xmlDtdPtr) cur) in xmlUnlinkNode()
3815 doc->intSubset = NULL; in xmlUnlinkNode()
3816 if (doc->extSubset == (xmlDtdPtr) cur) in xmlUnlinkNode()
3817 doc->extSubset = NULL; in xmlUnlinkNode()
3821 xmlDocPtr doc; in xmlUnlinkNode() local
3822 doc = cur->doc; in xmlUnlinkNode()
3823 if (doc != NULL) { in xmlUnlinkNode()
3824 if (doc->intSubset != NULL) { in xmlUnlinkNode()
3825 if (xmlHashLookup(doc->intSubset->entities, cur->name) == cur) in xmlUnlinkNode()
3826 xmlHashRemoveEntry(doc->intSubset->entities, cur->name, in xmlUnlinkNode()
3828 if (xmlHashLookup(doc->intSubset->pentities, cur->name) == cur) in xmlUnlinkNode()
3829 xmlHashRemoveEntry(doc->intSubset->pentities, cur->name, in xmlUnlinkNode()
3832 if (doc->extSubset != NULL) { in xmlUnlinkNode()
3833 if (xmlHashLookup(doc->extSubset->entities, cur->name) == cur) in xmlUnlinkNode()
3834 xmlHashRemoveEntry(doc->extSubset->entities, cur->name, in xmlUnlinkNode()
3836 if (xmlHashLookup(doc->extSubset->pentities, cur->name) == cur) in xmlUnlinkNode()
3837 xmlHashRemoveEntry(doc->extSubset->pentities, cur->name, in xmlUnlinkNode()
3908 xmlSetTreeDoc(cur, old->doc); in xmlReplaceNode()
3993 xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent);
3996 xmlCopyPropInternal(xmlDocPtr doc, xmlNodePtr target, xmlAttrPtr cur) { in xmlCopyPropInternal() argument
4003 ret = xmlNewDocProp(target->doc, cur->name, NULL); in xmlCopyPropInternal()
4004 else if (doc != NULL) in xmlCopyPropInternal()
4005 ret = xmlNewDocProp(doc, cur->name, NULL); in xmlCopyPropInternal()
4007 ret = xmlNewDocProp(cur->parent->doc, cur->name, NULL); in xmlCopyPropInternal()
4009 ret = xmlNewDocProp(cur->children->doc, cur->name, NULL); in xmlCopyPropInternal()
4018 ns = xmlSearchNs(target->doc, target, cur->ns->prefix); in xmlCopyPropInternal()
4025 ns = xmlSearchNs(cur->doc, cur->parent, cur->ns->prefix); in xmlCopyPropInternal()
4034 if (root == (xmlNodePtr) target->doc) { in xmlCopyPropInternal()
4054 ret->ns = xmlNewReconciliedNs(target->doc, target, cur->ns); in xmlCopyPropInternal()
4064 ret->children = xmlStaticCopyNodeList(cur->children, ret->doc, (xmlNodePtr) ret); in xmlCopyPropInternal()
4078 (target->doc != NULL) && (cur->doc != NULL) && in xmlCopyPropInternal()
4079 (cur->doc->ids != NULL) && (cur->parent != NULL)) { in xmlCopyPropInternal()
4080 if (xmlIsID(cur->doc, cur->parent, cur)) { in xmlCopyPropInternal()
4083 id = xmlNodeListGetString(cur->doc, cur->children, 1); in xmlCopyPropInternal()
4085 xmlAddID(NULL, target->doc, id, ret); in xmlCopyPropInternal()
4159 xmlStaticCopyNode(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent, in xmlStaticCopyNode() argument
4177 return((xmlNodePtr) xmlCopyPropInternal(doc, parent, (xmlAttrPtr) node)); in xmlStaticCopyNode()
4209 ret->doc = doc; in xmlStaticCopyNode()
4218 if ((doc != NULL) && (doc->dict != NULL)) in xmlStaticCopyNode()
4219 ret->name = xmlDictLookup(doc->dict, node->name, -1); in xmlStaticCopyNode()
4259 ns = xmlSearchNs(doc, ret, node->ns->prefix); in xmlStaticCopyNode()
4266 ns = xmlSearchNs(node->doc, node, node->ns->prefix); in xmlStaticCopyNode()
4273 ret->ns = xmlNewReconciliedNs(doc, ret, node->ns); in xmlStaticCopyNode()
4286 if ((doc == NULL) || (node->doc != doc)) { in xmlStaticCopyNode()
4293 ret->children = (xmlNodePtr) xmlGetDocEntity(doc, ret->name); in xmlStaticCopyNode()
4299 ret->children = xmlStaticCopyNodeList(node->children, doc, ret); in xmlStaticCopyNode()
4312 xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) { in xmlStaticCopyNodeList() argument
4319 if (doc == NULL) { in xmlStaticCopyNodeList()
4323 if (doc->intSubset == NULL) { in xmlStaticCopyNodeList()
4326 q->doc = doc; in xmlStaticCopyNodeList()
4328 doc->intSubset = (xmlDtdPtr) q; in xmlStaticCopyNodeList()
4331 q = (xmlNodePtr) doc->intSubset; in xmlStaticCopyNodeList()
4336 q = xmlStaticCopyNode(node, doc, parent, 1); in xmlStaticCopyNodeList()
4384 xmlDocCopyNode(xmlNodePtr node, xmlDocPtr doc, int extended) { in xmlDocCopyNode() argument
4387 ret = xmlStaticCopyNode(node, doc, NULL, extended); in xmlDocCopyNode()
4400 xmlNodePtr xmlDocCopyNodeList(xmlDocPtr doc, xmlNodePtr node) { in xmlDocCopyNodeList() argument
4401 xmlNodePtr ret = xmlStaticCopyNodeList(node, doc, NULL); in xmlDocCopyNodeList()
4518 xmlCopyDoc(xmlDocPtr doc, int recursive) { in xmlCopyDoc() argument
4521 if (doc == NULL) return(NULL); in xmlCopyDoc()
4522 ret = xmlNewDoc(doc->version); in xmlCopyDoc()
4524 if (doc->name != NULL) in xmlCopyDoc()
4525 ret->name = xmlMemStrdup(doc->name); in xmlCopyDoc()
4526 if (doc->encoding != NULL) in xmlCopyDoc()
4527 ret->encoding = xmlStrdup(doc->encoding); in xmlCopyDoc()
4528 if (doc->URL != NULL) in xmlCopyDoc()
4529 ret->URL = xmlStrdup(doc->URL); in xmlCopyDoc()
4530 ret->charset = doc->charset; in xmlCopyDoc()
4531 ret->compression = doc->compression; in xmlCopyDoc()
4532 ret->standalone = doc->standalone; in xmlCopyDoc()
4538 if (doc->intSubset != NULL) { in xmlCopyDoc()
4539 ret->intSubset = xmlCopyDtd(doc->intSubset); in xmlCopyDoc()
4548 if (doc->oldNs != NULL) in xmlCopyDoc()
4549 ret->oldNs = xmlCopyNamespaceList(doc->oldNs); in xmlCopyDoc()
4550 if (doc->children != NULL) { in xmlCopyDoc()
4553 ret->children = xmlStaticCopyNodeList(doc->children, ret, in xmlCopyDoc()
4896 xmlDocGetRootElement(const xmlDoc *doc) { in xmlDocGetRootElement() argument
4899 if (doc == NULL) return(NULL); in xmlDocGetRootElement()
4900 ret = doc->children; in xmlDocGetRootElement()
4922 xmlDocSetRootElement(xmlDocPtr doc, xmlNodePtr root) { in xmlDocSetRootElement() argument
4925 if (doc == NULL) return(NULL); in xmlDocSetRootElement()
4929 xmlSetTreeDoc(root, doc); in xmlDocSetRootElement()
4930 root->parent = (xmlNodePtr) doc; in xmlDocSetRootElement()
4931 old = doc->children; in xmlDocSetRootElement()
4938 if (doc->children == NULL) { in xmlDocSetRootElement()
4939 doc->children = root; in xmlDocSetRootElement()
4940 doc->last = root; in xmlDocSetRootElement()
4942 xmlAddSibling(doc->children, root); in xmlDocSetRootElement()
4992 ns = xmlSearchNsByHref(cur->doc, cur, XML_XML_NAMESPACE); in xmlNodeSetLang()
5066 ns = xmlSearchNsByHref(cur->doc, cur, XML_XML_NAMESPACE); in xmlNodeSetSpacePreserve()
5124 xmlDocPtr doc; in xmlNodeSetName() local
5157 doc = cur->doc; in xmlNodeSetName()
5158 if (doc != NULL) in xmlNodeSetName()
5159 dict = doc->dict; in xmlNodeSetName()
5218 xmlDocPtr doc = (xmlDocPtr) cur; in xmlNodeSetBase() local
5220 if (doc->URL != NULL) in xmlNodeSetBase()
5221 xmlFree((xmlChar *) doc->URL); in xmlNodeSetBase()
5223 doc->URL = NULL; in xmlNodeSetBase()
5225 doc->URL = xmlPathToURI(uri); in xmlNodeSetBase()
5230 ns = xmlSearchNsByHref(cur->doc, cur, XML_XML_NAMESPACE); in xmlNodeSetBase()
5261 xmlNodeGetBase(const xmlDoc *doc, const xmlNode *cur) { in xmlNodeGetBase() argument
5265 if ((cur == NULL) && (doc == NULL)) in xmlNodeGetBase()
5269 if (doc == NULL) doc = cur->doc; in xmlNodeGetBase()
5270 if ((doc != NULL) && (doc->type == XML_HTML_DOCUMENT_NODE)) { in xmlNodeGetBase()
5271 cur = doc->children; in xmlNodeGetBase()
5322 if ((doc != NULL) && (doc->URL != NULL)) { in xmlNodeGetBase()
5324 return(xmlStrdup(doc->URL)); in xmlNodeGetBase()
5325 newbase = xmlBuildURI(oldbase, doc->URL); in xmlNodeGetBase()
5454 ent = xmlGetDocEntity(cur->doc, cur->name); in xmlBufGetNodeContent()
5546 ent = xmlGetDocEntity(cur->doc, cur->name); in xmlNodeGetContent()
5633 cur->children = xmlStringGetNodeList(cur->doc, content); in xmlNodeSetContent()
5644 if (!((cur->doc != NULL) && (cur->doc->dict != NULL) && in xmlNodeSetContent()
5645 (xmlDictOwns(cur->doc->dict, cur->content)))) in xmlNodeSetContent()
5710 cur->children = xmlStringLenGetNodeList(cur->doc, content, len); in xmlNodeSetContentLen()
5722 if (!((cur->doc != NULL) && (cur->doc->dict != NULL) && in xmlNodeSetContentLen()
5723 (xmlDictOwns(cur->doc->dict, cur->content)))) in xmlNodeSetContentLen()
5808 ((cur->doc != NULL) && (cur->doc->dict != NULL) && in xmlNodeAddContentLen()
5809 xmlDictOwns(cur->doc->dict, cur->content))) { in xmlNodeAddContentLen()
5895 xmlGetNsList(const xmlDoc *doc ATTRIBUTE_UNUSED, const xmlNode *node) in xmlGetNsList()
5959 xmlTreeEnsureXMLDecl(xmlDocPtr doc) in xmlTreeEnsureXMLDecl() argument
5961 if (doc == NULL) in xmlTreeEnsureXMLDecl()
5963 if (doc->oldNs != NULL) in xmlTreeEnsureXMLDecl()
5964 return (doc->oldNs); in xmlTreeEnsureXMLDecl()
5977 doc->oldNs = ns; in xmlTreeEnsureXMLDecl()
5999 xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const xmlChar *nameSpace) { in xmlSearchNs() argument
6007 if ((doc == NULL) && (node->type == XML_ELEMENT_NODE)) { in xmlSearchNs()
6026 if (doc == NULL) { in xmlSearchNs()
6027 doc = node->doc; in xmlSearchNs()
6028 if (doc == NULL) in xmlSearchNs()
6034 if (doc->oldNs == NULL) in xmlSearchNs()
6035 return(xmlTreeEnsureXMLDecl(doc)); in xmlSearchNs()
6037 return(doc->oldNs); in xmlSearchNs()
6087 xmlNsInScope(xmlDocPtr doc ATTRIBUTE_UNUSED, xmlNodePtr node, in xmlNsInScope()
6128 xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href) in xmlSearchNsByHref() argument
6140 if ((doc == NULL) && (node->type == XML_ELEMENT_NODE)) { in xmlSearchNsByHref()
6159 if (doc == NULL) { in xmlSearchNsByHref()
6160 doc = node->doc; in xmlSearchNsByHref()
6161 if (doc == NULL) in xmlSearchNsByHref()
6167 if (doc->oldNs == NULL) in xmlSearchNsByHref()
6168 return(xmlTreeEnsureXMLDecl(doc)); in xmlSearchNsByHref()
6170 return(doc->oldNs); in xmlSearchNsByHref()
6184 (xmlNsInScope(doc, orig, node, cur->prefix) == 1)) in xmlSearchNsByHref()
6195 (xmlNsInScope(doc, orig, node, cur->prefix) == 1)) in xmlSearchNsByHref()
6220 xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns) { in xmlNewReconciliedNs() argument
6242 def = xmlSearchNsByHref(doc, tree, ns->href); in xmlNewReconciliedNs()
6255 def = xmlSearchNs(doc, tree, prefix); in xmlNewReconciliedNs()
6263 def = xmlSearchNs(doc, tree, prefix); in xmlNewReconciliedNs()
6289 xmlReconciliateNs(xmlDocPtr doc, xmlNodePtr tree) { in xmlReconciliateNs() argument
6301 if ((doc == NULL) || (doc->type != XML_DOCUMENT_NODE)) return(-1); in xmlReconciliateNs()
6302 if (node->doc != doc) return(-1); in xmlReconciliateNs()
6337 n = xmlNewReconciliedNs(doc, tree, node->ns); in xmlReconciliateNs()
6401 n = xmlNewReconciliedNs(doc, tree, attr->ns); in xmlReconciliateNs()
6514 if ((node->doc != NULL) && (node->doc->intSubset != NULL)) { in xmlGetPropNodeInternal()
6515 xmlDocPtr doc = node->doc; in xmlGetPropNodeInternal() local
6535 attrDecl = xmlGetDtdQAttrDesc(doc->intSubset, in xmlGetPropNodeInternal()
6537 if ((attrDecl == NULL) && (doc->extSubset != NULL)) { in xmlGetPropNodeInternal()
6538 attrDecl = xmlGetDtdQAttrDesc(doc->extSubset, in xmlGetPropNodeInternal()
6548 nsList = xmlGetNsList(node->doc, node); in xmlGetPropNodeInternal()
6557 attrDecl = xmlGetDtdQAttrDesc(doc->intSubset, elemQName, in xmlGetPropNodeInternal()
6561 if (doc->extSubset != NULL) { in xmlGetPropNodeInternal()
6562 attrDecl = xmlGetDtdQAttrDesc(doc->extSubset, elemQName, in xmlGetPropNodeInternal()
6606 ret = xmlNodeListGetString(prop->doc, prop->children, 1); in xmlGetPropNodeValueInternal()
6633 xmlDocPtr doc; in xmlHasProp() local
6653 doc = node->doc; in xmlHasProp()
6654 if (doc != NULL) { in xmlHasProp()
6656 if (doc->intSubset != NULL) { in xmlHasProp()
6657 attrDecl = xmlGetDtdAttrDesc(doc->intSubset, node->name, name); in xmlHasProp()
6658 if ((attrDecl == NULL) && (doc->extSubset != NULL)) in xmlHasProp()
6659 attrDecl = xmlGetDtdAttrDesc(doc->extSubset, node->name, name); in xmlHasProp()
6841 ns = xmlSearchNs(node->doc, node, prefix); in xmlSetProp()
6876 xmlRemoveID(node->doc, prop); in xmlSetNsProp()
6888 xmlTreeErr(XML_TREE_NOT_UTF8, (xmlNodePtr) node->doc, in xmlSetNsProp()
6890 if (node->doc != NULL) in xmlSetNsProp()
6891 node->doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1"); in xmlSetNsProp()
6893 prop->children = xmlNewDocText(node->doc, value); in xmlSetNsProp()
6904 xmlAddID(NULL, node->doc, value, prop); in xmlSetNsProp()
6984 ((node->doc != NULL) && (node->doc->dict != NULL) && in xmlTextConcat()
6985 xmlDictOwns(node->doc->dict, node->content))) { in xmlTextConcat()
7745 xmlGetDocCompressMode (const xmlDoc *doc) { in xmlGetDocCompressMode() argument
7746 if (doc == NULL) return(-1); in xmlGetDocCompressMode()
7747 return(doc->compression); in xmlGetDocCompressMode()
7759 xmlSetDocCompressMode (xmlDocPtr doc, int mode) { in xmlSetDocCompressMode() argument
7760 if (doc == NULL) return; in xmlSetDocCompressMode()
7761 if (mode < 0) doc->compression = 0; in xmlSetDocCompressMode()
7762 else if (mode > 9) doc->compression = 9; in xmlSetDocCompressMode()
7763 else doc->compression = mode; in xmlSetDocCompressMode()
7958 xmlDOMWrapStoreNs(xmlDocPtr doc, in xmlDOMWrapStoreNs() argument
7964 if (doc == NULL) in xmlDOMWrapStoreNs()
7966 ns = xmlTreeEnsureXMLDecl(doc); in xmlDOMWrapStoreNs()
8087 while ((cur != NULL) && (cur != (xmlNodePtr) cur->doc)) { in xmlDOMWrapNSNormGatherInScopeNs()
8208 xmlDOMWrapRemoveNode(xmlDOMWrapCtxtPtr ctxt, xmlDocPtr doc, in xmlDOMWrapRemoveNode() argument
8215 if ((node == NULL) || (doc == NULL) || (node->doc != doc)) in xmlDOMWrapRemoveNode()
8275 ns = xmlDOMWrapStoreNs(doc, node->ns->href, in xmlDOMWrapRemoveNode()
8341 xmlSearchNsByNamespaceStrict(xmlDocPtr doc, xmlNodePtr node, in xmlSearchNsByNamespaceStrict() argument
8348 if ((doc == NULL) || (nsName == NULL) || (retNs == NULL)) in xmlSearchNsByNamespaceStrict()
8355 *retNs = xmlTreeEnsureXMLDecl(doc); in xmlSearchNsByNamespaceStrict()
8401 ret = xmlNsInScope(doc, node, prev, ns->prefix); in xmlSearchNsByNamespaceStrict()
8425 } while ((cur != NULL) && (cur->doc != (xmlDocPtr) cur)); in xmlSearchNsByNamespaceStrict()
8443 xmlSearchNsByPrefixStrict(xmlDocPtr doc, xmlNodePtr node, in xmlSearchNsByPrefixStrict() argument
8450 if ((doc == NULL) || (node == NULL) || (node->type == XML_NAMESPACE_DECL)) in xmlSearchNsByPrefixStrict()
8457 *retNs = xmlTreeEnsureXMLDecl(doc); in xmlSearchNsByPrefixStrict()
8488 } while ((cur != NULL) && (cur->doc != (xmlDocPtr) cur)); in xmlSearchNsByPrefixStrict()
8508 xmlDOMWrapNSNormDeclareNsForced(xmlDocPtr doc, in xmlDOMWrapNSNormDeclareNsForced() argument
8520 if ((doc == NULL) || (elem == NULL) || (elem->type != XML_ELEMENT_NODE)) in xmlDOMWrapNSNormDeclareNsForced()
8534 ((xmlNodePtr) elem->parent->doc != elem->parent)) { in xmlDOMWrapNSNormDeclareNsForced()
8538 if (xmlSearchNsByPrefixStrict(doc, elem->parent, pref, NULL) == 1) in xmlDOMWrapNSNormDeclareNsForced()
8587 xmlDOMWrapNSNormAquireNormalizedNs(xmlDocPtr doc, in xmlDOMWrapNSNormAquireNormalizedNs() argument
8599 if ((doc == NULL) || (ns == NULL) || (retNs == NULL) || in xmlDOMWrapNSNormAquireNormalizedNs()
8611 *retNs = xmlTreeEnsureXMLDecl(doc); in xmlDOMWrapNSNormAquireNormalizedNs()
8661 tmpns = xmlDOMWrapStoreNs(doc, ns->href, ns->prefix); in xmlDOMWrapNSNormAquireNormalizedNs()
8676 tmpns = xmlDOMWrapNSNormDeclareNsForced(doc, elem, ns->href, in xmlDOMWrapNSNormAquireNormalizedNs()
8735 xmlDocPtr doc; in xmlDOMWrapReconcileNamespaces() local
8746 if ((elem == NULL) || (elem->doc == NULL) || in xmlDOMWrapReconcileNamespaces()
8750 doc = elem->doc; in xmlDOMWrapReconcileNamespaces()
8767 ((xmlNodePtr) elem->parent->doc != elem->parent)) { in xmlDOMWrapReconcileNamespaces()
8851 ((xmlNodePtr) elem->parent->doc != elem->parent)) { in xmlDOMWrapReconcileNamespaces()
8888 if (xmlDOMWrapNSNormAquireNormalizedNs(doc, curElem, in xmlDOMWrapReconcileNamespaces()
9045 if (cur->doc != sourceDoc) { in xmlDOMWrapAdoptBranch()
9057 (cur->doc == node->doc)) in xmlDOMWrapAdoptBranch()
9061 if (cur->doc != node->doc) in xmlDOMWrapAdoptBranch()
9064 cur->doc = destDoc; in xmlDOMWrapAdoptBranch()
9398 if ((node->doc != NULL) && (sourceDoc != NULL) && in xmlDOMWrapCloneNode()
9399 (node->doc != sourceDoc)) { in xmlDOMWrapCloneNode()
9406 sourceDoc = node->doc; in xmlDOMWrapCloneNode()
9424 if (cur->doc != sourceDoc) { in xmlDOMWrapCloneNode()
9506 clone->doc = destDoc; in xmlDOMWrapCloneNode()
9742 idVal = xmlNodeListGetString(cur->doc, cur->children, 1); in xmlDOMWrapCloneNode()
9900 attr->doc = destDoc; in xmlDOMWrapAdoptAttr()
9944 cur->doc = destDoc; in xmlDOMWrapAdoptAttr()
10029 ((destParent != NULL) && (destParent->doc != destDoc))) in xmlDOMWrapAdoptNode()
10034 if ((node->doc != NULL) && (sourceDoc != NULL) && in xmlDOMWrapAdoptNode()
10035 (node->doc != sourceDoc)) { in xmlDOMWrapAdoptNode()
10042 sourceDoc = node->doc; in xmlDOMWrapAdoptNode()
10076 cur->doc = destDoc; in xmlDOMWrapAdoptNode()