[basex-talk] ODP: http:send-request - problem with form data

2018-07-12 Thread Bogdan Bogucki
Hi Christian, Great! I have one doubt why when we don't define body in http request third parameter is ignored ? Only when body element is provided parseBody with bodies is invoked. I have to check source code to figure out how to pass body payload via third argument. if(body != null) {

Re: [basex-talk] http:send-request - problem with form data

2018-07-12 Thread Christian Grün
Hi Bogdan, > I have one doubt why when we don't define body in http request third > parameter is ignored ? It was defined like this in the EXPath spec [1]: “When a body element has an empty content (i.e. it has no child node at all) its content is given by the parameter $bodies. In a single

Re: [basex-talk] Number of Databases in BaseX

2018-07-12 Thread Christian Grün
Hi Martin (cc to the mailing list), The max. number of allowed databases depends on the directory limit of your operating system. In practice, it’s advisable to find a good ratio between size and number of databases, because your file system may require too much time to open a particular database

Re: [basex-talk] http:send-request - problem with form data

2018-07-12 Thread Joe Wicentowski
The Zorba HTTP spec is very interesting. I think the original EXPath HTTP spec (and others) may have taken a more map-and-array form had those data structures been available in XQuery at the time. It would be interesting to reconsider some of these specs in a future major revision to them. On

[basex-talk] maps

2018-07-12 Thread Giuseppe Celano
Hi Is it possible to preserve the order of the keys in a map when the map is returned?: map{"b": 2, "c": 2, "a": 3} return map { "a": 3, "b": 2, "c": 2 } Thanks! Giuseppe

Re: [basex-talk] maps

2018-07-12 Thread Christian Grün
Hi Giuseppe, XQuery maps are unordered by definition in the specification. If you want to preserve order, you may need to use XML structures, sequences, arrays or additional data structures. Ciao Christian Giuseppe Celano schrieb am Fr., 13. Juli 2018 00:57: > Hi > > Is it possible to

Re: [basex-talk] http:send-request - problem with form data

2018-07-12 Thread Christian Grün
Hi Joe, Thanks for your assessment. I completely agree: If we manage to create a new revision of the existing EXPath spec, the extensions might be available in other XQuery implementations as well. It could even be backward-compatible: We could keep http:send-request, and a new http:send

Re: [basex-talk] http:send-request - problem with form data

2018-07-12 Thread Christian Grün
Hi Bogdan, I finally had some time to get to the bottom of the conversion inconsistencies: If the value is supplied as child of the http:body node, it will be serialized as text node. If it’s supplied as extra parameter, it will be serialized as string. If text nodes are serialized, entities

Re: [basex-talk] Curious query optimization

2018-07-12 Thread Christian Grün
Hi Sebastian, This has been fixed. The background: In one of the optimizations of the "if" expression, identical branches are merged: if(..expensive query..) then 1 else 1 → Optimized Query: 1 The full-text options were ignored in the equality check. A new snapshot is online. Best,