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?
Thanks!
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
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
It seems as if Saxon handles the empty sequence as a special case. The following query..
trace( (1,2), "Trace: ")
..will create similar output in BaseX, Saxon, Zorba and other processors while Saxon is the only one (I tried) to return output for an empty sequence, such as...
trace( (), "Trace: ")
The specification does not enforce a certain behavior on how to handle sequences [1], which is why different solution have been chosen.
Hope this helps, Christian
[1] http://www.w3.org/TR/xpath-functions-30/#func-trace _______________________________
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
Thanks a bunch Christian, that did the trick!
BTW is there a way to search the archives? I could not find a way on the website.
-----Original Message----- From: Christian Grün [mailto:christian.gruen@gmail.com] Sent: Friday, June 08, 2012 1:25 PM To: Brock, David Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] fn:trace() does not print
It seems as if Saxon handles the empty sequence as a special case. The following query..
trace( (1,2), "Trace: ")
..will create similar output in BaseX, Saxon, Zorba and other processors while Saxon is the only one (I tried) to return output for an empty sequence, such as...
trace( (), "Trace: ")
The specification does not enforce a certain behavior on how to handle sequences [1], which is why different solution have been chosen.
Hope this helps, Christian
[1] http://www.w3.org/TR/xpath-functions-30/#func-trace _______________________________
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
BTW is there a way to search the archives? I could not find a way on the website.
Here you are: http://basex.org/service/mailinglist-search/ http://www.mail-archive.com/basex-talk@mailman.uni-konstanz.de/msg00924.html
On Sat, Jun 9, 2012 at 12:04 AM, Brock, David david_brock@mentor.com wrote:
Thanks a bunch Christian, that did the trick!
-----Original Message----- From: Christian Grün [mailto:christian.gruen@gmail.com] Sent: Friday, June 08, 2012 1:25 PM To: Brock, David Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] fn:trace() does not print
It seems as if Saxon handles the empty sequence as a special case. The following query..
trace( (1,2), "Trace: ")
..will create similar output in BaseX, Saxon, Zorba and other processors while Saxon is the only one (I tried) to return output for an empty sequence, such as...
trace( (), "Trace: ")
The specification does not enforce a certain behavior on how to handle sequences [1], which is why different solution have been chosen.
Hope this helps, Christian
[1] http://www.w3.org/TR/xpath-functions-30/#func-trace _______________________________
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
basex-talk@mailman.uni-konstanz.de