Lines Matching refs:attrp

216 static void php_set_attribute_id(xmlAttrPtr attrp, bool is_id, php_libxml_ref_obj *document);
542 static bool dom_remove_attribute(xmlNodePtr thisp, xmlNodePtr attrp) in dom_remove_attribute() argument
545 ZEND_ASSERT(attrp != NULL); in dom_remove_attribute()
547 switch (attrp->type) { in dom_remove_attribute()
549 if (php_dom_object_get_data(attrp) == NULL) { in dom_remove_attribute()
550 node_list_unlink(attrp->children); in dom_remove_attribute()
551 xmlUnlinkNode(attrp); in dom_remove_attribute()
552 xmlFreeProp((xmlAttrPtr)attrp); in dom_remove_attribute()
554 xmlUnlinkNode(attrp); in dom_remove_attribute()
563 xmlNsPtr ns = (xmlNsPtr) attrp; in dom_remove_attribute()
604 xmlNodePtr nodep, attrp; in PHP_METHOD() local
615 attrp = dom_get_attribute_or_nsdecl(intern, nodep, BAD_CAST name, name_len); in PHP_METHOD()
616 if (attrp == NULL) { in PHP_METHOD()
620 RETURN_BOOL(dom_remove_attribute(nodep, attrp)); in PHP_METHOD()
625 xmlNodePtr nodep, attrp; in PHP_METHOD() local
636 attrp = dom_get_attribute_or_nsdecl(intern, nodep, BAD_CAST name, name_len); in PHP_METHOD()
637 if (attrp != NULL) { in PHP_METHOD()
638 dom_remove_attribute(nodep, attrp); in PHP_METHOD()
650 xmlNodePtr nodep, attrp; in PHP_METHOD() local
662 attrp = dom_get_attribute_or_nsdecl(intern, nodep, BAD_CAST name, name_len); in PHP_METHOD()
663 if (attrp == NULL) { in PHP_METHOD()
670 if (attrp->type == XML_NAMESPACE_DECL) { in PHP_METHOD()
671 xmlNsPtr original = (xmlNsPtr) attrp; in PHP_METHOD()
676 DOM_RET_OBJ((xmlNodePtr) attrp, intern); in PHP_METHOD()
686 xmlAttr *attrp, *existattrp = NULL; in dom_element_set_attribute_node_common() local
695 DOM_GET_OBJ(attrp, node, xmlAttrPtr, attrobj); in dom_element_set_attribute_node_common()
700 ZEND_ASSERT(attrp->type == XML_ATTRIBUTE_NODE); in dom_element_set_attribute_node_common()
703 if (attrp->parent != NULL && attrp->parent != nodep) { in dom_element_set_attribute_node_common()
707 if (attrp->doc != NULL && attrp->doc != nodep->doc) { in dom_element_set_attribute_node_common()
708 php_dom_adopt_node((xmlNodePtr) attrp, intern, nodep->doc); in dom_element_set_attribute_node_common()
711 if (!(attrp->doc == NULL || attrp->doc == nodep->doc)) { in dom_element_set_attribute_node_common()
717 nsp = attrp->ns; in dom_element_set_attribute_node_common()
719 existattrp = xmlHasNsProp(nodep, attrp->name, nsp->href); in dom_element_set_attribute_node_common()
721 existattrp = xmlHasProp(nodep, attrp->name); in dom_element_set_attribute_node_common()
726 ((php_libxml_node_ptr *)oldobj->ptr)->node == (xmlNodePtr) attrp) in dom_element_set_attribute_node_common()
733 if (attrp->parent != NULL) { in dom_element_set_attribute_node_common()
734 xmlUnlinkNode((xmlNodePtr) attrp); in dom_element_set_attribute_node_common()
737 if (attrp->doc == NULL && nodep->doc != NULL && intern->document != NULL) { in dom_element_set_attribute_node_common()
738 dom_set_document_ref_pointers_attr(attrp, intern->document); in dom_element_set_attribute_node_common()
741 xmlAddChild(nodep, (xmlNodePtr) attrp); in dom_element_set_attribute_node_common()
744 php_dom_reconcile_attribute_namespace_after_insertion(attrp); in dom_element_set_attribute_node_common()
746 dom_check_register_attribute_id(attrp, intern->document); in dom_element_set_attribute_node_common()
774 xmlAttr *attrp; in dom_element_remove_attribute_node() local
783 DOM_GET_OBJ(attrp, node, xmlAttrPtr, attrobj); in dom_element_remove_attribute_node()
785 ZEND_ASSERT(attrp->type == XML_ATTRIBUTE_NODE); in dom_element_remove_attribute_node()
787 if (attrp->parent != nodep) { in dom_element_remove_attribute_node()
792 xmlUnlinkNode((xmlNodePtr) attrp); in dom_element_remove_attribute_node()
794 DOM_RET_OBJ((xmlNodePtr) attrp, intern); in dom_element_remove_attribute_node()
1130 xmlAttr *attrp; in PHP_METHOD() local
1148 attrp = xmlHasNsProp(nodep, BAD_CAST name, BAD_CAST uri); in PHP_METHOD()
1161 if (attrp && attrp->type != XML_ATTRIBUTE_DECL) { in PHP_METHOD()
1162 if (php_dom_object_get_data((xmlNodePtr) attrp) == NULL) { in PHP_METHOD()
1163 node_list_unlink(attrp->children); in PHP_METHOD()
1164 xmlUnlinkNode((xmlNodePtr) attrp); in PHP_METHOD()
1165 xmlFreeProp(attrp); in PHP_METHOD()
1167 xmlUnlinkNode((xmlNodePtr) attrp); in PHP_METHOD()
1181 xmlAttrPtr attrp; in PHP_METHOD() local
1198 attrp = xmlHasNsProp(elemp, BAD_CAST name, BAD_CAST uri); in PHP_METHOD()
1200 if (attrp == NULL) { in PHP_METHOD()
1215 DOM_RET_OBJ((xmlNodePtr) attrp, intern); in PHP_METHOD()
1343 static void php_set_attribute_id(xmlAttrPtr attrp, bool is_id, php_libxml_ref_obj *document) /* {{{… in php_set_attribute_id() argument
1345 if (is_id && attrp->atype != XML_ATTRIBUTE_ID) { in php_set_attribute_id()
1346 attrp->atype = XML_ATTRIBUTE_ID; in php_set_attribute_id()
1347 } else if (!is_id && attrp->atype == XML_ATTRIBUTE_ID) { in php_set_attribute_id()
1348 xmlRemoveID(attrp->doc, attrp); in php_set_attribute_id()
1349 attrp->atype = 0; in php_set_attribute_id()
1363 xmlAttrPtr attrp; in PHP_METHOD() local
1376 attrp = xmlHasNsProp(nodep, BAD_CAST name, NULL); in PHP_METHOD()
1377 if (attrp == NULL || attrp->type == XML_ATTRIBUTE_DECL) { in PHP_METHOD()
1380 php_set_attribute_id(attrp, is_id, intern->document); in PHP_METHOD()
1392 xmlAttrPtr attrp; in PHP_METHOD() local
1405 attrp = xmlHasNsProp(elemp, BAD_CAST name, BAD_CAST uri); in PHP_METHOD()
1406 if (attrp == NULL || attrp->type == XML_ATTRIBUTE_DECL) { in PHP_METHOD()
1409 php_set_attribute_id(attrp, is_id, intern->document); in PHP_METHOD()
1421 xmlAttrPtr attrp; in dom_element_set_id_attribute_node() local
1431 DOM_GET_OBJ(attrp, node, xmlAttrPtr, attrobj); in dom_element_set_id_attribute_node()
1433 if (attrp->parent != nodep) { in dom_element_set_id_attribute_node()
1436 php_set_attribute_id(attrp, is_id, intern->document); in dom_element_set_id_attribute_node()