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);
292 static zend_bool soap_check_zval_ref(zval *data, xmlNodePtr node TSRMLS_DC) { in soap_check_zval_ref()
304 if (*node_ptr == node) { in soap_check_zval_ref()
307 xmlNodeSetName(node, (*node_ptr)->name); in soap_check_zval_ref()
308 xmlSetNs(node, (*node_ptr)->ns); in soap_check_zval_ref()
331 xmlSetProp(node, BAD_CAST("href"), BAD_CAST(id)); in soap_check_zval_ref()
348 set_ns_prop(node, SOAP_1_2_ENC_NAMESPACE, "ref", id); in soap_check_zval_ref()
353 …zend_hash_index_update(SOAP_GLOBAL(ref_map), (ulong)data, (void**)&node, sizeof(xmlNodePtr), NULL); in soap_check_zval_ref()
359 static zval* soap_find_xml_ref(xmlNodePtr node TSRMLS_DC) in soap_find_xml_ref()
364 zend_hash_index_find(SOAP_GLOBAL(ref_map), (ulong)node, (void**)&data_ptr) == SUCCESS) { in soap_find_xml_ref()
372 static zend_bool soap_check_xml_ref(zval **data, xmlNodePtr node TSRMLS_DC) in soap_check_xml_ref()
377 if (zend_hash_index_find(SOAP_GLOBAL(ref_map), (ulong)node, (void**)&data_ptr) == SUCCESS) { in soap_check_xml_ref()
386 zend_hash_index_update(SOAP_GLOBAL(ref_map), (ulong)node, (void**)data, sizeof(zval*), NULL); in soap_check_xml_ref()
394 xmlNodePtr node = NULL; in master_to_xml_int() local
443 node = master_to_xml(enc, NULL, style, parent TSRMLS_CC); in master_to_xml_int()
445 node = master_to_xml(enc, *zdata, style, parent TSRMLS_CC); in master_to_xml_int()
453 set_ns_and_type_ex(node, Z_STRVAL_PP(zns), Z_STRVAL_PP(zstype)); in master_to_xml_int()
455 set_ns_and_type_ex(node, NULL, Z_STRVAL_PP(zstype)); in master_to_xml_int()
462 xmlNodeSetName(node, BAD_CAST(Z_STRVAL_PP(zname))); in master_to_xml_int()
466 xmlNsPtr nsp = encode_add_ns(node, Z_STRVAL_PP(znamens)); in master_to_xml_int()
467 xmlSetNs(node, nsp); in master_to_xml_int()
526 node = encode->to_xml(&encode->details, data, style, parent TSRMLS_CC); in master_to_xml_int()
528 set_ns_and_type(node, &encode->details); in master_to_xml_int()
532 return node; in master_to_xml_int()
656 zval *to_zval_user(encodeTypePtr type, xmlNodePtr node TSRMLS_DC) in to_zval_user()
665 copy = xmlCopyNode(node, 1); in to_zval_user()
1293 static void model_to_zval_any(zval *ret, xmlNodePtr node TSRMLS_DC) in model_to_zval_any()
1298 while (node != NULL) { in model_to_zval_any()
1299 if (get_zval_property(ret, (char*)node->name TSRMLS_CC) == NULL) { in model_to_zval_any()
1300 zval* val = master_to_zval(get_conversion(XSD_ANYXML), node TSRMLS_CC); in model_to_zval_any()
1318 while (node->next != NULL) { in model_to_zval_any()
1319 zval* val2 = master_to_zval(get_conversion(XSD_ANYXML), node->next TSRMLS_CC); in model_to_zval_any()
1325 node = node->next; in model_to_zval_any()
1328 name = (char*)node->name; in model_to_zval_any()
1368 node = node->next; in model_to_zval_any()
1380 xmlNodePtr node = get_node(data->children, model->u.element->name); in model_to_zval_object() local
1382 if (node) { in model_to_zval_object()
1386 r_node = check_and_resolve_href(node); in model_to_zval_object()
1405 if ((node = get_node(node->next, model->u.element->name)) != NULL) { in model_to_zval_object()
1412 if (node && node->children && node->children->content) { in model_to_zval_object()
1413 …if (model->u.element->fixed && strcmp(model->u.element->fixed, (char*)node->children->content) != … in model_to_zval_object()
1414 …e '%s' is not allowed)", model->u.element->name, model->u.element->fixed, node->children->content); in model_to_zval_object()
1416 val = master_to_zval(model->u.element->encode, node TSRMLS_CC); in model_to_zval_object()
1428 val = master_to_zval(model->u.element->encode, node TSRMLS_CC); in model_to_zval_object()
1431 } while ((node = get_node(node->next, model->u.element->name)) != NULL); in model_to_zval_object()
1696 static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval *object, int style, … in model_to_xml_object() argument
1724 xmlAddChild(node, property); in model_to_xml_object()
1727 property = master_to_xml(enc, *val, style, node TSRMLS_CC); in model_to_xml_object()
1745 xmlAddChild(node, property); in model_to_xml_object()
1750 property = master_to_xml(enc, data, style, node TSRMLS_CC); in model_to_xml_object()
1767 xmlAddChild(node, property); in model_to_xml_object()
1802 property = master_to_xml(enc, *val, style, node TSRMLS_CC); in model_to_xml_object()
1806 property = master_to_xml(enc, data, style, node TSRMLS_CC); in model_to_xml_object()
1826 …if (!model_to_xml_object(node, *tmp, object, style, strict && ((*tmp)->min_occurs > 0) TSRMLS_CC))… in model_to_xml_object()
1843 int tmp_ret = model_to_xml_object(node, *tmp, object, style, 0 TSRMLS_CC); in model_to_xml_object()
1854 …return model_to_xml_object(node, model->u.group->model, object, style, strict && model->min_occurs… in model_to_xml_object()
3460 static void set_ns_and_type(xmlNodePtr node, encodeTypePtr type) in set_ns_and_type() argument
3462 set_ns_and_type_ex(node, type->ns, type->type_str); in set_ns_and_type()
3465 static void set_ns_and_type_ex(xmlNodePtr node, char *ns, char *type) in set_ns_and_type_ex() argument
3468 get_type_str(node, ns, type, &nstype); in set_ns_and_type_ex()
3469 set_xsi_type(node, nstype.c); in set_ns_and_type_ex()
3473 static xmlNsPtr xmlSearchNsPrefixByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href) in xmlSearchNsPrefixByHref() argument
3476 xmlNodePtr orig = node; in xmlSearchNsPrefixByHref()
3478 while (node) { in xmlSearchNsPrefixByHref()
3479 if (node->type == XML_ENTITY_REF_NODE || in xmlSearchNsPrefixByHref()
3480 node->type == XML_ENTITY_NODE || in xmlSearchNsPrefixByHref()
3481 node->type == XML_ENTITY_DECL) { in xmlSearchNsPrefixByHref()
3484 if (node->type == XML_ELEMENT_NODE) { in xmlSearchNsPrefixByHref()
3485 cur = node->nsDef; in xmlSearchNsPrefixByHref()
3488 if (xmlSearchNs(doc, node, cur->prefix) == cur) { in xmlSearchNsPrefixByHref()
3494 if (orig != node) { in xmlSearchNsPrefixByHref()
3495 cur = node->ns; in xmlSearchNsPrefixByHref()
3498 if (xmlSearchNs(doc, node, cur->prefix) == cur) { in xmlSearchNsPrefixByHref()
3505 node = node->parent; in xmlSearchNsPrefixByHref()
3510 xmlNsPtr encode_add_ns(xmlNodePtr node, const char* ns) in encode_add_ns() argument
3518 xmlns = xmlSearchNsByHref(node->doc, node, BAD_CAST(ns)); in encode_add_ns()
3520 xmlns = xmlSearchNsPrefixByHref(node->doc, node, BAD_CAST(ns)); in encode_add_ns()
3527 xmlns = xmlNewNs(node->doc->children, BAD_CAST(ns), prefix); in encode_add_ns()
3536 if (xmlSearchNs(node->doc, node, BAD_CAST(prefix.c)) == NULL) { in encode_add_ns()
3545 xmlns = xmlNewNs(node->doc->children, BAD_CAST(ns), BAD_CAST(prefix.c)); in encode_add_ns()
3552 static void set_ns_prop(xmlNodePtr node, char *ns, char *name, char *val) in set_ns_prop() argument
3554 xmlSetNsProp(node, encode_add_ns(node, ns), BAD_CAST(name), BAD_CAST(val)); in set_ns_prop()
3557 static void set_xsi_nil(xmlNodePtr node) in set_xsi_nil() argument
3559 set_ns_prop(node, XSI_NAMESPACE, "nil", "true"); in set_xsi_nil()
3562 static void set_xsi_type(xmlNodePtr node, char *type) in set_xsi_type() argument
3564 set_ns_prop(node, XSI_NAMESPACE, "type", type); in set_xsi_type()
3623 static encodePtr get_array_type(xmlNodePtr node, zval *array, smart_str *type TSRMLS_DC) in get_array_type() argument
3705 xmlNsPtr ns = encode_add_ns(node, cur_ns); in get_array_type()
3722 get_type_str(node, enc->details.ns, enc->details.type_str, type); in get_array_type()
3728 static void get_type_str(xmlNodePtr node, const char* ns, const char* type, smart_str* ret) in get_type_str() argument
3741 xmlns = encode_add_ns(node, ns); in get_type_str()