Lines Matching refs:node

88 static encodePtr get_array_type(xmlNodePtr node, zval *array, smart_str *out_type);
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);
296 static zend_bool soap_check_zval_ref(zval *data, xmlNodePtr node) { in soap_check_zval_ref() argument
308 if (node_ptr == node) { in soap_check_zval_ref()
311 xmlNodeSetName(node, node_ptr->name); in soap_check_zval_ref()
312 xmlSetNs(node, node_ptr->ns); in soap_check_zval_ref()
335 xmlSetProp(node, BAD_CAST("href"), BAD_CAST(id)); in soap_check_zval_ref()
352 set_ns_prop(node, SOAP_1_2_ENC_NAMESPACE, "ref", id); in soap_check_zval_ref()
357 zend_hash_index_update_ptr(SOAP_GLOBAL(ref_map), (zend_ulong)data, node); in soap_check_zval_ref()
363 static zend_bool soap_check_xml_ref(zval *data, xmlNodePtr node) in soap_check_xml_ref() argument
368 if ((data_ptr = zend_hash_index_find(SOAP_GLOBAL(ref_map), (zend_ulong)node)) != NULL) { in soap_check_xml_ref()
381 static void soap_add_xml_ref(zval *data, xmlNodePtr node) in soap_add_xml_ref() argument
384 zend_hash_index_update(SOAP_GLOBAL(ref_map), (zend_ulong)node, data); in soap_add_xml_ref()
390 xmlNodePtr node = NULL; in master_to_xml_int() local
440 node = master_to_xml(enc, zdata, style, parent); in master_to_xml_int()
447 set_ns_and_type_ex(node, Z_STRVAL_P(zns), Z_STRVAL_P(zstype)); in master_to_xml_int()
449 set_ns_and_type_ex(node, NULL, Z_STRVAL_P(zstype)); in master_to_xml_int()
456 xmlNodeSetName(node, BAD_CAST(Z_STRVAL_P(zname))); in master_to_xml_int()
460 xmlNsPtr nsp = encode_add_ns(node, Z_STRVAL_P(znamens)); in master_to_xml_int()
461 xmlSetNs(node, nsp); in master_to_xml_int()
516 node = encode->to_xml(&encode->details, data, style, parent); in master_to_xml_int()
518 set_ns_and_type(node, &encode->details); in master_to_xml_int()
522 return node; in master_to_xml_int()
644 zval *to_zval_user(zval *ret, encodeTypePtr type, xmlNodePtr node) in to_zval_user() argument
651 copy = xmlCopyNode(node, 1); in to_zval_user()
1244 static void model_to_zval_any(zval *ret, xmlNodePtr node) in model_to_zval_any() argument
1250 while (node != NULL) { in model_to_zval_any()
1251 if (get_zval_property(ret, (char*)node->name, &rv) == NULL) { in model_to_zval_any()
1254 master_to_zval(&val, get_conversion(XSD_ANYXML), node); in model_to_zval_any()
1269 while (node->next != NULL) { in model_to_zval_any()
1273 master_to_zval(&val2, get_conversion(XSD_ANYXML), node->next); in model_to_zval_any()
1280 node = node->next; in model_to_zval_any()
1283 name = (char*)node->name; in model_to_zval_any()
1318 node = node->next; in model_to_zval_any()
1330 xmlNodePtr node = get_node(data->children, model->u.element->name); in model_to_zval_object() local
1332 if (node) { in model_to_zval_object()
1337 r_node = check_and_resolve_href(node); in model_to_zval_object()
1356 if ((node = get_node(node->next, model->u.element->name)) != NULL) { in model_to_zval_object()
1362 if (node && node->children && node->children->content) { in model_to_zval_object()
1363 …if (model->u.element->fixed && strcmp(model->u.element->fixed, (char*)node->children->content) != … in model_to_zval_object()
1364 …e '%s' is not allowed)", model->u.element->name, model->u.element->fixed, node->children->content); in model_to_zval_object()
1366 master_to_zval(&val, model->u.element->encode, node); in model_to_zval_object()
1378 master_to_zval(&val, model->u.element->encode, node); in model_to_zval_object()
1381 } while ((node = get_node(node->next, model->u.element->name)) != NULL); in model_to_zval_object()
1632 static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval *object, int style, … in model_to_xml_object() argument
1661 xmlAddChild(node, property); in model_to_xml_object()
1664 property = master_to_xml(enc, val, style, node); in model_to_xml_object()
1681 xmlAddChild(node, property); in model_to_xml_object()
1686 property = master_to_xml(enc, data, style, node); in model_to_xml_object()
1703 xmlAddChild(node, property); in model_to_xml_object()
1737 master_to_xml(enc, val, style, node); in model_to_xml_object()
1740 master_to_xml(enc, data, style, node); in model_to_xml_object()
1758 if (!model_to_xml_object(node, tmp, object, style, strict && (tmp->min_occurs > 0))) { in model_to_xml_object()
1772 int tmp_ret = model_to_xml_object(node, tmp, object, style, 0); in model_to_xml_object()
1782 …return model_to_xml_object(node, model->u.group->model, object, style, strict && model->min_occurs… in model_to_xml_object()
3361 static void set_ns_and_type(xmlNodePtr node, encodeTypePtr type) in set_ns_and_type() argument
3363 set_ns_and_type_ex(node, type->ns, type->type_str); in set_ns_and_type()
3366 static void set_ns_and_type_ex(xmlNodePtr node, char *ns, char *type) in set_ns_and_type_ex() argument
3369 get_type_str(node, ns, type, &nstype); in set_ns_and_type_ex()
3370 set_xsi_type(node, ZSTR_VAL(nstype.s)); in set_ns_and_type_ex()
3374 static xmlNsPtr xmlSearchNsPrefixByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href) in xmlSearchNsPrefixByHref() argument
3377 xmlNodePtr orig = node; in xmlSearchNsPrefixByHref()
3379 while (node) { in xmlSearchNsPrefixByHref()
3380 if (node->type == XML_ENTITY_REF_NODE || in xmlSearchNsPrefixByHref()
3381 node->type == XML_ENTITY_NODE || in xmlSearchNsPrefixByHref()
3382 node->type == XML_ENTITY_DECL) { in xmlSearchNsPrefixByHref()
3385 if (node->type == XML_ELEMENT_NODE) { in xmlSearchNsPrefixByHref()
3386 cur = node->nsDef; in xmlSearchNsPrefixByHref()
3389 if (xmlSearchNs(doc, node, cur->prefix) == cur) { in xmlSearchNsPrefixByHref()
3395 if (orig != node) { in xmlSearchNsPrefixByHref()
3396 cur = node->ns; in xmlSearchNsPrefixByHref()
3399 if (xmlSearchNs(doc, node, cur->prefix) == cur) { in xmlSearchNsPrefixByHref()
3406 node = node->parent; in xmlSearchNsPrefixByHref()
3411 xmlNsPtr encode_add_ns(xmlNodePtr node, const char* ns) in encode_add_ns() argument
3419 xmlns = xmlSearchNsByHref(node->doc, node, BAD_CAST(ns)); in encode_add_ns()
3421 xmlns = xmlSearchNsPrefixByHref(node->doc, node, BAD_CAST(ns)); in encode_add_ns()
3427 xmlns = xmlNewNs(node->doc->children, BAD_CAST(ns), prefix); in encode_add_ns()
3436 if (xmlSearchNs(node->doc, node, BAD_CAST(ZSTR_VAL(prefix.s))) == NULL) { in encode_add_ns()
3444 … xmlns = xmlNewNs(node->doc->children, BAD_CAST(ns), BAD_CAST(prefix.s ? ZSTR_VAL(prefix.s) : "")); in encode_add_ns()
3451 static void set_ns_prop(xmlNodePtr node, char *ns, char *name, char *val) in set_ns_prop() argument
3453 xmlSetNsProp(node, encode_add_ns(node, ns), BAD_CAST(name), BAD_CAST(val)); in set_ns_prop()
3456 static void set_xsi_nil(xmlNodePtr node) in set_xsi_nil() argument
3458 set_ns_prop(node, XSI_NAMESPACE, "nil", "true"); in set_xsi_nil()
3461 static void set_xsi_type(xmlNodePtr node, char *type) in set_xsi_type() argument
3463 set_ns_prop(node, XSI_NAMESPACE, "type", type); in set_xsi_type()
3516 static encodePtr get_array_type(xmlNodePtr node, zval *array, smart_str *type) in get_array_type() argument
3596 xmlNsPtr ns = encode_add_ns(node, cur_ns); in get_array_type()
3613 get_type_str(node, enc->details.ns, enc->details.type_str, type); in get_array_type()
3620 static void get_type_str(xmlNodePtr node, const char* ns, const char* type, smart_str* ret) in get_type_str() argument
3632 xmlns = encode_add_ns(node, ns); in get_type_str()