Re: [basex-talk] Func def & performance: element()* vs item()*

2019-04-11 Thread Christian Grün
> You may be interested in my > https://github.com/rhdunn/xquery-intellij-plugin/blob/master/docs/XQuery%20IntelliJ%20Plugin%20Data%20Model.md > document. It is the result of previous investigations in supporting static > type analysis in my XQuery plugin. Thanks, I’ll definitely have a look

Re: [basex-talk] Nooby/#CitizenScientist REQUEST for HELP: Python implementation of this XQuery

2019-04-11 Thread Jim Salmons
Hey Liam and BaseX Community, With Liam's helpful pointers I was able to create a modification of the QueryBindExample.py sample script and use the String Template class to do the Python version of my machine learning dataset update XQuery expression for adding new training image specs to the

Re: [basex-talk] Func def & performance: element()* vs item()*

2019-04-11 Thread Reece Dunn
Hi Christian, On Thu, 11 Apr 2019 at 13:37, Christian Grün wrote: > Hi Chuck, > > Martin already suggested that map construction via map:merge is > preferable and faster (my personal experience is that there are just > few cases in which map:put is a better choice). > > Your query was an

Re: [basex-talk] Func def & performance: element()* vs item()*

2019-04-11 Thread Christian Grün
Hi Chuck, Martin already suggested that map construction via map:merge is preferable and faster (my personal experience is that there are just few cases in which map:put is a better choice). Your query was an interesting one, though. In various cases, we drop type information at runtime, as it

Re: [basex-talk] Add & replace documents

2019-04-11 Thread Johannes Bauer
ok, I will run some tests and see if it works and get back to you. Thanks Johannes Am 11.04.2019 um 10:00 schrieb Christian Grün: Will the iterative approach have a comparable performance? Or are there some optimizations for directory structures in db:replace(). This always depends on various

Re: [basex-talk] Add & replace documents

2019-04-11 Thread Christian Grün
> Will the iterative approach have a comparable performance? Or are there > some optimizations for directory structures in db:replace(). This always depends on various factors (on the input sizes, the directory structure, possibly even the file system). If it turns out that it would be much

Re: [basex-talk] Add & replace documents

2019-04-11 Thread Johannes Bauer
Hello Christian, thank you for the fast reply. With your example I will actually make a db:replace() call for each file. I've choosen the approach with just passing the directory to db:replace() for performance reasons. My experience is that this call is extremely fast even for a large

Re: [basex-talk] Add & replace documents

2019-04-11 Thread Christian Grün
Hi Johannes, We allow file paths for db:add and db:replace as a basic convenience feature. To have full control over your imports, it is often better to work with the functions provided by the File Module. Herre is a simple example that might already cover your requirements (provided that the

[basex-talk] Add & replace documents

2019-04-11 Thread Johannes Bauer
Hi, this may seem like a dumb question, but how can I add & replace a number of documents in a database? I have a directory with some files that I want to import. Some of the documents may already exist in the database. If I use the db:replace('db', '', '/path/to/my/files') function it

Re: [basex-talk] Func def & performance: element()* vs item()*

2019-04-11 Thread Martin Honnen
Am 11.04.2019 um 00:09 schrieb Chuck Bearden: BaseX is a great tool for analyzing & characterizing large amounts of XML data. I have used it both at work and on personal projects. I hope the following observation is useful. When I define a function that recurs over a sequence of elements in