Re: [basex-talk] $node//text()[1], why doesn't it return the 1st text node?

2016-03-02 Thread Christian Grün
And a little addition: $node//text()[1] …is an abbreviation for… $node/descendant-or-self::node()/child::text()[1] However, you are probably looking for: $node/descendant::text()[1] It’s completely fine to use parentheseses, as in this case, your query will exactly be rewritten as shown

Re: [basex-talk] $node//text()[1], why doesn't it return the 1st text node?

2016-03-02 Thread Jens Erat
This is a matter of precedence. > { $node//text()[1] } Has the meaning of "return all text nodes, that are in first position of their encapsulating element". Consider the intermediate result after partial evaluation to be something like ("allo!"[1], "Il pleut des clous."[1]) Applying pa

[basex-talk] $node//text()[1], why doesn't it return the 1st text node?

2016-03-02 Thread France Baril
Hi, I was having issues manipulating text nodes. I found a way around my issue, but I'm still thinking that my 1st syntax to get the first text node of a sequence should have worked. My question is given all the example below, is #2 returning the expected value? I was expecting it would work like

Re: [basex-talk] Export database to SQL?

2016-03-02 Thread Christian Grün
Hi Raj, I think that Liam already gave you all necessary hints. Did you try our SQL or CSV Module? Christian On Wed, Mar 2, 2016 at 5:51 PM, Bhander, Gurbakhash S. wrote: > Hi Christian, > > I am using C# and trying to connect BaseX database to my grid (tables on the > interface). > Q1: Is th

Re: [basex-talk] Export database to SQL?

2016-03-02 Thread Bhander, Gurbakhash S.
Hi Christian, I am using C# and trying to connect BaseX database to my grid (tables on the interface). Q1: Is there any way I can connect basex database to my grid directly? If not, how can I export to SQL database from the basex because I will have to connect with my grid? My database is very

Re: [basex-talk] Parallel execution

2016-03-02 Thread Dirk Kirsten
sorry, last email was sent to early, my thunderbird is out of control... So,using an annotation one could write %async map:for-each(map { 1: 2, 3: 4 }, function($a, $b) { $a + $b }) Seeing Christians mail in the meantime I guess my idea of an annotation is basically the same idea as the pragma.

Re: [basex-talk] Export database to SQL?

2016-03-02 Thread Liam R. E. Quin
On Wed, 2016-03-02 at 16:24 +, Bhander, Gurbakhash S. wrote: > Hi, > > Is there any way to export data from the database to other databases? There are several ways. But note that there's not a 1:1 mapping between relational data and XML, so you first have to choose how you will represent your

Re: [basex-talk] Parallel execution

2016-03-02 Thread Christian Grün
Hi Klāvs, Your feedback is welcome! > ```xquery > for async $i in 1 to 10 > return fetch:text("http://example.com/magic-story/for-number/"; || $i) > ``` > > Problem here is that you need to introduce a new keyword to the language. I > am just trying to figure out if there could be a solution like

Re: [basex-talk] Parallel execution

2016-03-02 Thread Dirk Kirsten
Hello Klāvs, just to clarify, I wasn't offended of your usage of the work "broken", I just wanted to point out that it is an incorrect characterization of the problem. We welcome criticism and ideas how to enhance XQuery/BaseX. After all, the whole async stuff also just happened because of user co

Re: [basex-talk] Export database to SQL?

2016-03-02 Thread Christian Grün
Hi Raj, > Is there any way to export data from the database to other databases? Sure! But please be more specific. Christian

[basex-talk] Export database to SQL?

2016-03-02 Thread Bhander, Gurbakhash S.
Hi, Is there any way to export data from the database to other databases? Thanks -Raj From: basex-talk-boun...@mailman.uni-konstanz.de [mailto:basex-talk-boun...@mailman.uni-konstanz.de] On Behalf Of Klavs Prieditis Sent: Wednesday, March 02, 2016 11:21 AM To: Christian Grün ; Dirk Kirsten

Re: [basex-talk] Parallel execution

2016-03-02 Thread Klāvs Priedītis
Hi, Thanks Dirk and Christian! My apologies for using such a strong word to describe such a minor issue. It is not my intention to underestimate your work. My main concern is that `async:fork-join()` is too heavy. I mean, in essence, I am solving the same problem in these two examples. ```xquery

Re: [basex-talk] BaseX in a Multi-User VM

2016-03-02 Thread Christian Grün
Dear Cec, I still know too little about your network configuration. I guess you have some Windows directories that are shared, and some others that are private, and you would like to have one BaseX installation, but all BaseX data (configuration files, repositories, database) stored in a private d

Re: [basex-talk] Parallel execution

2016-03-02 Thread Christian Grün
Hi Klāvs, Dirk already gave some good reasons why implicit parallelization is not the default in BaseX, although it may seems to be the most natural and desirable choice. Indeed it’s fairly easy to create FLWOR expressions which are slower when executed in parallel. The XQuery specification, by th

Re: [basex-talk] Parallel execution

2016-03-02 Thread Dirk Kirsten
Labrīt Klāvs, well, I would the word "broken" is a strong word for something, which still works correctly and returns the correct result. It might not be perform optimal, but broken is something different. Also, given that the feature is still not even one day old, you might have to be a bit more