[basex-talk] Using the same database in many BaseX instances

2016-08-24 Thread cmarchand
Hello,

as discussed here few monthes ago, I do this :
Install many instances (8) of BaseX on the same computer
Start one instance, here called "main-instance"
Create a database "library" , and load a filesystem directory into
"library"
Stop main-instance
For each "other-instance", create a sym-link to
main-instance/data/library
Start "other-instances"

On each instance, create 2 new databases "input" and "output", load a
file in "input", process it and store result in "output". The process
queries a lot "library", but never modifies "library". Then export
"output" and drop databases "input" and "output". I have about 100 files
to process; and I distribute them on the various instances

I had a first test environment, with only 4 isntances, and everything
was working perfectly.
Now, I'm working on target environment, a bigger computer with 8
instances. Process fails, at least one time per instance, so between 8
and 12 times on 100 process. The exception is 
java.lang.NullPointerException
at org.basex.data.DiskData.write(DiskData.java:136)
at org.basex.data.DiskData.close(DiskData.java:151)
at org.basex.core.Datas.unpin(Datas.java:54)
at org.basex.core.cmd.Close.close(Close.java:45)
at org.basex.query.QueryResources.close(QueryResources.java:110)
at org.basex.query.QueryContext.close(QueryContext.java:596)
at org.basex.query.QueryProcessor.close(QueryProcessor.java:251)
at org.basex.core.cmd.AQuery.query(AQuery.java:124)
at org.basex.core.cmd.XQuery.run(XQuery.java:22)
at org.basex.core.Command.run(Command.java:398)
at org.basex.core.Command.execute(Command.java:100)
at org.basex.server.ClientListener.run(ClientListener.java:136)

If I change the sym-links by a true copy (cp -r main/data/library
other/data/), it now works correctly, but the copy takes a long time
(database is about 30gb), and it consumes disk space. 
The computer I use has many available cores, and many RAM to use, so I'd
love to add other instance, many 16 more to reach 24 isntances, but if
database grow, I'm going to have disk-space troubles... 

1 - is it legal to share a database (and files) between many instances
as far as database is access read-only ? 
2 - is there a way to configure a database to be read-only ? 
3 - why symbolic links were perfectly usable with 4 instances, and do
not with 8 instances ?  (Hum I have to try symlinks with only 4
instances on the new computer...) 
4 - are there other specific things to check to do what I need ? 

Best regards, 
Christophe

[basex-talk] Executing xq file from client fails

2016-05-09 Thread cmarchand
 

Hello, 

while running a .xq file on a database generates this error. 

The error is database-content relative ; with some data I have the
error, with other data, I do not have the error. 

my lanceClient.sh is just /usr/local/basex4/bin/basexclient
-nFR003-D0659 -p4984 -Ubasex -Pbasex $* 

Any hint to help me find where I have to search ? 

I can provide the .xq* files but for data, it wil be complicated : I
have more than 7Gb in one collection (which never changes) ; other
filewhich generates the error is 1.8Mb and can be provided, if needed. 

Best regards, 

Christophe 

$ ./lanceClient4.sh -d
-bp-repertoire-output=/home/efladm/webbuint/uaur/om-work/orders/
/home/efladm/webbuint/uaur/om-work/xquery/create-orders-formulaires.xq 
org.basex.core.BaseXException: Improper use? Potential bug? Your
feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 8.2.3
Java: Oracle Corporation, 1.8.0_51
OS: Linux, amd64
Stack Trace: 
java.lang.NullPointerException 

at org.basex.api.client.ClientSession.receive(ClientSession.java:193)
at org.basex.api.client.ClientSession.execute(ClientSession.java:162)
at org.basex.api.client.ClientSession.execute(ClientSession.java:167)
at org.basex.api.client.Session.execute(Session.java:36)
at org.basex.core.CLI.execute(CLI.java:103)
at org.basex.BaseX.(BaseX.java:121)
at org.basex.BaseXClient.(BaseXClient.java:40)
at org.basex.BaseXClient.main(BaseXClient.java:27)
Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 8.2.3
Java: Oracle Corporation, 1.8.0_51
OS: Linux, amd64
Stack Trace: 
java.lang.NullPointerException 

Re: [basex-talk] BaseX request from Saxon XSL transformation

2015-11-18 Thread cmarchand
 

Thanks, I was reading the same articles... It was just to check if
something already exists... 

Best regards, 

Christophe 

Le 2015-11-18 11:35, Dirk Kirsten a écrit : 

> Hello Christophe,
> 
> I've never done this, but I'd say that extension functions are the way to go. 
> If I read the saxon documentation correctly 
> (http://www.saxonica.com/html/documentation/extensibility/functions/), you 
> can use it to call Java functions from within XSLT. As BaseX is written in 
> Java you should be able to put the BaseX jar file into the library path and 
> query BaseX using Java. Many Java Examples of how to query BaseX can be found 
> at http://docs.basex.org/wiki/Java_Examples
> 
> Cheers
> Dirk
> 
> On 11/18/2015 09:18 AM, cmarch...@oxiane.com wrote: 
> 
>> Hello, 
>> 
>> I have to query a BaseX database from a XSL transformation. Does someone has 
>> ever done this ? I have no idea where to look in... 
>> 
>> I use SaxonEE, so I can write an extension function, if needed... 
>> 
>> Best regards, 
>> 
>> Christophe
> 
> -- 
> Dirk Kirsten, BaseX GmbH, http://basexgmbh.de
> |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
> |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
> |   Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle
> `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
 

[basex-talk] BaseX request from Saxon XSL transformation

2015-11-18 Thread cmarchand
 

Hello, 

I have to query a BaseX database from a XSL transformation. Does someone
has ever done this ? I have no idea where to look in... 

I use SaxonEE, so I can write an extension function, if needed... 

Best regards, 

Christophe 

Re: [basex-talk] size on collection in the time (Marc)

2015-09-03 Thread cmarchand
 

I confirm the problem : on another database (same data, same script.xbs,
different server), we have exactly the same problem : the database grows
each time the script is run. 

I'm going to prepare a test-case with small public data tonight. 

Best regards, 

Christophe 

Hello Dirk,
We use a BaseX script (.xbs) with a list of REPLACE.
We try to investigate this point if this is reproducable or not.
If I find this problem again, I take a copy of the collection before to 
delete her.

Thank you for answer.

Marc
Le 03/09/2015 09:52, Dirk Kirsten a ?crit : 

> Hello Marc,
> 
> sure, a replace should lead to a true replace, i.e. the old data will be
> dropped. So this sounds like a bug, but it is difficult to replicate
> from what you describe.
> 
> Do you think it would be possible to make the issue reproducable, maybe
> also with a smaller data set? Also, how exactly do you add documents or
> do you also do any queries and maybe other updating queries?
> 
> Cheers
> Dirk
> 
> On 09/02/2015 05:36 PM, Marc wrote: 
> 
>> Hi,
>> I have a remark about the size of the files of a collection.
>> We do a lot of updates (REPLACE) with an attributes index but without
>> a text index.
>> I see that the size of the files grows up in the time we arrive until
>> 30Go until the limit of the filessytems quota.
>> When I drop the collection and recreate it from the last version of
>> the files the size was only 6Go.
>> 
>> We will redo the test with the time, but I just want to know if the
>> program clears the disk use when he does a REPLACE?
>> 
>> Marc

--

Message: 4
Date: Thu, 3 Sep 2015 10:01:05 +0200
From: Marc 
To: Dirk Kirsten 
Cc: BaseX 
Subject: Re: [basex-talk] (no subject)
Message-ID: <55e7fe41.5080...@free.fr>
Content-Type: text/plain; charset=iso-8859-15; format=flowed

I forgot to give this precision, we use the 7.9 version on this server.

Marc
Le 01/01/1970 01:00, a ?crit : 

> Hello Dirk,
> We use a BaseX script (.xbs) with a list of REPLACE.
> We try to investigate this point if this is reproducable or not.
> If I find this problem again, I take a copy of the collection before to
> delete her.
> 
> Thank you for answer.
> 
> Marc
> Le 03/09/2015 09:52, Dirk Kirsten a ?crit : Hello Marc,
> 
> sure, a replace should lead to a true replace, i.e. the old data will be
> dropped. So this sounds like a bug, but it is difficult to replicate
> from what you describe.
> 
> Do you think it would be possible to make the issue reproducable, maybe
> also with a smaller data set? Also, how exactly do you add documents or
> do you also do any queries and maybe other updating queries?
> 
> Cheers
> Dirk
> 
> On 09/02/2015 05:36 PM, Marc wrote: Hi,
> I have a remark about the size of the files of a collection.
> We do a lot of updates (REPLACE) with an attributes index but without
> a text index.
> I see that the size of the files grows up in the time we arrive until
> 30Go until the limit of the filessytems quota.
> When I drop the collection and recreate it from the last version of
> the files the size was only 6Go.
> 
> We will redo the test with the time, but I just want to know if the
> program clears the disk use when he does a REPLACE?
> 
> Marc

End of BaseX-Talk Digest, Vol 69, Issue 5
* 

Re: [basex-talk] basexserver start

2015-08-21 Thread cmarchand
 

It does ! I was looking at the to see if I could start the daemon with
the required parameters... 

Thanks a lot ! 

Christophe 

Le 2015-08-20 20:18, Christian Grün a écrit : 

 Hi Christophe,
 
 Does BaseXServer is a starter for another JVM ?
 
 It only does if you use the -S flag (Start as service).
 
 Does this help?
 Christian
 

Re: [basex-talk] Looks like... (Scoobbs)

2015-08-21 Thread cmarchand
 

Hi Scoobbs, 

you are perfectly right, the basex available on ubuntu repository is
quite old. 

But, your mail smells (bad) ! Basex team is responsible on developing
basex, and not on publishing packages for all OS, as explained by Dirk
Kirsten. You can't fight again BaseX team if the actual packaging do not
meet your requirements. BaseX distribute a package that can be fully
installed on a complex environment in a very easy way - very easy. 

You just have to read the documentation to install BaseX on your Ubuntu
server. For me, to install 8.2.3, it took exactly 12 minutes to make
basex to run perfectly. If you don't understand the documentation, and
still have problems to install, all list-users will be happy to help
you. 

You could also think to a bit of sponsoring, it could help to produce a
package for Ubuntu, during august, which is vacation-time for the whole
north hemisphere. 

Please, be a little more respectful of other's work. 

Best regards, 

Christophe - which is not part of BaseX team. 

Le 2015-08-21 08:35, basex-talk-requ...@mailman.uni-konstanz.de a écrit
: 

 *?Looks like no one cares much for Ubuntu. I have version 7.7.2 installed,
 through the Ubuntu Software Center. It was just a matter of cliking here
 and there(actually no more than two clicks) and there I was. It even looks
 like BaseX realy works!!!??Well, now that I have decided to try to use it,
 there came a message saying a new version is available, namely
 8.2.3.Alright, I agreed I should update it. But then I was taken to a site
 where something should be downloaded, in order for the installation to
 happen. A 'file' or 'container' with a .jar extension should be it, I
 thought. But, then again, there seemed to be no executable(or, easily
 executable) file/module/app, whatever, was found. So I concluded I am not
 as clever as most of the people building BaseX are. And, I ask:- Why is
 there not an actually easy way to install the application? - Is it so damn
 hard to build a thing like that? - Why is it so simple to implement
 applications included in the cited Ubuntu Software Center, for simple
 minded people like me, who can use effective tools like BaseX seems to be
 but are not capable of understanding(much less to use, and retain in
 memory, tens of cryptic commands???Anyway, my intent is actually to ask
 someone(some good soul?) to update the Software Center so that one( I
 suppose many...) can fast-and-dirtly(sorry... this is just a way to show my
 frustration) use the tool.Thanks for any attention given to this request.
 And, if someone does anything like what I asked above, please just tell me
 where and what I must do. No need for replies nor attempts to teach me how
 to do it(I inclusively think maybe it is not that difficult to do as it is
 today, once one knows how to, but I am actually too old to learn new
 tricks...).??Cordially, ?Scoobbs?(who just thought he could build a simple
 database containing names, addresses, etc. about friends and
 family...)??**?==?==???=?PS:
 ** well, maybe, with some links to other variable attibutes of persons,
 like, courses attended, graduation data etc. etc.)?*
 

[basex-talk] basexserver start

2015-08-20 Thread cmarchand
 

Hello, 

I want to monitor garbage collect on basex server. 

So, I've modified basexserver as this : 

BASEX_JVM=-Xmx6144m $BASEX_JVM
-Xloggc:/home/basex/logs/79/azul/gc.log.$(date -u +%Y-%m-%d-%H-%M) \
-verbose:gc \
-XX:+PrintGCDateStamps \
-XX:+PrintGCDetails \
-XX:+PrintGCApplicationStoppedTime
-javaagent:/usr/local/jHiccup/jHiccup.jar=-d,5000,-i,1000,-s,3,-l,/home/basex/logs/79/azul/hiccuplog,-c


# Run code
java -cp $CP $BASEX_JVM ${vm_args[@]} org.basex.BaseXServer
${general_args[@]} 

The problem is I have only 2 seconds of monitoring. 

Does BaseXServer is a starter for another JVM ? 

How can I activate GC log on basex server ? 

Thanks in advance, 

Christophe 

Re: [basex-talk] Resolving includes

2015-08-17 Thread cmarchand
 

Well... 

I suppose, you have such a code that reads .xq file, analyses imports,
read and process imports, to build the full query with all functions
attached. 

But as finding a piece of code in a project you've never code on is a
very long process, I thought you could help me to point out the main
class in basex-core that does the job... 

Best regards, 

Christophe 

Le 2015-08-17 11:43, Christian Grün a écrit : 

 Hi Christophe,
 
 I want to produce a .XQ file that includes all the code contained in
 imported modules (via import module clause). My purpose is to produce a
 maven plugin to do this.
 
 I think such a code already exists in basex, and I would like to reuse it.
 
 I don't know anything about such a module. Where did you hear about it?
 
 Cheers,
 Christian
 

[basex-talk] [SOLVED] Re: BaseX 7.9 problem

2015-07-23 Thread cmarchand
 

SOLVED, it's just a read/write access problem on .basexperm. 

Sorry for the spam, 

Christophe 

Le 2015-07-23 10:07, cmarch...@oxiane.com a écrit : 

 Hello ! 
 
 I have an exception throw on BaseX 7.9 
 
 I've just installed it on a linux box, in /usr/local/basex-79, owned by root, 
 chowned -R a+wr *, and run by another user. 
 
 Here is the problem : 
 
 $ /usr/local/basex/bin/basex -d
 BaseX 7.9 [Standalone]
 Try help to get more information. 
 
 SHOW USERS
 Exception in thread main java.lang.NullPointerException
 at org.basex.core.Context.perm(Context.java:220)
 at org.basex.core.Command.execute(Command.java:84)
 at org.basex.server.LocalSession.execute(LocalSession.java:121)
 at org.basex.server.Session.execute(Session.java:37)
 at org.basex.core.CLI.execute(CLI.java:106)
 at org.basex.core.CLI.execute(CLI.java:90)
 at org.basex.BaseX.console(BaseX.java:197)
 at org.basex.BaseX.init(BaseX.java:171)
 at org.basex.BaseX.main(BaseX.java:42) 
 
 Any help will be appreciated to identify the problem... 
 
 Best regards, 
 
 Christophe
 

Re: [basex-talk] basexclient and modules

2015-07-23 Thread cmarchand
 

Moving our xquery modules into server repository isn't a solution, as we
could have many releases of the same module, used on various databases. 

So the solution will be to build a single .xq file with all the code in.


I'm going to write a maven plugin to do this. Is there some basex code I
could use to help me ? Entries will help ! 

Thanks in advance, 

Christophe 

Le 2015-07-22 15:08, Christian Grün a écrit : 

 Hi Christophe,
 
 I can understand that compilation must be done on server-side - well, at
 least optimization - but client could parse the .xq file to check if there
 are imports, and either push them to server, or throw an error without
 accessing the server.
 
 Raising errors sounds dangerous to me: I remember at least two use
 cases in which it was a deliberate choice to send XQuery code with
 module imports to a BaseX server. Moreover, besides module imports,
 there are numerous other expressions in a query module - such as the
 doc() function - which may be interpretedly differently on a client
 and on a server.
 
 Is there an utility-tool which allows to generates a single script file from
 a .xq and included .xqm, that I could use before running basexclient ?
 
 Maybe you can simply move all your library modules into the
 server-side BaseX repository. In this case, you won't need to specify
 the module location anymore [1 [1]].
 
 Hope this helps,
 Christian
 
 [1] http://docs.basex.org/wiki/Repository#Accessing_Modules [1]
 
 Best regards,
 
 Christophe
 

Links:
--
[1] http://docs.basex.org/wiki/Repository#Accessing_Modules


[basex-talk] BaseX 7.9 problem

2015-07-23 Thread cmarchand
 

Hello ! 

I have an exception throw on BaseX 7.9 

I've just installed it on a linux box, in /usr/local/basex-79, owned by
root, chowned -R a+wr *, and run by another user. 

Here is the problem : 

$ /usr/local/basex/bin/basex -d
BaseX 7.9 [Standalone]
Try help to get more information. 

 SHOW USERS
Exception in thread main java.lang.NullPointerException
at org.basex.core.Context.perm(Context.java:220)
at org.basex.core.Command.execute(Command.java:84)
at org.basex.server.LocalSession.execute(LocalSession.java:121)
at org.basex.server.Session.execute(Session.java:37)
at org.basex.core.CLI.execute(CLI.java:106)
at org.basex.core.CLI.execute(CLI.java:90)
at org.basex.BaseX.console(BaseX.java:197)
at org.basex.BaseX.init(BaseX.java:171)
at org.basex.BaseX.main(BaseX.java:42) 

Any help will be appreciated to identify the problem... 

Best regards, 

Christophe 

[basex-talk] basexclient and modules

2015-07-21 Thread cmarchand
 

Hello ! 

we would like to execute thru basexclient a xquery script that includes
a xquery module : 

xquery encoding utf-8; 

declare namespace db=http://basex.org/modules/db;; 

import module namespace
om-ll='http://els.eu/ns/efl/offresMetiers/CreateCIActu/lowLevel' at
'lowLevel.xqm'; 

With basexgui and basex CLI, no problem. But with basexclient, it seems
included files are not send to server, so server can not resolve
dependencies, and compile xquery. 

I can understand that compilation must be done on server-side - well, at
least optimization - but client could parse the .xq file to check if
there are imports, and either push them to server, or throw an error
without accessing the server. 

Is this an issue ? 

Is there an utility-tool which allows to generates a single script file
from a .xq and included .xqm, that I could use before running
basexclient ? 

Best regards, 

Christophe 

[basex-talk] Full memory database

2015-07-16 Thread cmarchand
 

Hello, 

is there a way to put all the databases in memory ? We have a 30Gb
database, serving as repository for XInclude-like resolution, and I want
to avoid disk access (I work with Marc Messeant...) 

Using special JVM, I can allocate many memory, and so want to work only
in memory. Is this possible ? 

Best regards, 

Christophe 

Re: [basex-talk] Full memory database

2015-07-16 Thread cmarchand
 

I think we could use the in-memory database to store read-only documents
(our repository), a use disk-persisted database for the resulting
documents. 

In term of requirements, I'd prefer Marc (added to dest list) to clearly
explain what is expected, but I think attribute and node-name index
should be enough. 

As this, we could avoid the update functionnalty on in-memory database. 

Best regards, 

Christopeh 

Le 2015-07-16 10:06, Christian Grün a écrit : 

 Hi Christophe,
 
 is there a way to put all the databases in memory ? We have a 30Gb database,
 serving as repository for XInclude-like resolution, and I want to avoid disk
 access (I work with Marc Messeant...)
 
 Using special JVM, I can allocate many memory, and so want to work only in
 memory. Is this possible ?
 
 In the early days, BaseX has been a pure main-memory database. Today,
 some main-memory features are still available. For example, you can
 set MAINMEM to true and create a new database completely in main
 memory.
 
 You can't open existing databases in memory, though. We are currently
 looking for sponsors to realize this feature [1 [1]]. Feel free to give us
 a note if you are interested? And what are your requirements: do you
 also need updates, index structures, ...?
 
 Best,
 Christian
 
 [1] https://github.com/BaseXdb/basex/issues/948 [1]
 

Links:
--
[1] https://github.com/BaseXdb/basex/issues/948


Re: [basex-talk] Function to throw an exception

2015-06-09 Thread cmarchand
 

That's exactly what I want ! 

Thanks a lot ! 

Christophe 

Le 2015-06-09 10:58, Christian Grün a écrit : 

 Hi Christophe,
 
 I do not want to avoid the updates, but really want to throw an error.
 
 I'm not sure how to interpret your statement.. Do you want to execute
 the updates AND throw an error?
 
 If you throw an error, your updates won't be executed, so this may
 already be what you need. See the following example..
 
 let $data := my-data/
 return if($data/*) then (
 insert node $data into db:open('db')/xml
 ) else (
 error((), 'Root has no child elements!')
 )
 
 Best,
 Christian
 

[basex-talk] Trigger to apply statements on technical events ?

2015-05-12 Thread cmarchand
 

Hello ! 

I've had this problem : I've forgotten a db:optimize(...) after a delete
nodes operation. The following xquery has been 60 times slower than
before. Is there a way to detect an update operation, and a way to know
on which database the update occurs, to run automatically a
db:optimize(...) each time a update xquery is run ? 

Christophe 

[basex-talk] BaseX trace() output

2015-04-30 Thread cmarchand
 

in basexGui, running trace((),'foo') displays this in Info panel : 

Evaluating:
- fooempty-sequence()
Query:
trace((),'foo')
Result:
- Hit(s): 0 Items
- Updated: 0 Items
- Printed: 0 Bytes
- Read Locking: none
- Write Locking: none
Timing:
- Parsing: 0.75 ms
- Compiling: 0.05 ms
- Evaluating: 0.35 ms
- Printing: 0.27 ms
- Total Time: 1.43 ms
Query plan:
QueryPlan
 FNInfo name=trace(value,label)
 Empty size=0/
 Str value=foo type=xs:string/
 /FNInfo
/QueryPlan 

There is no output, but in the query plan. Is this what is expected ? 

Le 2015-04-30 12:00, basex-talk-requ...@mailman.uni-konstanz.de a écrit
: 

 Send BaseX-Talk mailing list submissions to
 basex-talk@mailman.uni-konstanz.de
 
 To subscribe or unsubscribe via the World Wide Web, visit
 https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk [1]
 or, via email, send a message with subject or body 'help' to
 basex-talk-requ...@mailman.uni-konstanz.de
 
 You can reach the person managing the list at
 basex-talk-ow...@mailman.uni-konstanz.de
 
 When replying, please edit your Subject line so it is more specific
 than Re: Contents of BaseX-Talk digest...
 
 Today's Topics:
 
 1. Re: Database files across multiple directories
 (julia.jacob...@arcor.de)
 2. Re: Database files across multiple directories (Christian Gr?n)
 3. Re: Where are the debugging infos emit by trace(...)
 (Christian Gr?n)
 4. Re: Database files across multiple directories (Goetz Heller)
 5. Running commands on BaseX on Tomcat (Kristian Kankainen)
 6. Re: Running commands on BaseX on Tomcat (Christian Gr?n)
 
 --
 
 Message: 1
 Date: Wed, 29 Apr 2015 17:59:53 +0200 (CEST)
 From: julia.jacob...@arcor.de
 To: basex-talk@mailman.uni-konstanz.de
 Cc: hel...@hellerim.de
 Subject: Re: [basex-talk] Database files across multiple directories
 Message-ID:
 1680192231.162639.1430323193071.javamail.ngm...@webmail22.arcor-online.net
 
 Content-Type: text/plain; charset=ISO-8859-1
 
 Thanks a lot for your answers so far. What I was thinking of as a use case 
 are many small xml-Documents in many different (sub)directories that should 
 be used together as one database, like for example one xml file for one 
 address and address arranged into folders according to towns so one would 
 have 9 xml files in a folder named berlin and 5 ones in another folder 
 named munich and so on.
 Does BaseX create an index of these files so that I could for example query 
 for example for persons with the same name? If I want to change something in 
 these files, will the changes be also made in the xml documents?
 
 Kind regards,
 Julia
 
 --
 
 Message: 2
 Date: Wed, 29 Apr 2015 18:14:56 +0200
 From: Christian Gr?n christian.gr...@gmail.com
 To: julia.jacob...@arcor.de
 Cc: Goetz Heller hel...@hellerim.de, BaseX
 basex-talk@mailman.uni-konstanz.de
 Subject: Re: [basex-talk] Database files across multiple directories
 Message-ID:
 CAP94bnMhv9j1CNP0x-ovEh-jAH-6gT=xydk48mtu+mynlqq...@mail.gmail.com
 Content-Type: text/plain; charset=UTF-8
 
 Hi Julia,
 
 Does BaseX create an index of these files so that I could for example query 
 for example
 for persons with the same name?
 
 BaseX will create a database from these files. This can e.g. be done
 by starting the GUI, choosing Database ? New?, selecting your XML
 directory, and pressing OK.
 
 All documents will then be stored, and the textual contents will be
 indexed. Next, you can use XQuery, which is not only a query language,
 but a powerful programming language, to do all kinds of things with
 the data. See e.g. [1 [2]] or [2 [3]] for some examples. You probably don't
 want to do that by yourself, but XQuery can be used to write full web
 applications.
 
 If I want to change something in these files, will the changes be also made 
 in the xml documents?
 
 Currently, there is no automatic synchronisation between databases and
 local file directories, so you'll either have to export the database
 after updates, or create a new database after files have been changed.
 
 Cheers,
 Christian
 
 [1] http://docs.basex.org/wiki/XQuery_3.0 [4]
 [2] http://www.w3schools.com/xquery/ [3]
 
 If I want to change something in these files, will the changes be
 also made in the xml documents? 
 
 Kind regards,
 Julia
 
 --
 
 Message: 3
 Date: Wed, 29 Apr 2015 18:25:21 +0200
 From: Christian Gr?n christian.gr...@gmail.com
 To: cmarchand cmarch...@oxiane.com
 Cc: BaseX basex-talk@mailman.uni-konstanz.de
 Subject: Re: [basex-talk] Where are the debugging infos emit by
 trace(...)
 Message-ID:
 cap94bnmna7sb6lbrhpi0flp-odpqr-xmr0munvvn8jqh8z2...@mail.gmail.com
 Content-Type: text/plain; charset=UTF-8
 
 Hi Christophe,
 
 I'm looking for the trace() output in gui and server mode... I've checked
 System.out / System.err, but nothing.
 
 In the client/server mode, trace output will be redirected to the
 client (try -V on command-line, or use SET

[basex-talk] Strange bug ? testing the db:path of a non-stored database node

2015-04-21 Thread cmarchand
 

Hello, 

I have this error. According to
http://docs.basex.org/wiki/Database_Module#Database_Nodes, I thought
modify() was transforming a node to a database node 

It seems it does not initialize a document name... 

Best regards, 

Christophe 

Error:
Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 8.1
Java: Oracle Corporation, 1.8.0_31
OS: Windows 7, amd64
Stack Trace: 
java.lang.NullPointerException
at org.basex.query.value.item.Str.get(Str.java:49)
at org.basex.query.func.db.DbPath.item(DbPath.java:23)
at org.basex.query.expr.ParseExpr.value(ParseExpr.java:64)
at org.basex.query.QueryContext.value(QueryContext.java:415)
at org.basex.query.up.expr.Transform.value(Transform.java:91)
at org.basex.query.up.expr.Transform.iter(Transform.java:59)
at org.basex.query.up.expr.Transform.iter(Transform.java:25)
at org.basex.query.MainModule.iter(MainModule.java:114)
at org.basex.query.QueryContext.iter(QueryContext.java:343)
at org.basex.query.QueryContext.execute(QueryContext.java:605)
at org.basex.query.QueryProcessor.execute(QueryProcessor.java:98)
at org.basex.core.cmd.AQuery.query(AQuery.java:83)
at org.basex.core.cmd.XQuery.run(XQuery.java:22)
at org.basex.core.Command.run(Command.java:379)
at org.basex.core.Command.execute(Command.java:95)
at org.basex.gui.GUI.exec(GUI.java:466)
at org.basex.gui.GUI.access$400(GUI.java:41)
at org.basex.gui.GUI$7.run(GUI.java:410)
Query:
copy $c := test/ modify () return db:path($c)
Query plan:
QueryPlan compiled=true
Transform
Let
Var name=$c id=0 as=node()/
CElem
QNm value=test type=xs:QName/
/CElem
/Let
Empty size=0/
DbPath name=path(node)
VarRef
Var name=$c id=0 as=node()/
/VarRef
/DbPath
/Transform
/QueryPlan