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 $binar

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: http://www.balisage.net/Proceedings/vol18/html/Murray01/BalisageVol18-M

[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] 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 :* Chri

Re: [basex-talk] Function as argument

2016-04-06 Thread Paul Swennenhuis
Thanks Christian. Now it makes sense. Quite interesting, that "XQuery: More than Just a Query Language" presentation. Paul Hi Paul, Apparently you have to use the name of the function followed by #1 like this: let $a := local:someFunc($nodeSet, local:someOtherFunc#1) But it is unclear to

[basex-talk] Function as argument

2016-04-06 Thread Paul Swennenhuis
Hi all, I am now using functions as argument in BaseX for the first time, borrowing the way to do that from some old list archive contribution. Apparently you have to use the name of the function followed by #1 like this: let $a := local:someFunc($nodeSet, local:someOtherFunc#1) But it is un

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.

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 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 f

Re: [basex-talk] Keeping a database optimized

2015-11-05 Thread Paul Swennenhuis
Thanks Christian, AUTOOPTIMIZE seems to work quite well. So what database size do you consider to be "too large"? 0.5 Gb? 1 Gb? Or ... ? Paul Hi Paul, Even so, after several insertions (using XQUERY insert node) I see that the UPTODATE flag is no longer checked Basically, this is fine, beca

[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] 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 wrote: 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

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 namesp

Re: [basex-talk] BaseX for dummies part 2

2015-02-06 Thread Paul Swennenhuis
stance, to take advantage of HD space ? Is BaseX DB compatible with AWS S3 currently ? - Mansi On Tue, Dec 23, 2014 at 8:43 AM, Paul Swennenhuis <mailto:p...@swennenhuis.nl>> wrote: Hi all, I am happy to announce that part 2 of my BaseX for dummies is ready. It deals

[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 http://www.swennenhuis.nl/basexfordummies/BaseX_for_dummies_par

Re: [basex-talk] Opened by another process

2014-11-17 Thread Paul Swennenhuis
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@mailman.uni-konstanz.de Objet : [basex-talk] Opened by another process Why would I get a bxerr:BXDB0007 error "Database 'profiles'

Re: [basex-talk] Opened by another process

2014-11-17 Thread Paul Swennenhuis
basexhttp 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] 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 abc into /profiles Where "profiles" is an existing database, and /profiles an existing root el

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 Be

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 reco

[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.xq&country=^a N

[basex-talk] WAR distribution

2014-11-03 Thread Paul Swennenhuis
Hi, Last weekend I managed to deploy the BaseX WAR on the Amazon Web Services platform, as an 'Elastic Beanstalk' application. Now I want to create and manage databases and run queries via the REST interface. However, I am lost as how to do that. First, the BaseX pages tell me that the WAR dis

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] 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 for

[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, actual

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

2014-08-10 Thread Paul Swennenhuis
t be a document). So the following should work for you: xquery:eval($choice, map { '': document {$xml}}) Cheers, Dirk On 10/08/14 21:15, Paul Swennenhuis wrote: Suppose I have a variable $xml containing the XML fragment WismarAmsterdamPositano village, ItalyPrague In a static worl

[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 WismarAmsterdamPositano village, ItalyPrague In a static world I would list all cities with the XPath expression $xml//city . And the villages with $xml//village . OK. No issues. Runs fast. Now suppose I want the user to decide whethe

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

2014-08-05 Thread Paul Swennenhuis
Hi Christian, I saw that I still had my BaseX session open and wanted to close all open editor windows, then decided to run the slow query again, modified with your "parentheses around the path expression" solution. And guess what, it now runs as fast as Query 2! With parentheses: 80 msecs Wi

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 an

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

2014-08-04 Thread Paul Swennenhuis
pshot? Christian [1] http://files.basex.org/releases/latest/ On Mon, Aug 4, 2014 at 11:57 AM, Paul Swennenhuis 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 and where they

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

2014-08-04 Thread Paul Swennenhuis
ttribute {$name} {data($to/@name)} } else () } For me the lesson is: uses as much predefined selections as possible, particularly in "for" clauses. Paul Hi Paul, thanks for your feedback. Are you working with 7.9? If it's not too much of a hassle for you, I would be

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 db:open-pre("facts",0)/descen

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

2014-08-04 Thread Paul Swennenhuis
t for example in the GUI, with the collection already opened ? Best regards, Fabrice *De :*basex-talk-boun...@mailman.uni-konstanz.de [mailto:basex-talk-boun...@mailman.uni-konstanz.de] *De la part de* Paul Swennenhuis *Envoyé :* lundi 4 août 2014 11:22 *À :* H. Verweij; BaseX *Objet :* Re: [

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

2014-08-04 Thread Paul Swennenhuis
executes at least 10 times 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:

[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 ad

[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 as

Re: [basex-talk] How to store dynamically created xml file in basex through java

2014-07-25 Thread Paul Swennenhuis
You can use the INSERT or REPLACE command inside an XQuery that operates on that database, Manish. Look for some examples here: https://github.com/BaseXdb/basex/blob/master/basex-examples/src/main/java/org/basex/examples/local/WikiExample.java Paul Hi guys, I am new in base x and i got some

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( { for $user in collection("saveresult")//use

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

2014-07-11 Thread Paul Swennenhuis
Still no luck: JSON serializer: 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( { for $user in collection("saveresult")//user[_id="1f2cda8f-a18a-44ba

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( { for \$user in collection("saveresult")//u

[basex-talk] JSON output in PHP client

2014-07-11 Thread Paul Swennenhuis
7 <_id>Bio-2 1 (script is attached; note that the $ signs have been escaped there so that PHP will not try to evaluate them) In other words, the result is being output as XML with an enclosing root tag, not as JSON. What is ha

Re: [basex-talk] BaseX server

2014-07-02 Thread Paul Swennenhuis
Shift. 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

Re: [basex-talk] BaseX server

2014-07-02 Thread Paul Swennenhuis
hich means you have 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 under

[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 J