Using variables in for-each element
Hello,
If I declare a variable like <?xdoxslt:set_variable($_XDOCTX, ‘KPI’, CÓDIGO_ELEMENTO)?> where CÓDIGO_ELEMENTO is the ID assigned to each KPI.
This variable KPI is supposed to be updated inside a for each after each loop ends, with the new CÓDIGO_ELEMENTO value.
Is it possible to use this variable as a filter like:
<?for-each-group:../G_1[CÓDIGO_ELEMENTO=’$KPI’];./CÓDIGO_ELEMENTO?>
It keeps telling me Variable not defined.
It only works if I declare it like <?variable:KPI;CÓDIGO_ELEMENTO?> but it seems this way the variabled oes not get updated each time.