My query is of the form:
if (not(empty($variable))) then ... return some XML... else fn:trace((), "Warning : Variable is empty")
After your reply I tried the following to see if I remove the optimization, but not luck - still no output on stderr:
if (not(empty($variable))) then ... return some XML... else $result := fn:trace((), "Warning : Variable is empty") return $result
-----Original Message----- From: Christian Grün [mailto:christian.gruen@gmail.com] Sent: Friday, June 08, 2012 12:20 PM To: Brock, David Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] fn:trace() does not print
Was using fn:trace() to print out warning statements during XQuery processing. Worked fine using SAXONICA XQuery, but does not print anything in BaseX. Is there a setting to get this to work, or is there some other call that I can make to do same?
We are frequently using fn:trace(); the output is either sent to stderr or the InfoView of the GUI. It may be, however, that some of the traced data will be optimized in advance, and never be evaluated at runtime. How do your queries look like?
Christian