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()
290 xmlNode *nodep; in dom_node_node_value_read() local
293 nodep = dom_object_get_node(obj); in dom_node_node_value_read()
295 if (nodep == NULL) { in dom_node_node_value_read()
301 switch (nodep->type) { in dom_node_node_value_read()
308 str = xmlNodeGetContent(nodep); in dom_node_node_value_read()
311 str = xmlNodeGetContent(nodep->children); in dom_node_node_value_read()
334 xmlNode *nodep; in dom_node_node_value_write() local
337 nodep = dom_object_get_node(obj); in dom_node_node_value_write()
339 if (nodep == NULL) { in dom_node_node_value_write()
345 switch (nodep->type) { in dom_node_node_value_write()
348 if (nodep->children) { in dom_node_node_value_write()
349 node_list_unlink(nodep->children TSRMLS_CC); in dom_node_node_value_write()
363 xmlNodeSetContentLen(nodep, Z_STRVAL_P(newval), Z_STRLEN_P(newval) + 1); in dom_node_node_value_write()
384 xmlNode *nodep; in dom_node_node_type_read() local
386 nodep = dom_object_get_node(obj); in dom_node_node_type_read()
388 if (nodep == NULL) { in dom_node_node_type_read()
396 if (nodep->type == XML_DTD_NODE) { in dom_node_node_type_read()
399 ZVAL_LONG(*retval, nodep->type); in dom_node_node_type_read()
414 xmlNode *nodep, *nodeparent; in dom_node_parent_node_read() local
417 nodep = dom_object_get_node(obj); in dom_node_parent_node_read()
419 if (nodep == NULL) { in dom_node_parent_node_read()
426 nodeparent = nodep->parent; in dom_node_parent_node_read()
448 xmlNode *nodep; in dom_node_child_nodes_read() local
451 nodep = dom_object_get_node(obj); in dom_node_child_nodes_read()
453 if (nodep == NULL) { in dom_node_child_nodes_read()
460 if (dom_node_children_valid(nodep) == FAILURE) { in dom_node_child_nodes_read()
480 xmlNode *nodep, *first = NULL; in dom_node_first_child_read() local
483 nodep = dom_object_get_node(obj); in dom_node_first_child_read()
485 if (nodep == NULL) { in dom_node_first_child_read()
490 if (dom_node_children_valid(nodep) == SUCCESS) { in dom_node_first_child_read()
491 first = nodep->children; in dom_node_first_child_read()
517 xmlNode *nodep, *last = NULL; in dom_node_last_child_read() local
520 nodep = dom_object_get_node(obj); in dom_node_last_child_read()
522 if (nodep == NULL) { in dom_node_last_child_read()
527 if (dom_node_children_valid(nodep) == SUCCESS) { in dom_node_last_child_read()
528 last = nodep->last; in dom_node_last_child_read()
554 xmlNode *nodep, *prevsib; in dom_node_previous_sibling_read() local
557 nodep = dom_object_get_node(obj); in dom_node_previous_sibling_read()
559 if (nodep == NULL) { in dom_node_previous_sibling_read()
566 prevsib = nodep->prev; in dom_node_previous_sibling_read()
588 xmlNode *nodep, *nextsib; in dom_node_next_sibling_read() local
591 nodep = dom_object_get_node(obj); in dom_node_next_sibling_read()
593 if (nodep == NULL) { in dom_node_next_sibling_read()
598 nextsib = nodep->next; in dom_node_next_sibling_read()
621 xmlNode *nodep; in dom_node_attributes_read() local
624 nodep = dom_object_get_node(obj); in dom_node_attributes_read()
626 if (nodep == NULL) { in dom_node_attributes_read()
633 if (nodep->type == XML_ELEMENT_NODE) { in dom_node_attributes_read()
653 xmlNode *nodep; in dom_node_owner_document_read() local
657 nodep = dom_object_get_node(obj); in dom_node_owner_document_read()
659 if (nodep == NULL) { in dom_node_owner_document_read()
664 if (nodep->type == XML_DOCUMENT_NODE || nodep->type == XML_HTML_DOCUMENT_NODE) { in dom_node_owner_document_read()
670 docp = nodep->doc; in dom_node_owner_document_read()
693 xmlNode *nodep; in dom_node_namespace_uri_read() local
696 nodep = dom_object_get_node(obj); in dom_node_namespace_uri_read()
698 if (nodep == NULL) { in dom_node_namespace_uri_read()
703 switch (nodep->type) { in dom_node_namespace_uri_read()
707 if (nodep->ns != NULL) { in dom_node_namespace_uri_read()
708 str = (char *) nodep->ns->href; in dom_node_namespace_uri_read()
736 xmlNode *nodep; in dom_node_prefix_read() local
740 nodep = dom_object_get_node(obj); in dom_node_prefix_read()
742 if (nodep == NULL) { in dom_node_prefix_read()
747 switch (nodep->type) { in dom_node_prefix_read()
751 ns = nodep->ns; in dom_node_prefix_read()
775 xmlNode *nodep, *nsnode = NULL; in dom_node_prefix_write() local
780 nodep = dom_object_get_node(obj); in dom_node_prefix_write()
782 if (nodep == NULL) { in dom_node_prefix_write()
787 switch (nodep->type) { in dom_node_prefix_write()
789 nsnode = nodep; in dom_node_prefix_write()
792 nsnode = nodep->parent; in dom_node_prefix_write()
794 nsnode = xmlDocGetRootElement(nodep->doc); in dom_node_prefix_write()
806 if (nsnode && nodep->ns != NULL && !xmlStrEqual(nodep->ns->prefix, (xmlChar *)prefix)) { in dom_node_prefix_write()
807 strURI = (char *) nodep->ns->href; in dom_node_prefix_write()
810 (nodep->type == XML_ATTRIBUTE_NODE && !strcmp (prefix, "xmlns") && in dom_node_prefix_write()
812 (nodep->type == XML_ATTRIBUTE_NODE && !strcmp (nodep->name, "xmlns"))) { in dom_node_prefix_write()
817 … if (xmlStrEqual((xmlChar *)prefix, curns->prefix) && xmlStrEqual(nodep->ns->href, curns->href)) { in dom_node_prefix_write()
824 ns = xmlNewNs(nsnode, nodep->ns->href, (xmlChar *)prefix); in dom_node_prefix_write()
836 xmlSetNs(nodep, ns); in dom_node_prefix_write()
858 xmlNode *nodep; in dom_node_local_name_read() local
860 nodep = dom_object_get_node(obj); in dom_node_local_name_read()
862 if (nodep == NULL) { in dom_node_local_name_read()
869 …if (nodep->type == XML_ELEMENT_NODE || nodep->type == XML_ATTRIBUTE_NODE || nodep->type == XML_NAM… in dom_node_local_name_read()
870 ZVAL_STRING(*retval, (char *) (nodep->name), 1); in dom_node_local_name_read()
887 xmlNode *nodep; in dom_node_base_uri_read() local
890 nodep = dom_object_get_node(obj); in dom_node_base_uri_read()
892 if (nodep == NULL) { in dom_node_base_uri_read()
899 baseuri = xmlNodeGetBase(nodep->doc, nodep); in dom_node_base_uri_read()
919 xmlNode *nodep; in dom_node_text_content_read() local
922 nodep = dom_object_get_node(obj); in dom_node_text_content_read()
924 if (nodep == NULL) { in dom_node_text_content_read()
929 str = xmlNodeGetContent(nodep); in dom_node_text_content_read()
950 static xmlNodePtr _php_dom_insert_fragment(xmlNodePtr nodep, xmlNodePtr prevsib, xmlNodePtr nextsib… in _php_dom_insert_fragment() argument
958 nodep->children = newchild; in _php_dom_insert_fragment()
964 nodep->last = fragment->last; in _php_dom_insert_fragment()
972 node->parent = nodep; in _php_dom_insert_fragment()
973 if (node->doc != nodep->doc) { in _php_dom_insert_fragment()
974 xmlSetTreeDoc(node, nodep->doc); in _php_dom_insert_fragment()
1163 xmlNodePtr children, newchild, oldchild, nodep; in PHP_FUNCTION() local
1173 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1175 if (dom_node_children_valid(nodep) == FAILURE) { in PHP_FUNCTION()
1182 children = nodep->children; in PHP_FUNCTION()
1189 if (dom_node_is_read_only(nodep) == SUCCESS || in PHP_FUNCTION()
1195 if (newchild->doc != nodep->doc && newchild->doc != NULL) { in PHP_FUNCTION()
1200 if (dom_hierarchy(nodep, newchild) == FAILURE) { in PHP_FUNCTION()
1222 …newchild = _php_dom_insert_fragment(nodep, prevsib, nextsib, newchild, intern, newchildobj TSRMLS_… in PHP_FUNCTION()
1224 dom_reconcile_ns(nodep->doc, newchild); in PHP_FUNCTION()
1227 if (newchild->doc == NULL && nodep->doc != NULL) { in PHP_FUNCTION()
1228 xmlSetTreeDoc(newchild, nodep->doc); in PHP_FUNCTION()
1233 dom_reconcile_ns(nodep->doc, newchild); in PHP_FUNCTION()
1251 xmlNodePtr children, child, nodep; in PHP_FUNCTION() local
1259 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1261 if (dom_node_children_valid(nodep) == FAILURE) { in PHP_FUNCTION()
1269 if (dom_node_is_read_only(nodep) == SUCCESS || in PHP_FUNCTION()
1275 children = nodep->children; in PHP_FUNCTION()
1302 xmlNodePtr child, nodep, new_child = NULL; in PHP_FUNCTION() local
1310 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1312 if (dom_node_children_valid(nodep) == FAILURE) { in PHP_FUNCTION()
1320 if (dom_node_is_read_only(nodep) == SUCCESS || in PHP_FUNCTION()
1326 if (dom_hierarchy(nodep, child) == FAILURE) { in PHP_FUNCTION()
1331 if (!(child->doc == NULL || child->doc == nodep->doc)) { in PHP_FUNCTION()
1341 if (child->doc == NULL && nodep->doc != NULL) { in PHP_FUNCTION()
1350 if (child->type == XML_TEXT_NODE && nodep->last != NULL && nodep->last->type == XML_TEXT_NODE) { in PHP_FUNCTION()
1351 child->parent = nodep; in PHP_FUNCTION()
1353 xmlSetTreeDoc(child, nodep->doc); in PHP_FUNCTION()
1356 if (nodep->children == NULL) { in PHP_FUNCTION()
1357 nodep->children = child; in PHP_FUNCTION()
1358 nodep->last = child; in PHP_FUNCTION()
1360 child = nodep->last; in PHP_FUNCTION()
1363 nodep->last = new_child; in PHP_FUNCTION()
1369 lastattr = xmlHasProp(nodep, child->name); in PHP_FUNCTION()
1371 lastattr = xmlHasNsProp(nodep, child->name, child->ns->href); in PHP_FUNCTION()
1379 new_child = _php_dom_insert_fragment(nodep, nodep->last, NULL, child, intern, childobj TSRMLS_CC); in PHP_FUNCTION()
1383 new_child = xmlAddChild(nodep, child); in PHP_FUNCTION()
1390 dom_reconcile_ns(nodep->doc, new_child); in PHP_FUNCTION()
1403 xmlNode *nodep; in PHP_FUNCTION() local
1410 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1412 if (dom_node_children_valid(nodep) == FAILURE) { in PHP_FUNCTION()
1416 if (nodep->children) { in PHP_FUNCTION()
1492 xmlNode *nodep; in PHP_FUNCTION() local
1499 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1501 dom_normalize(nodep TSRMLS_CC); in PHP_FUNCTION()
1535 xmlNode *nodep; in PHP_FUNCTION() local
1542 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1544 if (nodep->type != XML_ELEMENT_NODE) in PHP_FUNCTION()
1547 if (nodep->properties) { in PHP_FUNCTION()
1572 xmlNodePtr nodeotherp, nodep; in PHP_FUNCTION() local
1579 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1583 if (nodep == nodeotherp) { in PHP_FUNCTION()
1598 xmlNodePtr nodep, lookupp = NULL; in PHP_FUNCTION() local
1608 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1611 switch (nodep->type) { in PHP_FUNCTION()
1613 lookupp = nodep; in PHP_FUNCTION()
1617 lookupp = xmlDocGetRootElement((xmlDocPtr) nodep); in PHP_FUNCTION()
1627 lookupp = nodep->parent; in PHP_FUNCTION()
1648 xmlNodePtr nodep; in PHP_FUNCTION() local
1658 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1659 if (nodep->type == XML_DOCUMENT_NODE || nodep->type == XML_HTML_DOCUMENT_NODE) { in PHP_FUNCTION()
1660 nodep = xmlDocGetRootElement((xmlDocPtr) nodep); in PHP_FUNCTION()
1663 if (nodep && uri_len > 0) { in PHP_FUNCTION()
1664 nsptr = xmlSearchNs(nodep->doc, nodep, NULL); in PHP_FUNCTION()
1681 xmlNodePtr nodep; in PHP_FUNCTION() local
1691 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in PHP_FUNCTION()
1692 if (nodep->type == XML_DOCUMENT_NODE || nodep->type == XML_HTML_DOCUMENT_NODE) { in PHP_FUNCTION()
1693 nodep = xmlDocGetRootElement((xmlDocPtr) nodep); in PHP_FUNCTION()
1694 if (nodep == NULL) { in PHP_FUNCTION()
1699 nsptr = xmlSearchNs(nodep->doc, nodep, prefix); in PHP_FUNCTION()
1752 xmlNodePtr nodep; in dom_canonicalization() local
1778 DOM_GET_OBJ(nodep, id, xmlNodePtr, intern); in dom_canonicalization()
1780 docp = nodep->doc; in dom_canonicalization()
1788 if (nodep->type != XML_DOCUMENT_NODE) { in dom_canonicalization()
1790 ctxp->node = nodep; in dom_canonicalization()
1819 ctxp->node = nodep; in dom_canonicalization()
1947 xmlNode *nodep; in PHP_METHOD() local
1951 DOM_GET_THIS_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1953 value = xmlGetNodePath(nodep); in PHP_METHOD()
1968 xmlNode *nodep; in PHP_METHOD() local
1975 DOM_GET_THIS_OBJ(nodep, id, xmlNodePtr, intern); in PHP_METHOD()
1977 RETURN_LONG(xmlGetLineNo(nodep)); in PHP_METHOD()