In his document "Optimizing XQueries with eXist", Jean-Marc Vanel wrote :
"Don't use eval()"
"eval() can always be replaced by a standard expression".
So, I rewrited my queries to eliminate all eval() functions. I succeeded
except in one case :
I have an 'order by' clause with two parameters (the field to sort and
"ascending/descending") both retrieved from an html form. With only one
parameter, it's easy to write the 'order by' clause as a function's result.
But with two, the only way I found to make it work is to concat() the two
'order by' clause parameters and then eval() the concatened string.
Has somebody a solution that doesn't use eval() ?