crm_data_t * xml_self = create_xml_node(NULL, XML_CIB_TAG_RESOURCE);
crm_data_t *xml_self = copy_xml(rsc->xml);
void clone_unpack(resource_t *rsc, pe_working_set_t *data_set){	int lpc = 0;	crm_data_t * xml_tmp = NULL;	crm_data_t * xml_obj = rsc->xml;	crm_data_t * xml_self = create_xml_node(NULL, XML_CIB_TAG_RESOURCE);	clone_variant_data_t *clone_data = NULL;	resource_t *self = NULL;	const char *ordered =		crm_element_value(xml_obj, XML_RSC_ATTR_ORDERED);	const char *interleave =		crm_element_value(xml_obj, XML_RSC_ATTR_INTERLEAVE);	const char *max_clones =		get_rsc_param(rsc, XML_RSC_ATTR_INCARNATION_MAX);	const char *max_clones_node =		get_rsc_param(rsc, XML_RSC_ATTR_INCARNATION_NODEMAX);	crm_debug_3("Processing resource %s...", rsc->id);	crm_malloc0(clone_data, sizeof(clone_variant_data_t));	clone_data->child_list  = NULL;	clone_data->interleave  = FALSE;	clone_data->ordered     = FALSE;		clone_data->active_clones  = 0;	clone_data->xml_obj_child  = NULL;	clone_data->clone_max      = crm_atoi(max_clones,     "1");	clone_data->clone_node_max = crm_atoi(max_clones_node,"1");		/* this is a bit of a hack - but simplifies everything else */	copy_in_properties(xml_self, xml_obj);/* 	set_id(xml_self, "self", -1); */	xml_tmp = find_xml_node(xml_obj, "operations", FALSE);	if(xml_tmp != NULL) {		add_node_copy(xml_self, xml_tmp);	}	clone_data->xml_obj_child = find_xml_node(		xml_obj, XML_CIB_TAG_GROUP, FALSE);	if(clone_data->xml_obj_child == NULL) {		clone_data->xml_obj_child = find_xml_node(			xml_obj, XML_CIB_TAG_RESOURCE, TRUE);	}	CRM_DEV_ASSERT(clone_data->xml_obj_child != NULL);	if(crm_assert_failed) { return; }	if(common_unpack(xml_self, &self, NULL, data_set)) {		clone_data->self = self;	} else {		crm_log_xml_err(xml_self, "Couldnt unpack dummy child");		return;	}		if(crm_is_true(interleave)) {		clone_data->interleave = TRUE;	}	if(crm_is_true(ordered)) {		clone_data->ordered = TRUE;	}	clone_data->notify_confirm = clone_data->self->notify;	rsc->variant_opaque = clone_data;/* 	clone_data->gloabally_unique && */	for(lpc = 0; lpc < clone_data->clone_max; lpc++) {		create_child_clone(rsc, lpc, data_set);	}		crm_debug_3("Added %d children to resource %s...",		    clone_data->clone_max, rsc->id);}