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

2016-01-19 Thread Christian Grün
Hi everyone,

Once again, I would like to remind you of our BaseX User Meeting in
Prague. It will take place on February 11 (Thursday), 10:00 to 13:00.
This time, we are more than happy to have eight talks for you:

_ SESSION I, 10:00 ___

1. BaseX 8.4: The Latest Updates.
   Christian Grün, BaseX GmbH, Konstanz

2. The Power of Promises and Parallel XQuery Execution.
   James Wright, Denver, Colorado

3. BaseX for linguistic research: transforming the Latin Dependency
Treebank into Universal Dependencies.
   Giuseppe G. A. Celano, Humboldt Chair for Digital Humanities,
Leipzig, Germany

4. Isilex, an Easy-To-Deploy Basex CMS for Collaborative XML Databases Projects.
   Xavier-Laurent Salvador, Paris 13 University, France

_ SESSION II, 12:00 ___

1. BaseX – A Swiss Army Knife for Broadcast Subtitles.
   Andreas Tai, IRT, Munich

2. Maximilian Gärber, axxepta solutions GmbH, Lindau

3. Extending XQuery with User-Defined Datatypes.
   Rob Stapper; Borne, Netherlands

4. DITA For Small Teams: Implementing A Sophisticated Hyperdocument
Management Application using XQuery and BaseX.
  Eliot Kimber, Contrext, LLC. Austin, Texas, USA
__

You can find more information on Lanyrd and the XMLPrague conference site:

  http://lanyrd.com/2016/basex/
  http://xmlprague.cz/

Hope to see many of you soon,

Christian
BaseX Team, 2016


Re: [basex-talk] xquery:eval bug?

2016-01-19 Thread Marc van Grootel
And I can confirm that my code now also runs when MIXUPDATES=true

Although the code isn't meant to be shared yet as it's very much WIP
here's the example I"m running:
https://github.com/xokomola/origami-examples/blob/master/check/check-demo.xq

It's running all the Origami test cases via a custom built test
harness (tests are evaluated via xquery:eval).

--Marc

On Mon, Jan 18, 2016 at 1:51 PM, Christian Grün
 wrote:
> Hi Marc, hi Andy,
>
> Confirmed, it seems to be the MIXUPDATES option. Once again, I noticed
> it’s tricky to statically detect which dynamic function calls will
> perform updates. Obviously, in the given case, there was no updating
> code at all, so the error message was a bit misleading.
>
> Feedback on the MIXUPDATES option is always welcome. I have just
> uploaded a new snapshot [1].
>
> Christian
>
> [1] http://files.basex.org/releases/latest/
>
>
>
> On Mon, Jan 18, 2016 at 12:58 PM, Marc van Grootel
>  wrote:
>> Hi Christian,
>>
>> Yes, I think so. I think MIXUPDATES=true could be the difference. I almost 
>> forgot about these as I always run basex from a Gradle script which sets 
>> these [1]
>>
>> [1] 
>> https://github.com/theapsgroup/basex-gradle-starter/blob/master/gradle.properties
>>
>> -Original Message-
>> From: basex-talk-boun...@mailman.uni-konstanz.de 
>> [mailto:basex-talk-boun...@mailman.uni-konstanz.de] On Behalf Of Christian 
>> Grün
>> Sent: Monday, January 18, 2016 11:32 AM
>> To: Marc van Grootel 
>> Cc: BaseX 
>> Subject: Re: [basex-talk] xquery:eval bug?
>>
>> Hi Marc,
>>
>> It runs fine on my environment. Could you give me some more information on 
>> your set up (have you assigned any non-default options)?
>>
>> Christian
>>
>>
>> On Mon, Jan 18, 2016 at 10:07 AM, Marc van Grootel 
>>  wrote:
>>> Hi Christian,
>>>
>>> Seems to work fine with latest snapshot with some straightforward
>>> cases but I do get an error in some cases which I cannot understand.
>>> Though I appreciate that it may be difficult to support all types of
>>> dynamic calls.
>>>
>>> The error is: [bxerr:BXXQ0001] No updating expression allowed.
>>>
>>> I am not using updating expressions. I also tried this in my little
>>> test project and it runs against the same error. I haven't been able
>>> to pinpoint it yet as it happens deep in the bowels of the code. When
>>> I'm able to I will let you know.
>>>
>>> You can use a simple/small set of unit tests to verify [1]. I've
>>> %unit:ignored the last test that causes the error above.
>>>
>>> Cheers,
>>> --Marc
>>>
>>> [1]
>>> https://github.com/xokomola/origami-examples/blob/master/check/test-ev
>>> al.xqm
>>>
>>> On Fri, Jan 15, 2016 at 6:57 PM, Christian Grün
>>>  wrote:
 Hi Marc,

 This was a deliberate restriction: As maps and arrays are function
 items, and as they can contain references to other functions that
 have been declared in the evaluated query, it is generally tricky to
 evaluate and return them dynamically.

 However, I spent some more thoughts on the underlying semantics, and
 I may have found a solution that overcomes some of the earlier
 limitations.

 A new snapshot is available [1], which now allows you to return
 function items (incl. maps and arrays) as result of xquery:eval. Your
 testing feedback will be welcome.

 Christian

 [1] http://files.basex.org/releases/latest/



 On Thu, Jan 14, 2016 at 11:17 PM, Marc van Grootel
  wrote:
> Hi,
>
> I'm trying to return a map or an array from xquery:eval. Seems this
> is not possible, yet the signature says it returns item()*
>
> xquery:eval('1 + 1') => 2
> xquery:eval('[1,2]') => ERROR: [FOTY0014] Items of type array(*)
> have no string representation.
> xquery:eval('map { "x": 10 }') => ERROR: [FOTY0014] Items of
> type
> map(*) have no string representation.
>
> BTW: I saw that xquery:eval#3 is documented as returning item()
> while the other arities return item()*
>
> Tested on 8.3, haven't tested yet on 8.4beta but it's trivial to repro I 
> figure.
>
> --
> --Marc
>>>
>>>
>>>
>>> --
>>> --Marc
>>
>> __
>> This email has been scanned by the Symantec Email Security.cloud service.
>> For more information please visit http://www.symanteccloud.com 
>> __
>> '**
>> This E-mail and any files transmitted with it are private and confidential 
>> and are solely for the use of the addressee.  It may contain material which 
>> is legally privileged.  If you are not the addressee, be advised that you 
>> have received this E-mail in error and that any use of it is strictly 
>> prohibited.
>>
>> If you have received this E-mail in error, please notify APS on +44 (0)16

Re: [basex-talk] Embedding BaseX in Clojure web app, pointers needed

2016-01-19 Thread Marc van Grootel
Yes, Clojure has very good Java interop. I lean towards embedding too
as it gives much more control over BaseX and I want it to become an
integral part of the webapp.

On Tue, Jan 19, 2016 at 10:49 AM, Dirk Kirsten  wrote:
> Hello Marc,
>
> I have no idea how Clojure works (but would be very interested, but time
> is a scarce resource...), but according to
> https://clojuredocs.org/clojure.core/import you should be able to simply
> import Java classes/libraries. If this is possible it should be a simple
> process: Put the BaseX.jar into the library path and import the
> necessary classes (you can take a look at our Java examples in the wiki,
> should work the same).
>
> Well, if your pirgamm is not client/server oriented I would definitely
> try to embed BaseX. The main benefit of the BaseX Client/Server version
> is that you can access it with multiple processes at the same time. Of
> course, the client version is theoretically slower (it has to send stuff
> over sockets, It has to create/parse TCP packets and it might be a
> significant overhead to use TCP if you have a rather small query or
> result set. But this overhead could also be insignificant, if you don't
> have this and your client/server have a fast connection (i.e. on the
> same server or the same network).
>
> Cheers
> Dirk
>
> On 01/18/2016 11:49 PM, Marc van Grootel wrote:
>> Hi,
>>
>> I'm considering to write a web layer for BaseX based in Clojure. It
>> may be a somewhat longer term project but I would like to bring XML
>> and BaseX closer to Clojure programming. Clojure web apps usually are
>> able to run under various servers/containers (Jetty/Netty etc.) and I
>> would like to be able to use Clojure libraries to handle things like
>> request routing, security and authentication outside of BaseX/XQuery.
>>
>> Some questions that I have while I'm orienting myself. Some of it
>> touches on integration areas that are quite new to me so I am happy to
>> get some general pointers that I can use to dig further.
>>
>> For Clojure I found only one BaseX client library [1] which wraps the
>> standard Java TCP client and it seems to work fine.
>>
>> But I have some broader questions such as
>>
>> - Choosing between using the client or much more intimately embedding
>> BaseX as a library. The latter is probably much more complex but I'm
>> figuring this is the only way to get a good integration as the TCP
>> client is rather limited in functionality. But where to start? What
>> layers of the existing servlet integration to peel off, which ones to
>> keep. Is BaseXServer.java a good starting point?
>>
>> - Is the TCP client generally slower than via the Java API? A couple
>> of queries via clj-basex didn't impress me much qua speed (compared to
>> same query via the GUI).
>>
>> Any starting points or general considerations that could help me prune
>> the (re)search tree are very much appreciated.
>>
>>
>> --Marc
>>
>> [1] https://github.com/kouphax/clj-basex
>
> --
> 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 91 68 276, Fax: 0049 7531 20 05 22
>



-- 
--Marc


Re: [basex-talk] Streaming file loads

2016-01-19 Thread Etanchaud Fabrice
Hello Christophe,

Are you using java ?
Maybe you should have a look at  the add() method in :

https://github.com/BaseXdb/basex/blob/master/basex-examples/src/main/java/org/basex/examples/api/BaseXClient.java

I can also remember that command line tools can read standard input stream with 
the '-' argument.

Cordialement,

Fabrice Etanchaud
Horanet Smart Objects


-Message d'origine-
De : basex-talk-boun...@mailman.uni-konstanz.de 
[mailto:basex-talk-boun...@mailman.uni-konstanz.de] De la part de Christophe 
Marchand
Envoyé : mardi 19 janvier 2016 12:20
À : basex-talk@mailman.uni-konstanz.de
Objet : [basex-talk] Streaming file loads

Hello !

We have to load many files (>20.000), large size (>30Gb) into BaseX. 
Today, that's done vis a BXS script which accesses files thru a network share.

I would like to optimize network transfert ; tar / compression at source, 
uncompress / untar at destination. But I would like to avoid to create 
temporary files (at source, on NAS server, and on destination server, BaseX 
host).

So, is there an API which I could use to load a "file" thru a stream ? I think 
I can write an inputstream that redirects data to outpustreams, cutting input 
data in many output streams, one per file. But may I chain this outputstream to 
an inputstream usable by BaseX loader ?

Best regards,
Christophe


[basex-talk] Streaming file loads

2016-01-19 Thread Christophe Marchand

Hello !

We have to load many files (>20.000), large size (>30Gb) into BaseX. 
Today, that's done vis a BXS script which accesses files thru a network 
share.


I would like to optimize network transfert ; tar / compression at 
source, uncompress / untar at destination. But I would like to avoid to 
create temporary files (at source, on NAS server, and on destination 
server, BaseX host).


So, is there an API which I could use to load a "file" thru a stream ? I 
think I can write an inputstream that redirects data to outpustreams, 
cutting input data in many output streams, one per file. But may I chain 
this outputstream to an inputstream usable by BaseX loader ?


Best regards,
Christophe


Re: [basex-talk] Embedding BaseX in Clojure web app, pointers needed

2016-01-19 Thread Dirk Kirsten
Hello Marc,

I have no idea how Clojure works (but would be very interested, but time
is a scarce resource...), but according to
https://clojuredocs.org/clojure.core/import you should be able to simply
import Java classes/libraries. If this is possible it should be a simple
process: Put the BaseX.jar into the library path and import the
necessary classes (you can take a look at our Java examples in the wiki,
should work the same).

Well, if your pirgamm is not client/server oriented I would definitely
try to embed BaseX. The main benefit of the BaseX Client/Server version
is that you can access it with multiple processes at the same time. Of
course, the client version is theoretically slower (it has to send stuff
over sockets, It has to create/parse TCP packets and it might be a
significant overhead to use TCP if you have a rather small query or
result set. But this overhead could also be insignificant, if you don't
have this and your client/server have a fast connection (i.e. on the
same server or the same network).

Cheers
Dirk

On 01/18/2016 11:49 PM, Marc van Grootel wrote:
> Hi,
>
> I'm considering to write a web layer for BaseX based in Clojure. It
> may be a somewhat longer term project but I would like to bring XML
> and BaseX closer to Clojure programming. Clojure web apps usually are
> able to run under various servers/containers (Jetty/Netty etc.) and I
> would like to be able to use Clojure libraries to handle things like
> request routing, security and authentication outside of BaseX/XQuery.
>
> Some questions that I have while I'm orienting myself. Some of it
> touches on integration areas that are quite new to me so I am happy to
> get some general pointers that I can use to dig further.
>
> For Clojure I found only one BaseX client library [1] which wraps the
> standard Java TCP client and it seems to work fine.
>
> But I have some broader questions such as
>
> - Choosing between using the client or much more intimately embedding
> BaseX as a library. The latter is probably much more complex but I'm
> figuring this is the only way to get a good integration as the TCP
> client is rather limited in functionality. But where to start? What
> layers of the existing servlet integration to peel off, which ones to
> keep. Is BaseXServer.java a good starting point?
>
> - Is the TCP client generally slower than via the Java API? A couple
> of queries via clj-basex didn't impress me much qua speed (compared to
> same query via the GUI).
>
> Any starting points or general considerations that could help me prune
> the (re)search tree are very much appreciated.
>
>
> --Marc
>
> [1] https://github.com/kouphax/clj-basex

-- 
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 91 68 276, Fax: 0049 7531 20 05 22