I am creating an XMLtemplate that loops through all the id\\value pairs in a list and creates an XMLelement for each.
I got the looping working after reading through some of @takashi's post replys, but the $i variable is not getting passed correctly into the fme:get-attribute function on the list number. Am I going about this wrong? Is there a different way that I need to call the variable inside the function?
<update_transaction object="ObjectNameHere">
{for $i in (1 to xs:integer({fme:get-attribute("_Result_count")}))
return (
<attribute_value name="{fme:get-attribute("Inspection.Results.Result{$i}.id")}">{fme:get-attribute("Inspection.Results.Result{$i}.Value")}</attribute_value>
)
}
</update_transaction>