Re: [basex-talk] XML import issue (header related)

2017-09-06 Thread Ron Katriel
Hi Michael, The solution you suggested works great. I created the database manually using the "SET STRIPNS true" command line option. Thanks! Ron On September 4, 2017 at 12:32:10 PM, Michael Seiferle (m...@basex.org) wrote: Hi Ron, Adding another opinion the board (I meant to write this alread

Re: [basex-talk] XML import issue (header related)

2017-09-04 Thread Michael Seiferle
Hi Ron, Adding another opinion the board (I meant to write this already on Saturday) ;-) I don’t think there is much to optimize w.r.t. to the XQuery update solution, as your whole database will be held in memory during the update… YET: if you do not care for the namespaces you could still strip

Re: [basex-talk] XML import issue (header related)

2017-09-01 Thread Ron Katriel
Hi Kendall, Following up, the solution below (stripping the namespaces) worked well on the toy example I shared, but it does not scale well with the size of the database. I needed up getting the following     Error: Out of Main Memory. This is despite providing BaseX with 8 GB of memory (BASEX

Re: [basex-talk] XML import issue (header related)

2017-09-01 Thread Ron Katriel
Hi Kendall, Yes, your solution works too (see query below). Really appreciate your help! Best, Ron declare namespace e = "http://example.com";; declare function e:strip-namespaces($node as node()) as node() {    typeswitch ($node)    case $node as document-node() return document { $node/node(

Re: [basex-talk] XML import issue (header related)

2017-09-01 Thread Ron Katriel
Kendall/Alex, Adding the default namespace solved the issue (see the modified query below). The output indeed has the namespace http://www.drugbank.ca";>   Lepirudin   Direct thrombin inhibitors   ANTITHROMBOTIC AGENTS   ANTITHROMBOTIC AGENTS   BLOOD AND BLOOD FORMING ORGANS However, this is n

Re: [basex-talk] XML import issue (header related)

2017-09-01 Thread Kendall Shaw
I think my mail client altered my post to move ‘.’ characters to the end of what it thinks is a sentence. This: e:strip-namespaces(). Is supposed to be this: e:strip-namespaces(.)

Re: [basex-talk] XML import issue (header related)

2017-09-01 Thread Kendall Shaw
On 9/1/17, 1:04 PM, "basex-talk-boun...@mailman.uni-konstanz.de on behalf of Martin Honnen" wrote: On 01.09.2017 22:01, Alexander Holupirek wrote: >> On 1. Sep 2017, at 19:41, Ron Katriel wrote: >> Is there a way simpler way around this - other than modifying the input header to re

Re: [basex-talk] XML import issue (header related)

2017-09-01 Thread Martin Honnen
On 01.09.2017 22:01, Alexander Holupirek wrote: On 1. Sep 2017, at 19:41, Ron Katriel wrote: Is there a way simpler way around this - other than modifying the input header to remove the namespace declaration? declaring a default element in your XQuery might help? ```xquery declare default e

Re: [basex-talk] XML import issue (header related)

2017-09-01 Thread Alexander Holupirek
> On 1. Sep 2017, at 19:41, Ron Katriel wrote: > Is there a way simpler way around this - other than modifying the input > header to remove the namespace declaration? Hi Ron, declaring a default element in your XQuery might help? ```xquery declare default element namespace "http://www.drugbank

Re: [basex-talk] XML import issue (header related)

2017-09-01 Thread Martin Honnen
On 01.09.2017 19:41, Ron Katriel wrote: Thanks Martin. Below is the modified query with the namespace specification and usage. It works but is cumbersome. Is there a way simpler way around this - other than modifying the input header to remove the namespace declaration? I don't think you can

Re: [basex-talk] XML import issue (header related)

2017-09-01 Thread Ron Katriel
Thanks Martin. Below is the modified query with the namespace specification and usage. It works but is cumbersome. Is there a way simpler way around this - other than modifying the input header to remove the namespace declaration? Thanks, Ron declare namespace xs="http://www.drugbank.ca";; f

Re: [basex-talk] XML import issue (header related)

2017-09-01 Thread Martin Honnen
On 01.09.2017 18:03, Ron Katriel wrote: The attached 4 files that should let you reproduce the issue. The XML files are the minimal imports (fail, work) and the XQ files are the queries (fail, work). Below is the output from the query that works. The one that fails returns nothing. It appear

Re: [basex-talk] XML import issue (header related)

2017-09-01 Thread Ron Katriel
Hi Alexander, The attached 4 files that should let you reproduce the issue. The XML files are the minimal imports (fail, work) and the XQ files are the queries (fail, work). Below is the output from the query that works. The one that fails returns nothing. Thanks, Ron   Lepirudin   Direct t

Re: [basex-talk] XML import issue (header related)

2017-09-01 Thread Alexander Holupirek
> On 1. Sep 2017, at 17:06, Ron Katriel wrote: > > Hi, > > I ran into a peculiar issue with importing an XML file from DrugBank into > BaseX. It involves the file header, which looks like this: > > > http://www.drugbank.ca"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xsi:sc

[basex-talk] XML import issue (header related)

2017-09-01 Thread Ron Katriel
Hi, I ran into a peculiar issue with importing an XML file from DrugBank into BaseX. It involves the file header, which looks like this: http://www.drugbank.ca"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.drugbank.ca http://www.drugbank.ca/docs/drug