[basex-talk] INFO and dp:system() show different values

2018-01-29 Thread Lars Johnsen
Hi all when restarting a http-server, the script for accessing no longer finds the databases using db:open(). The path to the database using INFO in command line basex says one thing, while output from db:system() is different db:system() .../basex-webapp/webapp/WEB-INF/data INFO:

Re: [basex-talk] Xquery recursion and db:add() - stack overflow

2016-05-12 Thread Lars Johnsen
> query before (in this case I used the date). This will output a sequence of > the map entries and in a subsequent step you could return only the actual > result values. > > Best regards, Dirk > > On 05/12/2016 12:55 PM, Lars Johnsen wrote: > > Thanks Johan and Matti for useful

Re: [basex-talk] Xquery recursion and db:add() - stack overflow

2016-05-12 Thread Lars Johnsen
Thanks Johan and Matti for useful suggestions. Cutting down on the chunks seems to be a viable alternative. It would have been nice, though, to have a robust harvester in XQuery that could take on anything, although the recursive version works fine as long as the dataset consist of a couple of

Re: [basex-talk] Xquery recursion and db:add() - stack overflow

2016-05-11 Thread Lars Johnsen
by passing the parameter -Xss2m to the JVM? > > Cheers > Dirk > > > On 05/11/2016 01:43 PM, Lars Johnsen wrote: > > The following code generates the error "Stack Overflow: try tail > recursion?" > > The code reads in bibliographic data using OAI-PM

[basex-talk] Xquery recursion and db:add() - stack overflow

2016-05-11 Thread Lars Johnsen
The following code generates the error "Stack Overflow: try tail recursion?" The code reads in bibliographic data using OAI-PMH and updates a database for each chunk of data. With OAI-PMH, only part of the data is available for each request, so the server returns a resumption token if there are

[basex-talk] Symlinked files with RESTXQ

2016-04-07 Thread Lars Johnsen
Dear all What must be done to access symlinked files when using BaseX as http server? The scenario is that a fairly large collection of audio-files are accessed using BaseX which serves them up over http. However, it seems that symlinking (the folder with audio files exists as a symlinked copy

Re: [basex-talk] ft:mark

2015-07-05 Thread Lars Johnsen
looking for revised versions ;) Christian On Thu, Jul 2, 2015 at 6:13 PM, Lars Johnsen yoon...@gmail.com wrote: The full text function ft:mark() puts a mark around each of the words that occur in a match, starting from the first matching word to the last, including stop words, except

[basex-talk] ft:mark

2015-07-02 Thread Lars Johnsen
The full text function ft:mark() puts a mark around each of the words that occur in a match, starting from the first matching word to the last, including stop words, except for punctuation characters. Is it possible to check for the kind of characters (or strings) that ft:mark() will skip when

Re: [basex-talk] Potential Bug - message from fulltext

2015-06-30 Thread Lars Johnsen
at 12:50 PM, Lars Johnsen yoon...@gmail.com wrote: When trying to to a full text index on a collection of texts, the process runs for a couple of hours with the exit message below - I think it is near completed. From the GUI, I have at least seen the progress bar get to around 80 %, so I

[basex-talk] Potential Bug - message from fulltext

2015-06-27 Thread Lars Johnsen
When trying to to a full text index on a collection of texts, the process runs for a couple of hours with the exit message below - I think it is near completed. From the GUI, I have at least seen the progress bar get to around 80 %, so I think it is safe to assume that the error is connectedt the

Re: [basex-talk] rest vs. restxq - strange difference

2015-05-20 Thread Lars Johnsen
PM, Lars Johnsen yoon...@gmail.com wrote: A last update, which may illuminate a little. After reindexing the database using Norwegian (snowball), stemming, and keeping diacritis, RESTXQ processes neither the special characters (treats them as closest ascii), nor inflected forms

Re: [basex-talk] rest vs. restxq - strange difference

2015-05-18 Thread Lars Johnsen
. 2015-05-18 15:07 GMT+02:00 Lars Johnsen yoon...@gmail.com: The full text query is blisteringly fast for both, the text index query is fast only for REST queries and seems not to be used with queries in RESTXQ. I am rebuilding the whole database now to see how it goes, and will restart

Re: [basex-talk] rest vs. restxq - strange difference

2015-05-18 Thread Lars Johnsen
in both cases. Could it be that within RESTXQ the full text index is treated differently? I will work closer on a self contained example, but thought this might point to something. Cheers Lars 2015-05-18 13:44 GMT+02:00 Lars Johnsen yoon...@gmail.com: Hi

Re: [basex-talk] rest vs. restxq - strange difference

2015-05-18 Thread Lars Johnsen
contained example, but thought this might point to something. Cheers Lars 2015-05-18 13:44 GMT+02:00 Lars Johnsen yoon...@gmail.com: Hi Christian - and thanks for fast response. Latest version 8.11 is in use (same behaviour as previous). Let me see if I can make a self contained example. best

Re: [basex-talk] rest vs. restxq - strange difference

2015-05-18 Thread Lars Johnsen
this might point to something. Cheers Lars 2015-05-18 13:44 GMT+02:00 Lars Johnsen yoon...@gmail.com: Hi Christian - and thanks for fast response. Latest version 8.11 is in use (same behaviour as previous). Let me see if I can make a self contained example. best, Lars

Re: [basex-talk] rest vs. restxq - strange difference

2015-05-18 Thread Lars Johnsen
, present tense), result in no output, while using the naked stems mann and spaser the full result is displayed. In contrast to REST which behaves as expected. Cheers Lars 2015-05-18 15:28 GMT+02:00 Lars Johnsen yoon...@gmail.com: As an update, after rebuilding database with text index, full

Re: [basex-talk] rest vs. restxq - strange difference

2015-05-18 Thread Lars Johnsen
is that this sounds unusual, so I'm coming up with my standard questions: Do you think you could build us a little example that allows us to reproduce the problem? Have you tried the latest version of BaseX? Best, Christian On Mon, May 18, 2015 at 1:35 PM, Lars Johnsen yoon...@gmail.com wrote

Re: [basex-talk] memory usage when writing files

2015-03-27 Thread Lars Johnsen
you single XML documents. Does this help? Christian [1] http://docs.basex.org/wiki/Fetch_Module#fetch:xml On Fri, Mar 27, 2015 at 10:41 AM, Lars Johnsen yoon...@gmail.com wrote: Hi all Here is code that gradually eats up memory, whether run in GUI or as command. All it does

[basex-talk] memory usage when writing files

2015-03-27 Thread Lars Johnsen
Hi all Here is code that gradually eats up memory, whether run in GUI or as command. All it does is creating temporary collections out of folders, and writing them to file. Is there a simple way to avoid this code to eat up memory? It runs out of memory (set at 12GB for command, 18GB in GUI)

Re: [basex-talk] Error?

2015-03-12 Thread Lars Johnsen
An attempt with a brand new family of colon-infected folders (not databases), works nicely now withthe new snapshot. While the same commands in the old version still generated the FODC0002 error: So both of these worked nicely in the new snapshot (strings refers to files and folders - not

Re: [basex-talk] Error?

2015-03-12 Thread Lars Johnsen
10, 2015 at 6:23 PM, Lars Johnsen yoon...@gmail.com wrote: Hi all I have a database collection which gives a strange error message '[FODC0002] (Line 1): Content is not allowed in prolog.' on this query: for $x in collection('samtiden') return doc(document-uri($x

[basex-talk] Error?

2015-03-10 Thread Lars Johnsen
Hi all I have a database collection which gives a strange error message '[FODC0002] (Line 1): Content is not allowed in prolog.' on this query: for $x in collection('samtiden') return doc(document-uri($x)) The results from document-uri($x) are as expected, but doc(document-uri($x))

[basex-talk] Invoking database update from RESTXQ

2015-03-03 Thread Lars Johnsen
Hello all I was wondering how to perform database updating, like db:add, in RESTXQ, since the adding and updating functions throw errors when invoked inside functions defined in RESTXQ-modules. Have been trying to use the forward mechanism, transferring the data to a script without functions,

Re: [basex-talk] RESTXQ and access blocking

2015-01-14 Thread Lars Johnsen
, Dirk On 01/14/2015 03:49 PM, Lars Johnsen wrote: Hi all I was wondering how to block general access to BaseX when using RESTXQ. Our javascript/jquery web-application communicates with BaseX using commands like: $('#myobject').load('objects') where the term 'objects' is defined

[basex-talk] RESTXQ and access blocking

2015-01-14 Thread Lars Johnsen
Hi all I was wondering how to block general access to BaseX when using RESTXQ. Our javascript/jquery web-application communicates with BaseX using commands like: $('#myobject').load('objects') where the term 'objects' is defined as a path in a .xqm-file. declare %rest:path(/objects)

Re: [basex-talk] deduplication problem in BaseX 7.9?

2014-09-27 Thread Lars Johnsen
Hi Michael - I got the same results with my 7.9 version. What is a bit surprising (hopefully I am not introducing any noise into your problem) is that if the last child step is cut off the paths and added to the path variables within the return query, the result becomes 4 4 4 4 4. So each $pathN

Re: [basex-talk] RestXQ and file paths

2014-09-02 Thread Lars Johnsen
Hi Christian Thanks - that solved it! Best, Lars 2014-09-02 17:48 GMT+02:00 Christian GrĂ¼n christian.gr...@gmail.com: Hi Lars, the relative URL static/logo.png will be rewritten by your browser to the destination URL. If your URL is e.g http://localhost:1234/show/xyz ...then

[basex-talk] Downloading files

2014-08-21 Thread Lars Johnsen
I am using BaseX restxq for accessing a repository from a web browser. Uploading files works smoothly, but I can't see how to make a download button work. For uploading, the recipie on the restxq help page was enough to get it to work. Is there a corresponding way for making downloading work? What

Re: [basex-talk] Downloading files

2014-08-21 Thread Lars Johnsen
={$method}/ /output:serialization-parameters http:response http:header name=Content-Disposition value='attachment;filename={$filename}'/ /http:response /restxq:response }; /Andy On 21 August 2014 15:40, Lars Johnsen yoon...@gmail.com wrote: I came a little closer

[basex-talk] Basex 404

2014-06-16 Thread Lars Johnsen
I've recently run into a problem with basexserver/basexhttp. The host:8984 responds but seems to have lost contact with the webapp directory. Here is what is happening on 3 out of 5 installations (on linux - installed by unpacking the latest ziparchive), where one used to work as expected: 1)

[basex-talk] Traling empty nodes in csv:serialize

2014-03-22 Thread Lars Johnsen
Hi all I have a question about csv:serialize and blank nodes. Trailing blanks are indicated with a separator, but those in the middle are. csv:serialize( rows row f1/f s2/s t3/t/row row f/f s/s t3/t/row row f1/f s/s t3/t/row row f1/f s/s t/t/row

Re: [basex-talk] Revisiting XMLPrague

2014-02-18 Thread Lars Johnsen
...@gmail.com: Dear subscribers, it was great to meet some of you live in Prague! And once again I would like to thank all our speakers (Lars Johnsen, Gerrit Imsieke, Yoann Maingon, Jean-Marc Mercier and Michael Sperberg-McQueen) for making the user meeting to a memorable event! Have fun with BaseX 7.8

[basex-talk] Parameter to xquery

2014-01-30 Thread Lars Johnsen
Is it possible to pass parameters to xquery modules using BaseX scripting language? I tried something similar to to http-specification but had no luck. For example, if the code below is stored as add.xq, could $x and $y be supplied in a RUN add.xq command? declare variable $x external; declare

[basex-talk] html and css

2014-01-30 Thread Lars Johnsen
When running BaseX http-server, I wondered where resources like javascript and css should be located. The .xqm-file for the welcome RESTXQ module seems to fetch its svg and css from a static directory under webapp. However, when sending HTML code from within a home made query, it won't connect to

[basex-talk] csv-parser

2013-12-04 Thread Lars Johnsen
Hi all When importing CSV files, it seems that BaseX is parsing fields for balanced bracketing and quotes (a single quote or bracket causes trouble). Is it possible to turn that off, so that files are processed based only on delimiter? I couldn't find any information in the documentation. All

Re: [basex-talk] csv-parser

2013-12-04 Thread Lars Johnsen
Fabulous, that fixed it! The lines with a single quote in them are fine, as well as those with a single left parenthesis (. The data come from a SQL database with human entered data in freetext fields, so things aren't always in balance. The new file browser with the editor is nice too! Best,

[basex-talk] Results from ft:extract()

2013-12-02 Thread Lars Johnsen
Hello all When using ft:extract() on nodes, it seems to clip into the match itself too often. Is it possible to have ft:extract() leave as much before the match as after? For example, here are two results for spise lunsj (= eat lunch (language is Norwegian)) the first is as it should be, while

[basex-talk] HTML serialization error

2013-11-27 Thread Lars Johnsen
When converting files from xml to html, there appeared a serialization error saying something to the effect that x84 was an illegal html character. The files were written using file:write with parameter $params defined as: let $params := output:serialization-parametersoutput:method value=html//

Re: [basex-talk] HTML serialization error

2013-11-27 Thread Lars Johnsen
Hi Christian and thanks for the quick solution! Do you have some idea how the x84 byte was stored into the database? Each file is a digitized book, where the bytes comes stem the OCR-process. The words themselves are stored as values of attributes, for example STRING CONTENT=word. All the

[basex-talk] BaseX rest and PHP

2013-11-12 Thread Lars Johnsen
Hi all This is a question for those with experience using PHP with BaseX and the rest interface. There is a peculiar case of lag for queries, and I wondered if it had to with how PHPdoes things, or if it is how BaseX does things (or if there is something else). This may be a long shot, but I

[basex-talk] OAI-PMH

2013-10-17 Thread Lars Johnsen
Hello all I am looking into the possibility of using BaseX as an OAI-PMH metadata provider and harvester, and wondered if anyone has experience with it for this purpose. Specifically using BaseX as a repository with the http-service with xquery scripts for accessing and providing metadata

[basex-talk] problem with basexhttp

2013-10-14 Thread Lars Johnsen
BaseX is installed by administrators on one of our server machines. When starting the http server, the followng message is displayed: $ ./basexhttp /basex/bin/src/main/webapp/WEB-INF/web.xml not found. which is a bit strange since the webapp folder is a sister folder to the bin folder. So