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-request@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-request@mailman.uni-konstanz.de
You can reach the person managing the list at basex-talk-owner@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:
- Re: Database files across multiple directories
(julia.jacobson@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.jacobson@arcor.de To: basex-talk@mailman.uni-konstanz.de Cc: heller@hellerim.de Subject: Re: [basex-talk] Database files across multiple directories Message-ID: 1680192231.162639.1430323193071.JavaMail.ngmail@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.gruen@gmail.com To: julia.jacobson@arcor.de Cc: Goetz Heller heller@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+mynLQQZoQ@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.gruen@gmail.com To: cmarchand cmarchand@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-XmR0munVVN8Jqh8z2G4w@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 QUERYINFO ON and query.info() when using one of the bindings). In the GUI, the output wil be visible in the Info panel.
Hope this helps, C.
Message: 4 Date: Wed, 29 Apr 2015 19:37:47 +0200 From: "Goetz Heller" heller@hellerim.de To: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Database files across multiple directories Message-ID: 00ec01d082a3$35b09730$a111c590$@hellerim.de Content-Type: text/plain; charset="iso-8859-1"
Hi Julia, this looks to me as if you had hybrid data - some relational (tabular) data (addresses etc.) and other semi-structured data. If so, then think about storing the tabular data in a relational database management system (RDBMS) like Maria SQL or MS SQL Server and accessing it from within your xQueries. This is something which can be achieved very easily since the BaseX implementation accommodates adding Java code to your queries simply by dropping your jar files into the lib directory and adding a namespace declaration to the prolog of your query - it's just a snap. You can do anything you want with the relational data - insert, update, delete, and, of course, select, you can run stored procedures, and still access your XML data as easily, combine results from both sources, create great reports, and so on.
Think of xQuery as a domain-specific language (DSL) for querying XML data, just as SQL is a DSL for dealing with relational data, which you can enhance according to your needs.
If you need to modify only the relational part of the data, you can do this easily via the RDBMS since this is standard, and BaseX still remains the perfect choice for handling the XML part of your data. Although many RDBMSs offer also some XML and even xQuery functionality, compared to a system like BaseX this is only rudimentary. E.g. Oracle and SQL Server implement only xQuery 1.0, and even this only partially.
I did something similar with BaseX and SQL Server, and - just as a proof of concept - also with Oracle. E.g., you can create SQL code with xQuery on the fly so it incorporates current context data, and pass it to some generic database access function. With JDBC, you've got the glue to connect to a wide range of database servers.
I did not figure out whether you can make a database server and BaseX participate in the same distributed transaction because I had no necessity to do so; maybe Christian can tell you something more about it.
Kind regards,
Goetz
-----Urspr?ngliche Nachricht----- Von: julia.jacobson@arcor.de [mailto:julia.jacobson@arcor.de] Gesendet: Mittwoch, 29. April 2015 18:00 An: basex-talk@mailman.uni-konstanz.de Cc: heller@hellerim.de Betreff: Re: [basex-talk] Database files across multiple directories
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: 5 Date: Thu, 30 Apr 2015 10:12:23 +0300 From: Kristian Kankainen kristian@keeleleek.ee To: BaseX basex-talk@mailman.uni-konstanz.de Subject: [basex-talk] Running commands on BaseX on Tomcat Message-ID: 5541D5D7.5000301@keeleleek.ee Content-Type: text/plain; charset=utf-8; format=flowed
Hello!
I have BaseX 8.11 running on Tomcat and need to execute some commands or XQuery for deploying xml files from elsewhere. I allready have a XQuery function for this and can do it on my local setup using for example the basexclient.
My problem is that the Tomcat is available only through HTTP and I wouldn't like to open up the function for the outside world using RESTXQ. Is there a way to "talk" with the BaseX in the Tomcat? I have full access to the machine via SSH. Another way I thought of would be to just upload the data folder from my local setup, but it doesn't feel the right way to do it.
Best regards Kristian K
Message: 6 Date: Thu, 30 Apr 2015 10:47:23 +0200 From: Christian Gr?n christian.gruen@gmail.com To: Kristian Kankainen kristian@keeleleek.ee Cc: BaseX basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Running commands on BaseX on Tomcat Message-ID: CAP94bnNjxDFGo8ttNeE0c4v7FfYgCoDtHc=K-fDgZo=RNC65Lw@mail.gmail.com Content-Type: text/plain; charset=UTF-8
Hi Kristian,
My problem is that the Tomcat is available only through HTTP and I wouldn't like to open up the function for the outside world using RESTXQ. Is there a way to "talk" with the BaseX in the Tomcat?
Have you already thought about adding the DBA interface [1 [2]]? It might be extended with new functionality to store and invoke server-side code, and you can already use it to run arbitrary XQuery expressions.
Another choice is our classical REST interface, which can also be used to run server-side queries or command scripts.
Just remember that these interfaces can potentially be accessed by other people as well, even those who are not supposed to access it, so you should e.g. change the default admin password, etc.
Best, Christian
[1] http://docs.basex.org/wiki/DBA [2]
I have full access to the
machine via SSH. Another way I thought of would be to just upload the data folder from my local setup, but it doesn't feel the right way to do it.
Best regards Kristian K
End of BaseX-Talk Digest, Vol 64, Issue 58
Links: ------ [1] https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk [2] http://docs.basex.org/wiki/DBA [3] http://www.w3schools.com/xquery/ [4] http://docs.basex.org/wiki/XQuery_3.0
Well, the output is right at the beginning:
Evaluating: - fooempty-sequence()
What output would you expect?
C.
On Thu, Apr 30, 2015 at 1:01 PM, cmarchand@oxiane.com wrote:
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 ?
basex-talk@mailman.uni-konstanz.de