Lines Matching refs:attrp

435 	xmlNodePtr nodep, attrp;  in PHP_FUNCTION()  local
451 attrp = dom_get_dom1_attribute(nodep, (xmlChar *)name); in PHP_FUNCTION()
452 if (attrp == NULL) { in PHP_FUNCTION()
456 switch (attrp->type) { in PHP_FUNCTION()
458 if (php_dom_object_get_data(attrp) == NULL) { in PHP_FUNCTION()
459 node_list_unlink(attrp->children); in PHP_FUNCTION()
460 xmlUnlinkNode(attrp); in PHP_FUNCTION()
461 xmlFreeProp((xmlAttrPtr)attrp); in PHP_FUNCTION()
463 xmlUnlinkNode(attrp); in PHP_FUNCTION()
483 xmlNodePtr nodep, attrp; in PHP_FUNCTION() local
495 attrp = dom_get_dom1_attribute(nodep, (xmlChar *)name); in PHP_FUNCTION()
496 if (attrp == NULL) { in PHP_FUNCTION()
500 if (attrp->type == XML_NAMESPACE_DECL) { in PHP_FUNCTION()
504 nsparent = attrp->_private; in PHP_FUNCTION()
505 curns = xmlNewNs(NULL, attrp->name, NULL); in PHP_FUNCTION()
506 if (attrp->children) { in PHP_FUNCTION()
507 curns->prefix = xmlStrdup((xmlChar *) attrp->children); in PHP_FUNCTION()
509 if (attrp->children) { in PHP_FUNCTION()
510 attrp = xmlNewDocNode(nodep->doc, NULL, (xmlChar *) attrp->children, attrp->name); in PHP_FUNCTION()
512 attrp = xmlNewDocNode(nodep->doc, NULL, (xmlChar *)"xmlns", attrp->name); in PHP_FUNCTION()
514 attrp->type = XML_NAMESPACE_DECL; in PHP_FUNCTION()
515 attrp->parent = nsparent; in PHP_FUNCTION()
516 attrp->ns = curns; in PHP_FUNCTION()
519 DOM_RET_OBJ((xmlNodePtr) attrp, &ret, intern); in PHP_FUNCTION()
531 xmlAttr *attrp, *existattrp = NULL; in PHP_FUNCTION() local
546 DOM_GET_OBJ(attrp, node, xmlAttrPtr, attrobj); in PHP_FUNCTION()
548 if (attrp->type != XML_ATTRIBUTE_NODE) { in PHP_FUNCTION()
553 if (!(attrp->doc == NULL || attrp->doc == nodep->doc)) { in PHP_FUNCTION()
558 existattrp = xmlHasProp(nodep, attrp->name); in PHP_FUNCTION()
561 ((php_libxml_node_ptr *)oldobj->ptr)->node == (xmlNodePtr) attrp) in PHP_FUNCTION()
568 if (attrp->parent != NULL) { in PHP_FUNCTION()
569 xmlUnlinkNode((xmlNodePtr) attrp); in PHP_FUNCTION()
572 if (attrp->doc == NULL && nodep->doc != NULL) { in PHP_FUNCTION()
577 xmlAddChild(nodep, (xmlNodePtr) attrp); in PHP_FUNCTION()
597 xmlAttr *attrp; in PHP_FUNCTION() local
612 DOM_GET_OBJ(attrp, node, xmlAttrPtr, attrobj); in PHP_FUNCTION()
614 if (attrp->type != XML_ATTRIBUTE_NODE || attrp->parent != nodep) { in PHP_FUNCTION()
619 xmlUnlinkNode((xmlNodePtr) attrp); in PHP_FUNCTION()
621 DOM_RET_OBJ((xmlNodePtr) attrp, &ret, intern); in PHP_FUNCTION()
868 xmlAttr *attrp; in PHP_FUNCTION() local
885 attrp = xmlHasNsProp(nodep, (xmlChar *)name, (xmlChar *)uri); in PHP_FUNCTION()
903 if (attrp && attrp->type != XML_ATTRIBUTE_DECL) { in PHP_FUNCTION()
904 if (php_dom_object_get_data((xmlNodePtr) attrp) == NULL) { in PHP_FUNCTION()
905 node_list_unlink(attrp->children); in PHP_FUNCTION()
906 xmlUnlinkNode((xmlNodePtr) attrp); in PHP_FUNCTION()
907 xmlFreeProp(attrp); in PHP_FUNCTION()
909 xmlUnlinkNode((xmlNodePtr) attrp); in PHP_FUNCTION()
925 xmlAttrPtr attrp; in PHP_FUNCTION() local
937 attrp = xmlHasNsProp(elemp, (xmlChar *)name, (xmlChar *)uri); in PHP_FUNCTION()
939 if (attrp == NULL) { in PHP_FUNCTION()
966 DOM_RET_OBJ((xmlNodePtr) attrp, &ret, intern); in PHP_FUNCTION()
981 xmlAttr *attrp, *existattrp = NULL; in PHP_FUNCTION() local
996 DOM_GET_OBJ(attrp, node, xmlAttrPtr, attrobj); in PHP_FUNCTION()
998 if (attrp->type != XML_ATTRIBUTE_NODE) { in PHP_FUNCTION()
1003 if (!(attrp->doc == NULL || attrp->doc == nodep->doc)) { in PHP_FUNCTION()
1008 nsp = attrp->ns; in PHP_FUNCTION()
1010 existattrp = xmlHasNsProp(nodep, nsp->href, attrp->name); in PHP_FUNCTION()
1012 existattrp = xmlHasProp(nodep, attrp->name); in PHP_FUNCTION()
1017 ((php_libxml_node_ptr *)oldobj->ptr)->node == (xmlNodePtr) attrp) in PHP_FUNCTION()
1024 if (attrp->parent != NULL) { in PHP_FUNCTION()
1025 xmlUnlinkNode((xmlNodePtr) attrp); in PHP_FUNCTION()
1028 if (attrp->doc == NULL && nodep->doc != NULL) { in PHP_FUNCTION()
1033 xmlAddChild(nodep, (xmlNodePtr) attrp); in PHP_FUNCTION()
1139 static void php_set_attribute_id(xmlAttrPtr attrp, zend_bool is_id) /* {{{ */ in php_set_attribute_id() argument
1141 if (is_id == 1 && attrp->atype != XML_ATTRIBUTE_ID) { in php_set_attribute_id()
1144 id_val = xmlNodeListGetString(attrp->doc, attrp->children, 1); in php_set_attribute_id()
1146 xmlAddID(NULL, attrp->doc, id_val, attrp); in php_set_attribute_id()
1150 if (attrp->atype == XML_ATTRIBUTE_ID) { in php_set_attribute_id()
1151 xmlRemoveID(attrp->doc, attrp); in php_set_attribute_id()
1152 attrp->atype = 0; in php_set_attribute_id()
1166 xmlAttrPtr attrp; in PHP_FUNCTION() local
1183 attrp = xmlHasNsProp(nodep, (xmlChar *)name, NULL); in PHP_FUNCTION()
1184 if (attrp == NULL || attrp->type == XML_ATTRIBUTE_DECL) { in PHP_FUNCTION()
1187 php_set_attribute_id(attrp, is_id); in PHP_FUNCTION()
1202 xmlAttrPtr attrp; in PHP_FUNCTION() local
1219 attrp = xmlHasNsProp(elemp, (xmlChar *)name, (xmlChar *)uri); in PHP_FUNCTION()
1220 if (attrp == NULL || attrp->type == XML_ATTRIBUTE_DECL) { in PHP_FUNCTION()
1223 php_set_attribute_id(attrp, is_id); in PHP_FUNCTION()
1238 xmlAttrPtr attrp; in PHP_FUNCTION() local
1253 DOM_GET_OBJ(attrp, node, xmlAttrPtr, attrobj); in PHP_FUNCTION()
1255 if (attrp->parent != nodep) { in PHP_FUNCTION()
1258 php_set_attribute_id(attrp, is_id); in PHP_FUNCTION()