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] Command line options not working with update operation on input file

2018-12-12 Thread Christian Grün
…I think I got what you were trying to achieve! There is a separate option for exporting databases and writing updates. This may be more obvious now after another updates of our documentation [1]. Here is a little self-contained BaseX call that (as I hope) demonstrates the behavior: basex -u

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

2018-12-12 Thread Christian Grün
> Any serialization parameter gets ignored from the command line with XQuery > Update. > > Has this been solved? Is this a bug? XML declarations are never stored in the database. Instead, they will be added during serialization. So I’m not exactly on what you just tried to do. Could you please

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

2018-12-12 Thread Zimmel, Daniel
I already tried setting serialization params in .basex, per command line switch and as declare variable. Any serialization parameter gets ignored from the command line with XQuery Update. I found an ancient report about this behaviour in the archives, but no solution:

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

2018-12-12 Thread Christian Grün
Hi Daniel, > Unfortunately, I still have not found a way to force BaseX NOT to delete my > xml declaration with any update operation on a given input file. The XML declaration is a part of the serialization process. You can enable it by adding… SERIALIZER=omit-xml-declaration=no,indent=no …to

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

2018-12-10 Thread Zimmel, Daniel
Thank you Christian, changing the argument order does help indeed with the whitespace! The documentation is slightly vague about this. Unfortunately, I still have not found a way to force BaseX NOT to delete my xml declaration with any update operation on a given input file. For example if I

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

2018-12-07 Thread Christian Grün
Hi Daniel. The argument order is important in BaseX; you could try the following variant: basex.bat -u -w -ifile.xml -sindent=no update.xquery If this doesn’t help, you could append the CHOP=true in your .basex configuration file. Hope this helps Christian On Fri, Dec 7, 2018 at 3:40 PM

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

2018-12-07 Thread Zimmel, Daniel
Hello, can anyone give me a hint on the behaviour of the command line options in BaseX 9.0.2? When I try an update operation on a file given with "-i", neither the option "-w" nor any serialisation option gets evaluated; while the update operation with "-u" is working correctly, my whitespace