Re: [basex-talk] eq vs =

2018-12-13 Thread Leo Studer
Thank you Christian and Wray The implicit cast is the problem (as usual). I was expecting it to happen equally :( And I teach my students to use value comparisons when ever possible and to care about the cast yourself ;-) Yours Leo > On 13 Dec 2018, at 10:46, Christian Grün wrote: > > Hi

Re: [basex-talk] Command line options not working with update operation on input file

2018-12-13 Thread Christian Grün
True, the documentation of the command-line flags hasn’t been updated for quite a while now. I’ve just caught up on that. BaseX 9.1.1 is scheduled for tomorrow, it will include the updated help texts. On Thu, Dec 13, 2018 at 2:32 PM Zimmel, Daniel wrote: > > Looks like I was not getting the

Re: [basex-talk] Command line options not working with update operation on input file

2018-12-13 Thread Zimmel, Daniel
Looks like I was not getting the toggle part correctly. Yes it is very confusing since it says: "-w Preserve whitespaces from input files" Thanks! I will toggle this now in my internal documentation :-) > -Ursprüngliche Nachricht- > Von: Christian Grün

Re: [basex-talk] Command line options not working with update operation on input file

2018-12-13 Thread Christian Grün
> With the same query, when CHOP=false in the .basex file and -w switch on the > command line, whitespace gets chopped (not expected!) The option is toggled (see one of my previous replies). We should revise the help text on the command-line in a future version.

Re: [basex-talk] Command line options not working with update operation on input file

2018-12-13 Thread Zimmel, Daniel
Thanks for the hint. Yes, in my .basex there is a CHOP=false; when I delete it, it works as expected. But as I pointed out, this looks like a bug to me: With the same query, when CHOP=false in the .basex file and -w switch on the command line, whitespace gets chopped (not expected!) Input

Re: [basex-talk] Command line options not working with update operation on input file

2018-12-13 Thread Christian Grün
This is what I get: REPLACED eins Do you possibly have some settings in your .basex configuration file that I should consider? Or do you have a 'test' database with chopped whitespaces that is opened instead of your test.xml document? On Thu, Dec 13, 2018 at 1:43 PM Zimmel,

Re: [basex-talk] Command line options not working with update operation on input file

2018-12-13 Thread Zimmel, Daniel
I was referring to XQuery update writeback, chop option is set to false: $ basex.bat -u -w -c"set exporter omit-xml-declaration=no,indent=no" -itest.xml update.xquery update.xquery: for $c in doc(document-uri())//kennung return (replace value of node $c with "REPLACED") test.xml: test

Re: [basex-talk] Command line options not working with update operation on input file

2018-12-13 Thread Zimmel, Daniel
Ah, now this makes it much more clear in the documentation, I just checked the wiki page history. The only thing is I prefer the Saxon default about not changing anything on already existing indentation (BaseX is deleting any indentation with indent=no), but I am aware this is

Re: [basex-talk] eq vs =

2018-12-13 Thread Christian Grün
Hi Leo, The semantics of value comparisons (eq, ne, …) and general comparisons (=, !=, …) are different. As E. Wray indicated, sequences with more than one item can be compared with general comparisons; the result will always be a boolean (value comparisons will return an empty sequence if at

Re: [basex-talk] eq vs =

2018-12-13 Thread E. Wray Johnson
The value comparison operators (eq, lt, etc.) are designed for comparing single values (i.e. sequences of one value each). The general comparison operators (=, <, etc.) are designed for comparing sequences of more than one value. E. Wray Johnson > On Dec 13, 2018, at 4:16 AM, Leo Studer

[basex-talk] eq vs =

2018-12-13 Thread Leo Studer
Hello Could someone explain me why this woks //country[@population = max(//@population)]/name Whereas this does not //country[@population eq max(//@population)]/name Thanks in advance Leo