[basex-talk] BaseX server

2014-07-02 Thread Paul Swennenhuis
Hi there, Based on the locally installed versionit seems that BaseX is a great tool and I would like to use it as a webservice. However, the servers I have access to do not support Java - or if they do, I do not have the rights to install BaseX. Do I need to find a hosting party that supports

Re: [basex-talk] BaseX server

2014-07-02 Thread Paul Swennenhuis
to be able to execute programs. Please note, this is not a problem applying to BaseX, it would be the same for every other program you would like to run. Cheers, Dirk On 02/07/14 14:40, Paul Swennenhuis wrote: Hi Dirk, Thanks for your (fast) reply. I am not sure if you understood me though. Or maybe I

Re: [basex-talk] BaseX server

2014-07-02 Thread Paul Swennenhuis
. They have a free program, were you can run your own services in the cloud, e.g. it can be BaseX. Andy Bunce made an excellent git repository to get you started: https://github.com/Quodatum/openshift-basex-quick-start Cheers, Dirk On 02/07/14 15:12, Paul Swennenhuis wrote: Hi Dirk, Now we're

[basex-talk] JSON output in PHP client

2014-07-11 Thread Paul Swennenhuis
return JSON from PHP? Paul Swennenhuis ?php /* * This example shows how queries can be executed in an iterative manner. * Documentation: http://basex.org/api * * (C) BaseX Team 2005-11, BSD License */ include(BaseXClient.php); try { // create session $session = new Session(localhost

Re: [basex-talk] JSON output in PHP client

2014-07-11 Thread Paul Swennenhuis
Hi Christian, Thanks for the quick answer. Unfortunately your proposed solution (json:serialize) does not work in this case; BaseX returns a BXJS0002 error: JSON serializer: found, _ expected. The modified query reads: json:serialize( json type=array objects='_'{ for \$user in

Re: [basex-talk] JSON output in PHP client

2014-07-11 Thread Paul Swennenhuis
Still no luck: JSON serializer: testId is typed as string and cannot be nested I think I am going to move the JSON conversion to within PHP or Javascript, and keep the XQueries clean and readable. Paul json:serialize( json type=array objects='_'{ for $user in

Re: [basex-talk] JSON output in PHP client

2014-07-11 Thread Paul Swennenhuis
Ah, yes, that did the trick. I read about the options but had forgotten about it. Thanks. I will run some performance tests to decide for json:serialize or PHP internal conversion which might be considerably slower. Paul json:serialize( json type=array objects='_'{ for $user in

[basex-talk] Same query, huge difference in performance

2014-08-04 Thread Paul Swennenhuis
Hi, I have two XQueries that do exactly the same thing, i.e. create a list of waters in the Facts database and display where these waters flow into, if any. But Query 1 executes 10 times faster than Query 2 (in the GUI). The only difference is in the selection of the query context. Query 1

[basex-talk] Question about the mailing-list

2014-08-04 Thread Paul Swennenhuis
A bit off-topic but this weekend I ran into a strange issue with this mailinglist. I tried to send a message from the same e-mail address I am using now (p...@swennenhuis.nl) but it bounced back every time I tried. I get the feeling that the subscription is not merely e-mail based but also IP

Re: [basex-talk] Same query, huge difference in performance

2014-08-04 Thread Paul Swennenhuis
slower than Query 2. Thanks for the empty($to) suggestion. As for the recursive algorithm: in the meantime I wrote the query for that and it works like a charm! Paul Hi Paul, Op 4 aug. 2014, om 09:27 heeft Paul Swennenhuis p...@swennenhuis.nl mailto:p...@swennenhuis.nl het volgende

Re: [basex-talk] Same query, huge difference in performance

2014-08-04 Thread Paul Swennenhuis
Hi Christian, Sorry, also doesn't improve performance. I even tried to copy the optimized line for the selection, as found in the Query Info pane: (: list waters and where they stream to (if any):) for $source in ((db:open-pre(facts,0)/descendant::*:sea union

Re: [basex-talk] Same query, huge difference in performance

2014-08-04 Thread Paul Swennenhuis
? Christian [1] http://files.basex.org/releases/latest/ On Mon, Aug 4, 2014 at 11:57 AM, Paul Swennenhuis p...@swennenhuis.nl wrote: Hi Christian, Sorry, also doesn't improve performance. I even tried to copy the optimized line for the selection, as found in the Query Info pane: (: list waters

Re: [basex-talk] Same query, huge difference in performance

2014-08-04 Thread Paul Swennenhuis
Hi Christian, Thanks again for your reply. I'm learning a lot by discussing these kind of problems. I tested your variant. It does indeed perform a lot better. My Query 2 still beats it though, so I'll stick to that one for now. Paul Hi Paul, thanks for trying 8.0. I have just uploaded yet

[basex-talk] Best way to do dynamic XPath evaluation

2014-08-10 Thread Paul Swennenhuis
Suppose I have a variable $xml containing the XML fragment placesvillageWismar/villagecityAmsterdam/cityvillagePositano village, Italy/villagecityPrague/city/places In a static world I would list all cities with the XPath expression $xml//city . And the villages with $xml//village . OK. No

[basex-talk] Paged results

2014-08-15 Thread Paul Swennenhuis
Hi all, Triggered by a thread in this forum I decided to make a paged() function that adds paging information to a node-set. It does so by wrapping the node-set in an root element - with a name of your choice - with attributes for total number of nodes, start-index requested page-size,

[basex-talk] BaseX for dummies

2014-08-19 Thread Paul Swennenhuis
Hello list, I am pleased to announce a new introduction in BaseX, targeted at beginning BaseX users in general, and to PHP/Javascript developers in particular. The introduction is added as PDF to the BaseX introduction page at http://docs.basex.org/wiki/Getting_Started. The title is 'BaseX

Re: [basex-talk] pagination implementation.

2014-08-21 Thread Paul Swennenhuis
Hi Kunal, Did you see my post about paged results? Wouldn't that work for you? I don't understand your remark about don't want to modify XQuery? How else would you want to achieve it? Paul Hi, I want to implement pagination through Basex. results should be retrieved as per given range / size.

[basex-talk] Connecting to BaseX with PHP client

2014-11-14 Thread Paul Swennenhuis
Hi, I have successfully deployed BaseX on an Amazon Web Services instance using the Elastic Beanstalk application container and the BaseX79.WAR distribution. The REST interface works as is demonstrated by going to http://drpbasex2.elasticbeanstalk.com/rest/?run=xq/countries.xqcountry=^a Now

Re: [basex-talk] IDs management

2014-11-17 Thread Paul Swennenhuis
Hi Ioan, I'd use a GUID-generation algorithm, with a near to 100% certainty of generating unique id's. Or do you need a sequential order? Paul Hello all, I would like to ask your advice on the best practice to use the IDs in BaseX, somewhat in the classic style of relationships between

Re: [basex-talk] Connecting to BaseX with PHP client

2014-11-17 Thread Paul Swennenhuis
I have solved this issue myself. It appeared that traffic from my computer to port 1984 was blocked by the firewall that is installed over here. After opening port 1984 the connection works. Paul Hi, I have successfully deployed BaseX on an Amazon Web Services instance using the Elastic

[basex-talk] Opened by another process

2014-11-17 Thread Paul Swennenhuis
Why would I get a bxerr:BXDB0007 error Database 'profiles' cannot be updated, as it is opened by another process when executing these commands from a BaseX client: open profiles; xquery insert node profileabc/profile into /profiles Where profiles is an existing database, and /profiles an

Re: [basex-talk] Opened by another process

2014-11-17 Thread Paul Swennenhuis
instance that could have opened the db ? Best regards, Fabrice Questel/Orbit -Message d'origine- De : basex-talk-boun...@mailman.uni-konstanz.de [mailto:basex-talk-boun...@mailman.uni-konstanz.de] De la part de Paul Swennenhuis Envoyé : lundi 17 novembre 2014 22:44 À : basex-talk

Re: [basex-talk] Opened by another process

2014-11-17 Thread Paul Swennenhuis
[mailto:basex-talk-boun...@mailman.uni-konstanz.de] De la part de Paul Swennenhuis Envoyé : lundi 17 novembre 2014 22:44 À : basex-talk@mailman.uni-konstanz.de Objet : [basex-talk] Opened by another process Why would I get a bxerr:BXDB0007 error Database 'profiles' cannot be updated

[basex-talk] BaseX for dummies part 2

2014-12-23 Thread Paul Swennenhuis
Hi all, I am happy to announce that part 2 of my BaseX for dummies is ready. It deals with deploying and configuring BaseX on a virtual Amazon Web Services server. See http://docs.basex.org/wiki/Getting_Started, or go directly to

[basex-talk] Keeping a database optimized

2015-11-05 Thread Paul Swennenhuis
What is the best way to keep the indexes of a database up-to-date? I have created a database with the option UPDINDEX set to ON (and db-info tells me that it is indeed switched on) and I have also created text and attribute indexes. Even so, after several insertions (using XQUERY insert node) I

Re: [basex-talk] Keeping a database optimized

2015-11-05 Thread Paul Swennenhuis
Will do. Thanks. Paul So what database size do you consider to be "too large"? 0.5 Gb? 1 Gb? Or ... ? Hm… It really depends on your use case (1 ms can be too slow for the one use case, 1 second can be fast enough for another). Maybe you can simply do some benchmarking and see how it works out

Re: [basex-talk] Location for import modules

2015-10-15 Thread Paul Swennenhuis
Hi Christian, Thanks for the swift response. I tried to place it in the directory of the importing module as well but that did not work either. When I run this query: {file:current-dir()} {file:base-dir()} {static-base-uri()} {file:parent(static-base-uri())}

[basex-talk] Location for import modules

2015-10-15 Thread Paul Swennenhuis
Hi, I installed BaseX 8.3 as Tomcat webapp on a Ubuntu server. Everything works fine, including the DBA interface (very much appreciated, thanks for that!) Except one thing: I can't get the import of XQuery modules right. When I import a module in a .xq file, like this: import module

Re: [basex-talk] Location for import modules

2015-10-15 Thread Paul Swennenhuis
problems in the past; this is why we are usually working with Jetty or Glassfish in our projects. On Thu, Oct 15, 2015 at 4:13 PM, Paul Swennenhuis <p...@swennenhuis.nl> wrote: Hi Christian, Thanks for the swift response. I tried to place it in the directory of the importing module a

Re: [basex-talk] about changing default port 1984

2016-06-21 Thread Paul Swennenhuis
Have a look at the .basex file Mohamed. Paul All the commands line are for linux. But there is no documentation for windows to change 1984 default port http://docs.basex.org/wiki/Command-Line_Options#Server *De :*

Re: [basex-talk] XML Prague » User Meeting » Feb 11, 2016 » Join us!

2016-01-21 Thread Paul Swennenhuis
I would really love to visit this meeting. A chance to get to know BaseX better and find out how people use it. All talks seem worthwhile Let's see if I can convince my boss that I should be there :-) Paul Hi everyone, Once again, I would like to remind you of our BaseX User Meeting

Re: [basex-talk] XML Prague » User Meeting » Feb 11, 2016 » Join us!

2016-01-21 Thread Paul Swennenhuis
BTW Maybe this isn't the place to be mentioning it, but there is a problem with the link to isilex.fr (first link in the Session I page at http://lanyrd.com/2016/basex/sdxmzm/) Paul I would really love to visit this meeting. A chance to get to know BaseX better and find out how people use it.

[basex-talk] Abnormal long running query

2017-01-30 Thread Paul Swennenhuis
Hi all, I have BaseX version 8.3 running on Ubuntu and Tomcat. Up till recently eveything was running nice and reliable. Lately however I see some queries, that otherwise may take a few seconds to complete, to run abnormally long. So long that they will eventually cause Tomcat, and thus BaseX,

Re: [basex-talk] Somewhat unusual question

2017-02-24 Thread Paul Swennenhuis
Nice article Greg! Paul On 24-2-2017 14:29, Murray, Gregory wrote: I agree entirely that XQuery is unique and that calling it a query language gives the wrong impression. I gave a talk about this last August at Balisage:

Re: [basex-talk] Validate XML against RNG schema

2017-06-22 Thread Paul Swennenhuis
Oops ... Not recommended to post 8 Mb to the list Dharmendra. Paul On 21-6-2017 8:14, Dharmendra Singh wrote: Hi all, I have loaded the RNG schema using function db:store and also loaded the XML in the DB which has to be validated, but i am getting the error, below is my code: let