Lines Matching refs:child
840 xmlNodePtr child, new_child, parentp, refp; in PHP_METHOD() local
855 DOM_GET_OBJ(child, node, xmlNodePtr, childobj); in PHP_METHOD()
862 (child->parent != NULL && dom_node_is_read_only(child->parent) == SUCCESS)) { in PHP_METHOD()
867 if (dom_hierarchy(parentp, child) == FAILURE) { in PHP_METHOD()
872 if (child->doc != parentp->doc && child->doc != NULL) { in PHP_METHOD()
877 if (child->type == XML_DOCUMENT_FRAG_NODE && child->children == NULL) { in PHP_METHOD()
883 if (child->doc == NULL && parentp->doc != NULL) { in PHP_METHOD()
895 if (child->parent != NULL) { in PHP_METHOD()
896 xmlUnlinkNode(child); in PHP_METHOD()
899 if (child->type == XML_TEXT_NODE && (refp->type == XML_TEXT_NODE || in PHP_METHOD()
901 if (child->doc == NULL) { in PHP_METHOD()
902 xmlSetTreeDoc(child, parentp->doc); in PHP_METHOD()
904 new_child = child; in PHP_METHOD()
918 } else if (child->type == XML_ATTRIBUTE_NODE) { in PHP_METHOD()
921 if (child->ns == NULL) in PHP_METHOD()
922 lastattr = xmlHasProp(refp->parent, child->name); in PHP_METHOD()
924 lastattr = xmlHasNsProp(refp->parent, child->name, child->ns->href); in PHP_METHOD()
926 if (lastattr != (xmlAttrPtr) child) { in PHP_METHOD()
930 DOM_RET_OBJ(child, &ret, intern); in PHP_METHOD()
934 } else if (child->type == XML_DOCUMENT_FRAG_NODE) { in PHP_METHOD()
935 new_child = _php_dom_insert_fragment(parentp, refp->prev, refp, child, intern, childobj); in PHP_METHOD()
939 new_child = xmlAddPrevSibling(refp, child); in PHP_METHOD()
942 if (child->parent != NULL){ in PHP_METHOD()
943 xmlUnlinkNode(child); in PHP_METHOD()
945 …if (child->type == XML_TEXT_NODE && parentp->last != NULL && parentp->last->type == XML_TEXT_NODE)… in PHP_METHOD()
946 child->parent = parentp; in PHP_METHOD()
947 if (child->doc == NULL) { in PHP_METHOD()
948 xmlSetTreeDoc(child, parentp->doc); in PHP_METHOD()
950 new_child = child; in PHP_METHOD()
952 parentp->children = child; in PHP_METHOD()
953 parentp->last = child; in PHP_METHOD()
955 child = parentp->last; in PHP_METHOD()
956 child->next = new_child; in PHP_METHOD()
957 new_child->prev = child; in PHP_METHOD()
960 } else if (child->type == XML_ATTRIBUTE_NODE) { in PHP_METHOD()
963 if (child->ns == NULL) in PHP_METHOD()
964 lastattr = xmlHasProp(parentp, child->name); in PHP_METHOD()
966 lastattr = xmlHasNsProp(parentp, child->name, child->ns->href); in PHP_METHOD()
968 if (lastattr != (xmlAttrPtr) child) { in PHP_METHOD()
972 DOM_RET_OBJ(child, &ret, intern); in PHP_METHOD()
976 } else if (child->type == XML_DOCUMENT_FRAG_NODE) { in PHP_METHOD()
977 new_child = _php_dom_insert_fragment(parentp, parentp->last, NULL, child, intern, childobj); in PHP_METHOD()
980 new_child = xmlAddChild(parentp, child); in PHP_METHOD()
1099 xmlNodePtr children, child, nodep; in PHP_METHOD() local
1114 DOM_GET_OBJ(child, node, xmlNodePtr, childobj); in PHP_METHOD()
1119 (child->parent != NULL && dom_node_is_read_only(child->parent) == SUCCESS)) { in PHP_METHOD()
1131 if (children == child) { in PHP_METHOD()
1132 xmlUnlinkNode(child); in PHP_METHOD()
1133 DOM_RET_OBJ(child, &ret, intern); in PHP_METHOD()
1150 xmlNodePtr child, nodep, new_child = NULL; in PHP_METHOD() local
1165 DOM_GET_OBJ(child, node, xmlNodePtr, childobj); in PHP_METHOD()
1170 (child->parent != NULL && dom_node_is_read_only(child->parent) == SUCCESS)) { in PHP_METHOD()
1175 if (dom_hierarchy(nodep, child) == FAILURE) { in PHP_METHOD()
1180 if (!(child->doc == NULL || child->doc == nodep->doc)) { in PHP_METHOD()
1185 if (child->type == XML_DOCUMENT_FRAG_NODE && child->children == NULL) { in PHP_METHOD()
1191 if (child->doc == NULL && nodep->doc != NULL) { in PHP_METHOD()
1196 if (child->parent != NULL){ in PHP_METHOD()
1197 xmlUnlinkNode(child); in PHP_METHOD()
1200 if (child->type == XML_TEXT_NODE && nodep->last != NULL && nodep->last->type == XML_TEXT_NODE) { in PHP_METHOD()
1201 child->parent = nodep; in PHP_METHOD()
1202 if (child->doc == NULL) { in PHP_METHOD()
1203 xmlSetTreeDoc(child, nodep->doc); in PHP_METHOD()
1205 new_child = child; in PHP_METHOD()
1207 nodep->children = child; in PHP_METHOD()
1208 nodep->last = child; in PHP_METHOD()
1210 child = nodep->last; in PHP_METHOD()
1211 child->next = new_child; in PHP_METHOD()
1212 new_child->prev = child; in PHP_METHOD()
1215 } else if (child->type == XML_ATTRIBUTE_NODE) { in PHP_METHOD()
1218 if (child->ns == NULL) in PHP_METHOD()
1219 lastattr = xmlHasProp(nodep, child->name); in PHP_METHOD()
1221 lastattr = xmlHasNsProp(nodep, child->name, child->ns->href); in PHP_METHOD()
1223 if (lastattr != (xmlAttrPtr) child) { in PHP_METHOD()
1228 } else if (child->type == XML_DOCUMENT_FRAG_NODE) { in PHP_METHOD()
1229 new_child = _php_dom_insert_fragment(nodep, nodep->last, NULL, child, intern, childobj); in PHP_METHOD()
1233 new_child = xmlAddChild(nodep, child); in PHP_METHOD()