add_node_copy(action_xml, safe_val3(NULL, action, rsc, xml));
if(!as_input) { add_node_copy( action_xml, safe_val3(NULL, action, rsc, xml)); }
action2xml(action_t *action){	xmlNodePtr action_xml = NULL;		if(action == NULL) {		return NULL;	}		switch(action->task) {		case shutdown_crm:			action_xml = create_xml_node(NULL, "crm_event");			set_xml_property_copy(				action_xml, XML_ATTR_ID, crm_itoa(action->id));			break;		default:			action_xml = create_xml_node(NULL, "rsc_op");			add_node_copy(action_xml,				      safe_val3(NULL, action, rsc, xml));			set_xml_property_copy(				action_xml, XML_ATTR_ID, crm_itoa(action->id));			set_xml_property_copy(				action_xml, XML_LRM_ATTR_RSCID,				safe_val3("__no_rsc__", action, rsc, id));						break;	}	set_xml_property_copy(		action_xml, XML_LRM_ATTR_TARGET,		safe_val4("__no_node__", action, node, details, uname));	set_xml_property_copy(		action_xml, XML_LRM_ATTR_TARGET_UUID,		safe_val4("__no_node_uuid__", action, node, details, id));	set_xml_property_copy(		action_xml, XML_LRM_ATTR_TASK, task2text(action->task));	set_xml_property_copy(		action_xml, XML_LRM_ATTR_RUNNABLE,		action->runnable?XML_BOOLEAN_TRUE:XML_BOOLEAN_FALSE);	set_xml_property_copy(		action_xml, XML_LRM_ATTR_OPTIONAL,		action->optional?XML_BOOLEAN_TRUE:XML_BOOLEAN_FALSE);	set_xml_property_copy(		action_xml, XML_LRM_ATTR_DISCARD,		action->discard?XML_BOOLEAN_TRUE:XML_BOOLEAN_FALSE);	set_xml_property_copy(		action_xml, "allow_fail",		action->failure_is_fatal?XML_BOOLEAN_FALSE:XML_BOOLEAN_TRUE);	add_node_copy(action_xml, action->args);/* 	slist_iter( *//* 		wrapper, action_wrapper_t, action->actions_before, lpc, *//* 		xmlNodePtr prereq = create_xml_node(action_xml, "trigger"); *//* 		set_xml_property_copy(prereq, "action_id", wrapper->action->id); *//* 		); */		return action_xml;}