Lines Matching refs:node

88 static encodePtr get_array_type(xmlNodePtr node, zval *array, smart_str *out_type TSRMLS_DC);
92 static void set_ns_prop(xmlNodePtr node, char *ns, char *name, char *val);
93 static void set_xsi_nil(xmlNodePtr node);
94 static void set_xsi_type(xmlNodePtr node, char *type);
96 static void get_type_str(xmlNodePtr node, const char* ns, const char* type, smart_str* ret);
97 static void set_ns_and_type_ex(xmlNodePtr node, char *ns, char *type);
99 static void set_ns_and_type(xmlNodePtr node, encodeTypePtr type);
294 static zend_bool soap_check_zval_ref(zval *data, xmlNodePtr node TSRMLS_DC) { in soap_check_zval_ref()
306 if (*node_ptr == node) { in soap_check_zval_ref()
309 xmlNodeSetName(node, (*node_ptr)->name); in soap_check_zval_ref()
310 xmlSetNs(node, (*node_ptr)->ns); in soap_check_zval_ref()
333 xmlSetProp(node, BAD_CAST("href"), BAD_CAST(id)); in soap_check_zval_ref()
350 set_ns_prop(node, SOAP_1_2_ENC_NAMESPACE, "ref", id); in soap_check_zval_ref()
355 …zend_hash_index_update(SOAP_GLOBAL(ref_map), (ulong)data, (void**)&node, sizeof(xmlNodePtr), NULL); in soap_check_zval_ref()
361 static zval* soap_find_xml_ref(xmlNodePtr node TSRMLS_DC) in soap_find_xml_ref()
366 zend_hash_index_find(SOAP_GLOBAL(ref_map), (ulong)node, (void**)&data_ptr) == SUCCESS) { in soap_find_xml_ref()
374 static zend_bool soap_check_xml_ref(zval **data, xmlNodePtr node TSRMLS_DC) in soap_check_xml_ref()
379 if (zend_hash_index_find(SOAP_GLOBAL(ref_map), (ulong)node, (void**)&data_ptr) == SUCCESS) { in soap_check_xml_ref()
388 zend_hash_index_update(SOAP_GLOBAL(ref_map), (ulong)node, (void**)data, sizeof(zval*), NULL); in soap_check_xml_ref()
396 xmlNodePtr node = NULL; in master_to_xml_int() local
445 node = master_to_xml(enc, NULL, style, parent TSRMLS_CC); in master_to_xml_int()
447 node = master_to_xml(enc, *zdata, style, parent TSRMLS_CC); in master_to_xml_int()
455 set_ns_and_type_ex(node, Z_STRVAL_PP(zns), Z_STRVAL_PP(zstype)); in master_to_xml_int()
457 set_ns_and_type_ex(node, NULL, Z_STRVAL_PP(zstype)); in master_to_xml_int()
464 xmlNodeSetName(node, BAD_CAST(Z_STRVAL_PP(zname))); in master_to_xml_int()
468 xmlNsPtr nsp = encode_add_ns(node, Z_STRVAL_PP(znamens)); in master_to_xml_int()
469 xmlSetNs(node, nsp); in master_to_xml_int()
528 node = encode->to_xml(&encode->details, data, style, parent TSRMLS_CC); in master_to_xml_int()
530 set_ns_and_type(node, &encode->details); in master_to_xml_int()
534 return node; in master_to_xml_int()
658 zval *to_zval_user(encodeTypePtr type, xmlNodePtr node TSRMLS_DC) in to_zval_user()
667 copy = xmlCopyNode(node, 1); in to_zval_user()
1295 static void model_to_zval_any(zval *ret, xmlNodePtr node TSRMLS_DC) in model_to_zval_any()
1300 while (node != NULL) { in model_to_zval_any()
1301 if (get_zval_property(ret, (char*)node->name TSRMLS_CC) == NULL) { in model_to_zval_any()
1302 zval* val = master_to_zval(get_conversion(XSD_ANYXML), node TSRMLS_CC); in model_to_zval_any()
1320 while (node->next != NULL) { in model_to_zval_any()
1321 zval* val2 = master_to_zval(get_conversion(XSD_ANYXML), node->next TSRMLS_CC); in model_to_zval_any()
1327 node = node->next; in model_to_zval_any()
1330 name = (char*)node->name; in model_to_zval_any()
1370 node = node->next; in model_to_zval_any()
1382 xmlNodePtr node = get_node(data->children, model->u.element->name); in model_to_zval_object() local
1384 if (node) { in model_to_zval_object()
1388 r_node = check_and_resolve_href(node); in model_to_zval_object()
1407 if ((node = get_node(node->next, model->u.element->name)) != NULL) { in model_to_zval_object()
1414 if (node && node->children && node->children->content) { in model_to_zval_object()
1415 …if (model->u.element->fixed && strcmp(model->u.element->fixed, (char*)node->children->content) != … in model_to_zval_object()
1416 …e '%s' is not allowed)", model->u.element->name, model->u.element->fixed, node->children->content); in model_to_zval_object()
1418 val = master_to_zval(model->u.element->encode, node TSRMLS_CC); in model_to_zval_object()
1430 val = master_to_zval(model->u.element->encode, node TSRMLS_CC); in model_to_zval_object()
1433 } while ((node = get_node(node->next, model->u.element->name)) != NULL); in model_to_zval_object()
1698 static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval *object, int style, … in model_to_xml_object() argument
1726 xmlAddChild(node, property); in model_to_xml_object()
1729 property = master_to_xml(enc, *val, style, node TSRMLS_CC); in model_to_xml_object()
1747 xmlAddChild(node, property); in model_to_xml_object()
1752 property = master_to_xml(enc, data, style, node TSRMLS_CC); in model_to_xml_object()
1769 xmlAddChild(node, property); in model_to_xml_object()
1804 property = master_to_xml(enc, *val, style, node TSRMLS_CC); in model_to_xml_object()
1808 property = master_to_xml(enc, data, style, node TSRMLS_CC); in model_to_xml_object()
1828 …if (!model_to_xml_object(node, *tmp, object, style, strict && ((*tmp)->min_occurs > 0) TSRMLS_CC))… in model_to_xml_object()
1845 int tmp_ret = model_to_xml_object(node, *tmp, object, style, 0 TSRMLS_CC); in model_to_xml_object()
1856 …return model_to_xml_object(node, model->u.group->model, object, style, strict && model->min_occurs… in model_to_xml_object()
3462 static void set_ns_and_type(xmlNodePtr node, encodeTypePtr type) in set_ns_and_type() argument
3464 set_ns_and_type_ex(node, type->ns, type->type_str); in set_ns_and_type()
3467 static void set_ns_and_type_ex(xmlNodePtr node, char *ns, char *type) in set_ns_and_type_ex() argument
3470 get_type_str(node, ns, type, &nstype); in set_ns_and_type_ex()
3471 set_xsi_type(node, nstype.c); in set_ns_and_type_ex()
3475 static xmlNsPtr xmlSearchNsPrefixByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href) in xmlSearchNsPrefixByHref() argument
3478 xmlNodePtr orig = node; in xmlSearchNsPrefixByHref()
3480 while (node) { in xmlSearchNsPrefixByHref()
3481 if (node->type == XML_ENTITY_REF_NODE || in xmlSearchNsPrefixByHref()
3482 node->type == XML_ENTITY_NODE || in xmlSearchNsPrefixByHref()
3483 node->type == XML_ENTITY_DECL) { in xmlSearchNsPrefixByHref()
3486 if (node->type == XML_ELEMENT_NODE) { in xmlSearchNsPrefixByHref()
3487 cur = node->nsDef; in xmlSearchNsPrefixByHref()
3490 if (xmlSearchNs(doc, node, cur->prefix) == cur) { in xmlSearchNsPrefixByHref()
3496 if (orig != node) { in xmlSearchNsPrefixByHref()
3497 cur = node->ns; in xmlSearchNsPrefixByHref()
3500 if (xmlSearchNs(doc, node, cur->prefix) == cur) { in xmlSearchNsPrefixByHref()
3507 node = node->parent; in xmlSearchNsPrefixByHref()
3512 xmlNsPtr encode_add_ns(xmlNodePtr node, const char* ns) in encode_add_ns() argument
3520 xmlns = xmlSearchNsByHref(node->doc, node, BAD_CAST(ns)); in encode_add_ns()
3522 xmlns = xmlSearchNsPrefixByHref(node->doc, node, BAD_CAST(ns)); in encode_add_ns()
3529 xmlns = xmlNewNs(node->doc->children, BAD_CAST(ns), prefix); in encode_add_ns()
3538 if (xmlSearchNs(node->doc, node, BAD_CAST(prefix.c)) == NULL) { in encode_add_ns()
3547 xmlns = xmlNewNs(node->doc->children, BAD_CAST(ns), BAD_CAST(prefix.c)); in encode_add_ns()
3554 static void set_ns_prop(xmlNodePtr node, char *ns, char *name, char *val) in set_ns_prop() argument
3556 xmlSetNsProp(node, encode_add_ns(node, ns), BAD_CAST(name), BAD_CAST(val)); in set_ns_prop()
3559 static void set_xsi_nil(xmlNodePtr node) in set_xsi_nil() argument
3561 set_ns_prop(node, XSI_NAMESPACE, "nil", "true"); in set_xsi_nil()
3564 static void set_xsi_type(xmlNodePtr node, char *type) in set_xsi_type() argument
3566 set_ns_prop(node, XSI_NAMESPACE, "type", type); in set_xsi_type()
3625 static encodePtr get_array_type(xmlNodePtr node, zval *array, smart_str *type TSRMLS_DC) in get_array_type() argument
3707 xmlNsPtr ns = encode_add_ns(node, cur_ns); in get_array_type()
3724 get_type_str(node, enc->details.ns, enc->details.type_str, type); in get_array_type()
3730 static void get_type_str(xmlNodePtr node, const char* ns, const char* type, smart_str* ret) in get_type_str() argument
3743 xmlns = encode_add_ns(node, ns); in get_type_str()