[basex-talk] fn:trace and http-server, why is it not logged?

2014-08-10 Thread Marc van Grootel
Hi, I used fn:trace in code and I made sure it is not optimized away. Saw the trace msg in the gui. But when doing it via the http server only the standard request info is shown in the log 18:05:47.810 0:0:0:0:0:0:0:1:50364 admin REQUEST [GET] http://localhost:8984/ 18:05:49.234 0:0:0:0:0:0:0

Re: [basex-talk] fn:trace and http-server, why is it not logged?

2014-08-10 Thread Dirk Kirsten
Hello Marc, The BaseX log only logs this HTTP requests and other internal stuff, as you correctly observed. As said in the documentation, the trace is sent to stderr, i.e. you can redirect the standard error using normal unix tools. Starting basexhttp like that basexhttp 2> error.log will log

Re: [basex-talk] fn:trace and http-server, why is it not logged?

2014-08-10 Thread Marc van Grootel
Hi Dirk, Got it. Silly me, wasn't paying enough attention to the console running basexhttp while fiddling around. Thought it wouldn't be logged but it is. Duh. --Marc On Sun, Aug 10, 2014 at 6:19 PM, Dirk Kirsten wrote: > Hello Marc, > > The BaseX log only logs this HTTP requests and other in

[basex-talk] Best way to do dynamic XPath evaluation

2014-08-10 Thread Paul Swennenhuis
Suppose I have a variable $xml containing the XML fragment WismarAmsterdamPositano village, ItalyPrague In a static world I would list all cities with the XPath expression $xml//city . And the villages with $xml//village . OK. No issues. Runs fast. Now suppose I want the user to decide whethe

Re: [basex-talk] Best way to do dynamic XPath evaluation

2014-08-10 Thread Dirk Kirsten
Hi Paul, xquery:eval() should be capable of doing what you want. Take a look at the first example at https://docs.basex.org/wiki/XQuery_Module Using the empty string for the binding binds the element as context item (thus it must be a document). So the following should work for you: xquery:eva

Re: [basex-talk] Best way to do dynamic XPath evaluation

2014-08-10 Thread Paul Swennenhuis
Hi Dirk, Cool! Exactly what I was looking for, and it executes fast as well. This is a life-saver for me. Could you elaborate a bit on the "Using the empty string for the binding binds the element as context item (thus it must be a document)." remark? I'm not sure if I follow that... And what

Re: [basex-talk] Best way to do dynamic XPath evaluation

2014-08-10 Thread Dirk Kirsten
Hi Paul, it should be all there in the documentation I linked to. I really don't know more than the documentation already says :) So to quote: "Variables and context items can be declared via $bindings. The specified keys must be QNames or strings: - If a key is a QName, it will be directly ado