Lines Matching refs:nodep
162 static void dom_reconcile_ns(xmlDocPtr doc, xmlNodePtr nodep) /* {{{ */ in dom_reconcile_ns() argument
166 if (nodep->type == XML_ELEMENT_NODE) { in dom_reconcile_ns()
168 if (nodep->nsDef != NULL) { in dom_reconcile_ns()
169 curns = nodep->nsDef; in dom_reconcile_ns()
173 if((nsptr = xmlSearchNsByHref(doc, nodep->parent, curns->href)) && in dom_reconcile_ns()
177 nodep->nsDef = nsdftptr; in dom_reconcile_ns()
189 xmlReconciliateNs(doc, nodep); in dom_reconcile_ns()
201 xmlNode *nodep; in dom_node_node_name_read() local
206 nodep = dom_object_get_node(obj); in dom_node_node_name_read()
208 if (nodep == NULL) { in dom_node_node_name_read()
213 switch (nodep->type) { in dom_node_node_name_read()
216 ns = nodep->ns; in dom_node_node_name_read()
220 qname = xmlStrcat(qname, nodep->name); in dom_node_node_name_read()
223 str = (char *) nodep->name; in dom_node_node_name_read()
227 ns = nodep->ns; in dom_node_node_name_read()
231 qname = xmlStrcat(qname, nodep->name); in dom_node_node_name_read()
234 str = (char *) nodep->name; in dom_node_node_name_read()
243 str = (char *) nodep->name; in dom_node_node_name_read()
288 xmlNode *nodep = dom_object_get_node(obj); in dom_node_node_value_read() local
291 if (nodep == NULL) { in dom_node_node_value_read()
297 switch (nodep->type) { in dom_node_node_value_read()
304 str = (char *) xmlNodeGetContent(nodep); in dom_node_node_value_read()
307 str = (char *) xmlNodeGetContent(nodep->children); in dom_node_node_value_read()
327 xmlNode *nodep = dom_object_get_node(obj); in dom_node_node_value_write() local
329 if (nodep == NULL) { in dom_node_node_value_write()
335 switch (nodep->type) { in dom_node_node_value_write()
338 if (nodep->children) { in dom_node_node_value_write()
339 node_list_unlink(nodep->children); in dom_node_node_value_write()
340 php_libxml_node_free_list((xmlNodePtr) nodep->children); in dom_node_node_value_write()
341 nodep->children = NULL; in dom_node_node_value_write()
349 xmlNodeSetContentLen(nodep, (xmlChar *) ZSTR_VAL(str), ZSTR_LEN(str) + 1); in dom_node_node_value_write()
369 xmlNode *nodep; in dom_node_node_type_read() local
371 nodep = dom_object_get_node(obj); in dom_node_node_type_read()
373 if (nodep == NULL) { in dom_node_node_type_read()
379 if (nodep->type == XML_DTD_NODE) { in dom_node_node_type_read()
382 ZVAL_LONG(retval, nodep->type); in dom_node_node_type_read()
397 xmlNode *nodep, *nodeparent; in dom_node_parent_node_read() local
399 nodep = dom_object_get_node(obj); in dom_node_parent_node_read()
401 if (nodep == NULL) { in dom_node_parent_node_read()
406 nodeparent = nodep->parent; in dom_node_parent_node_read()
425 xmlNode *nodep = dom_object_get_node(obj); in dom_node_child_nodes_read() local
428 if (nodep == NULL) { in dom_node_child_nodes_read()
433 if (dom_node_children_valid(nodep) == FAILURE) { in dom_node_child_nodes_read()
453 xmlNode *nodep, *first = NULL; in dom_node_first_child_read() local
455 nodep = dom_object_get_node(obj); in dom_node_first_child_read()
457 if (nodep == NULL) { in dom_node_first_child_read()
462 if (dom_node_children_valid(nodep) == SUCCESS) { in dom_node_first_child_read()
463 first = nodep->children; in dom_node_first_child_read()
484 xmlNode *nodep, *last = NULL; in dom_node_last_child_read() local
486 nodep = dom_object_get_node(obj); in dom_node_last_child_read()
488 if (nodep == NULL) { in dom_node_last_child_read()
493 if (dom_node_children_valid(nodep) == SUCCESS) { in dom_node_last_child_read()
494 last = nodep->last; in dom_node_last_child_read()
515 xmlNode *nodep, *prevsib; in dom_node_previous_sibling_read() local
517 nodep = dom_object_get_node(obj); in dom_node_previous_sibling_read()
519 if (nodep == NULL) { in dom_node_previous_sibling_read()
524 prevsib = nodep->prev; in dom_node_previous_sibling_read()
543 xmlNode *nodep, *nextsib; in dom_node_next_sibling_read() local
545 nodep = dom_object_get_node(obj); in dom_node_next_sibling_read()
547 if (nodep == NULL) { in dom_node_next_sibling_read()
552 nextsib = nodep->next; in dom_node_next_sibling_read()
571 xmlNode *nodep = dom_object_get_node(obj); in dom_node_attributes_read() local
574 if (nodep == NULL) { in dom_node_attributes_read()
579 if (nodep->type == XML_ELEMENT_NODE) { in dom_node_attributes_read()
599 xmlNode *nodep = dom_object_get_node(obj); in dom_node_owner_document_read() local
602 if (nodep == NULL) { in dom_node_owner_document_read()
607 if (nodep->type == XML_DOCUMENT_NODE || nodep->type == XML_HTML_DOCUMENT_NODE) { in dom_node_owner_document_read()
612 docp = nodep->doc; in dom_node_owner_document_read()
630 xmlNode *nodep = dom_object_get_node(obj); in dom_node_namespace_uri_read() local
633 if (nodep == NULL) { in dom_node_namespace_uri_read()
638 switch (nodep->type) { in dom_node_namespace_uri_read()
642 if (nodep->ns != NULL) { in dom_node_namespace_uri_read()
643 str = (char *) nodep->ns->href; in dom_node_namespace_uri_read()
669 xmlNode *nodep = dom_object_get_node(obj); in dom_node_prefix_read() local
673 if (nodep == NULL) { in dom_node_prefix_read()
678 switch (nodep->type) { in dom_node_prefix_read()
682 ns = nodep->ns; in dom_node_prefix_read()
704 xmlNode *nodep, *nsnode = NULL; in dom_node_prefix_write() local
709 nodep = dom_object_get_node(obj); in dom_node_prefix_write()
711 if (nodep == NULL) { in dom_node_prefix_write()
716 switch (nodep->type) { in dom_node_prefix_write()
718 nsnode = nodep; in dom_node_prefix_write()
721 nsnode = nodep->parent; in dom_node_prefix_write()
723 nsnode = xmlDocGetRootElement(nodep->doc); in dom_node_prefix_write()
728 if (nsnode && nodep->ns != NULL && !xmlStrEqual(nodep->ns->prefix, (xmlChar *)prefix)) { in dom_node_prefix_write()
729 strURI = (char *) nodep->ns->href; in dom_node_prefix_write()
732 (nodep->type == XML_ATTRIBUTE_NODE && !strcmp(prefix, "xmlns") && in dom_node_prefix_write()
734 (nodep->type == XML_ATTRIBUTE_NODE && !strcmp((char *) nodep->name, "xmlns"))) { in dom_node_prefix_write()
739 … if (xmlStrEqual((xmlChar *)prefix, curns->prefix) && xmlStrEqual(nodep->ns->href, curns->href)) { in dom_node_prefix_write()
746 ns = xmlNewNs(nsnode, nodep->ns->href, (xmlChar *)prefix); in dom_node_prefix_write()
756 xmlSetNs(nodep, ns); in dom_node_prefix_write()
776 xmlNode *nodep = dom_object_get_node(obj); in dom_node_local_name_read() local
778 if (nodep == NULL) { in dom_node_local_name_read()
783 …if (nodep->type == XML_ELEMENT_NODE || nodep->type == XML_ATTRIBUTE_NODE || nodep->type == XML_NAM… in dom_node_local_name_read()
784 ZVAL_STRING(retval, (char *) (nodep->name)); in dom_node_local_name_read()
801 xmlNode *nodep = dom_object_get_node(obj); in dom_node_base_uri_read() local
804 if (nodep == NULL) { in dom_node_base_uri_read()
809 baseuri = xmlNodeGetBase(nodep->doc, nodep); in dom_node_base_uri_read()
829 xmlNode *nodep = dom_object_get_node(obj); in dom_node_text_content_read() local
832 if (nodep == NULL) { in dom_node_text_content_read()
837 str = (char *) xmlNodeGetContent(nodep); in dom_node_text_content_read()
851 xmlNode *nodep = dom_object_get_node(obj); in dom_node_text_content_write() local
854 if (nodep == NULL) { in dom_node_text_content_write()
859 if (nodep->type == XML_ELEMENT_NODE || nodep->type == XML_ATTRIBUTE_NODE) { in dom_node_text_content_write()
860 if (nodep->children) { in dom_node_text_content_write()
861 node_list_unlink(nodep->children); in dom_node_text_content_write()
862 php_libxml_node_free_list((xmlNodePtr) nodep->children); in dom_node_text_content_write()
863 nodep->children = NULL; in dom_node_text_content_write()
869 xmlNodeSetContent(nodep, (xmlChar *) ""); in dom_node_text_content_write()
870 xmlNodeAddContent(nodep, (xmlChar *) ZSTR_VAL(str)); in dom_node_text_content_write()
878 static xmlNodePtr _php_dom_insert_fragment(xmlNodePtr nodep, xmlNodePtr prevsib, xmlNodePtr nextsib… in _php_dom_insert_fragment() argument
886 nodep->children = newchild; in _php_dom_insert_fragment()
892 nodep->last = fragment->last; in _php_dom_insert_fragment()
900 node->parent = nodep; in _php_dom_insert_fragment()
901 if (node->doc != nodep->doc) { in _php_dom_insert_fragment()
902 xmlSetTreeDoc(node, nodep->doc); in _php_dom_insert_fragment()
1091 xmlNodePtr children, newchild, oldchild, nodep; in PHP_FUNCTION() local
1101 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1103 if (dom_node_children_valid(nodep) == FAILURE) { in PHP_FUNCTION()
1110 children = nodep->children; in PHP_FUNCTION()
1117 if (dom_node_is_read_only(nodep) == SUCCESS || in PHP_FUNCTION()
1123 if (newchild->doc != nodep->doc && newchild->doc != NULL) { in PHP_FUNCTION()
1128 if (dom_hierarchy(nodep, newchild) == FAILURE) { in PHP_FUNCTION()
1150 newchild = _php_dom_insert_fragment(nodep, prevsib, nextsib, newchild, intern, newchildobj); in PHP_FUNCTION()
1152 dom_reconcile_ns(nodep->doc, newchild); in PHP_FUNCTION()
1155 if (newchild->doc == NULL && nodep->doc != NULL) { in PHP_FUNCTION()
1156 xmlSetTreeDoc(newchild, nodep->doc); in PHP_FUNCTION()
1161 dom_reconcile_ns(nodep->doc, newchild); in PHP_FUNCTION()
1179 xmlNodePtr children, child, nodep; in PHP_FUNCTION() local
1187 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1189 if (dom_node_children_valid(nodep) == FAILURE) { in PHP_FUNCTION()
1197 if (dom_node_is_read_only(nodep) == SUCCESS || in PHP_FUNCTION()
1203 children = nodep->children; in PHP_FUNCTION()
1230 xmlNodePtr child, nodep, new_child = NULL; in PHP_FUNCTION() local
1238 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1240 if (dom_node_children_valid(nodep) == FAILURE) { in PHP_FUNCTION()
1248 if (dom_node_is_read_only(nodep) == SUCCESS || in PHP_FUNCTION()
1254 if (dom_hierarchy(nodep, child) == FAILURE) { in PHP_FUNCTION()
1259 if (!(child->doc == NULL || child->doc == nodep->doc)) { in PHP_FUNCTION()
1269 if (child->doc == NULL && nodep->doc != NULL) { in PHP_FUNCTION()
1278 if (child->type == XML_TEXT_NODE && nodep->last != NULL && nodep->last->type == XML_TEXT_NODE) { in PHP_FUNCTION()
1279 child->parent = nodep; in PHP_FUNCTION()
1281 xmlSetTreeDoc(child, nodep->doc); in PHP_FUNCTION()
1284 if (nodep->children == NULL) { in PHP_FUNCTION()
1285 nodep->children = child; in PHP_FUNCTION()
1286 nodep->last = child; in PHP_FUNCTION()
1288 child = nodep->last; in PHP_FUNCTION()
1291 nodep->last = new_child; in PHP_FUNCTION()
1297 lastattr = xmlHasProp(nodep, child->name); in PHP_FUNCTION()
1299 lastattr = xmlHasNsProp(nodep, child->name, child->ns->href); in PHP_FUNCTION()
1307 new_child = _php_dom_insert_fragment(nodep, nodep->last, NULL, child, intern, childobj); in PHP_FUNCTION()
1311 new_child = xmlAddChild(nodep, child); in PHP_FUNCTION()
1318 dom_reconcile_ns(nodep->doc, new_child); in PHP_FUNCTION()
1331 xmlNode *nodep; in PHP_FUNCTION() local
1338 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1340 if (dom_node_children_valid(nodep) == FAILURE) { in PHP_FUNCTION()
1344 if (nodep->children) { in PHP_FUNCTION()
1420 xmlNode *nodep; in PHP_FUNCTION() local
1427 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1429 dom_normalize(nodep); in PHP_FUNCTION()
1463 xmlNode *nodep; in PHP_FUNCTION() local
1470 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1472 if (nodep->type != XML_ELEMENT_NODE) in PHP_FUNCTION()
1475 if (nodep->properties) { in PHP_FUNCTION()
1500 xmlNodePtr nodeotherp, nodep; in PHP_FUNCTION() local
1507 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1511 if (nodep == nodeotherp) { in PHP_FUNCTION()
1526 xmlNodePtr nodep, lookupp = NULL; in PHP_FUNCTION() local
1536 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1539 switch (nodep->type) { in PHP_FUNCTION()
1541 lookupp = nodep; in PHP_FUNCTION()
1545 lookupp = xmlDocGetRootElement((xmlDocPtr) nodep); in PHP_FUNCTION()
1555 lookupp = nodep->parent; in PHP_FUNCTION()
1577 xmlNodePtr nodep; in PHP_FUNCTION() local
1587 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1588 if (nodep->type == XML_DOCUMENT_NODE || nodep->type == XML_HTML_DOCUMENT_NODE) { in PHP_FUNCTION()
1589 nodep = xmlDocGetRootElement((xmlDocPtr) nodep); in PHP_FUNCTION()
1592 if (nodep && uri_len > 0) { in PHP_FUNCTION()
1593 nsptr = xmlSearchNs(nodep->doc, nodep, NULL); in PHP_FUNCTION()
1610 xmlNodePtr nodep; in PHP_FUNCTION() local
1620 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1621 if (nodep->type == XML_DOCUMENT_NODE || nodep->type == XML_HTML_DOCUMENT_NODE) { in PHP_FUNCTION()
1622 nodep = xmlDocGetRootElement((xmlDocPtr) nodep); in PHP_FUNCTION()
1623 if (nodep == NULL) { in PHP_FUNCTION()
1628 nsptr = xmlSearchNs(nodep->doc, nodep, (xmlChar *) prefix); in PHP_FUNCTION()
1681 xmlNodePtr nodep; in dom_canonicalization() local
1708 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in dom_canonicalization()
1710 docp = nodep->doc; in dom_canonicalization()
1718 if (nodep->type != XML_DOCUMENT_NODE) { in dom_canonicalization()
1720 ctxp->node = nodep; in dom_canonicalization()
1749 ctxp->node = nodep; in dom_canonicalization()
1872 xmlNode *nodep; in PHP_METHOD() local
1876 DOM_GET_THIS_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1878 value = (char *) xmlGetNodePath(nodep); in PHP_METHOD()
1893 xmlNode *nodep; in PHP_METHOD() local
1900 DOM_GET_THIS_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1902 RETURN_LONG(xmlGetLineNo(nodep)); in PHP_METHOD()