const char *id      = xmlGetProp(attr_exp, "id");
const char *id      = xmlGetProp(attr_exp, XML_ATTR_ID);
unpack_rsc_to_attr(xmlNodePtr xml_obj,		   GSListPtr rsc_list,		   GSListPtr node_list,		   GSListPtr *node_constraints){/*       <rsc_to_attr id="cons4" from="rsc2" weight="20.0" modifier="inc">       <attr_expression id="attr_exp_1"/>          <node_match id="node_match_1" type="has_attr" target="cpu"/>          <node_match id="node_match_2" type="attr_value" target="kernel" value="2.6"/>       </attr_expression>       <attr_expression id="attr_exp_2"/>          <node_match id="node_match_3" type="has_attr" target="hdd"/>          <node_match id="node_match_4" type="attr_value" target="kernel" value="2.4"/>       </attr_expression>   Translation:       give any node a +ve weight of 20.0 to run rsc2 if:          attr "cpu" is set _and_ "kernel"="2.6", _or_	  attr "hdd" is set _and_ "kernel"="2.4"   Further translation:       2 constraints that give any node a +ve weight of 20.0 to run rsc2       cons1: attr "cpu" is set and "kernel"="2.6"       cons2: attr "hdd" is set and "kernel"="2.4"        */		xmlNodePtr attr_exp = xml_obj->children;	const char *id_lh   =  xmlGetProp(xml_obj, "from");	const char *mod     = xmlGetProp(xml_obj, "modifier");	const char *weight  = xmlGetProp(xml_obj, "weight");	const char *id      = xmlGetProp(attr_exp, "id");	float weight_f = atof(weight);	enum con_modifier a_modifier = modifier_none;		resource_t *rsc_lh = pe_find_resource(rsc_list, id_lh);	if(rsc_lh == NULL) {		cl_log(LOG_ERR, "No resource (con=%s, rsc=%s)",		       id, id_lh);		return FALSE;	}				if(safe_str_eq(mod, "set")){		a_modifier = set;	} else if(safe_str_eq(mod, "inc")){		a_modifier = inc;	} else if(safe_str_eq(mod, "dec")){		a_modifier = dec;	} else {		// error	}			if(attr_exp == NULL) {		cl_log(LOG_WARNING, "no attrs for constraint %s", id);	}		while(attr_exp != NULL) {		const char *id_rh = xmlGetProp(attr_exp, "name");		const char *id = xmlGetProp(attr_exp, "id");		rsc_to_node_t *new_con = crm_malloc(sizeof(rsc_to_node_t));		new_con->id = crm_strdup(id);		new_con->rsc_lh = rsc_lh;		new_con->weight = weight_f;		new_con->modifier = a_modifier;		new_con->node_list_rh = match_attrs(attr_exp, node_list);				if(new_con->node_list_rh == NULL) {			// error			cl_log(LOG_ERR,			       "node %s (from %s) not found",			       id_rh, attr_exp->name);		}		pdebug_action(print_rsc_to_node("Added", new_con, FALSE));		*node_constraints = g_slist_append(*node_constraints, new_con);		/* dont add it to the resource,		 *  the information is in the resouce's node list		 */		attr_exp = attr_exp->next;	}	return TRUE;}