Re: [basex-talk] Text index requires `/text()` in query

2022-04-29 Thread Christian Grün
Hi Matthew, If you run your query on the following document … 123 456 … and if you look into the Info View in the GUI, you will notice that the index will be utilized: Optimized Query: db:text("data", "DatabaseName")/parent::id/parent::element The query optimizer detects that all “data/e

Re: [basex-talk] Date picture and xslt:transform()

2022-04-29 Thread Christian Grün
Hi Daniel, What do you get if you invoke xslt:processor() ? If it’s "Saxon EE", you should get "29. März 2022" as result of your query (at least that’s what I get). If it’s something else, it indicates that Saxon EE has not correctly been embedded in your Java classpath (see [1] for further infor

Re: [basex-talk] Performance of ft:search function

2022-04-27 Thread Christian Grün
> > 2. Direct lookup against subindex > Time: 3.3ms > Expression: ft:search($index, $text)/../.. > > 3. Lookup against subindex file with reference to large index > Time: 2.9ms > Expression: > let $s := > ft:search($index, $text)/../.. > return db:open-id($db, $s/id)/../.. > > My question is: why

Re: [basex-talk] Stemming in BaseX Full-Text

2022-04-27 Thread Christian Grün
> "men" is stemmed to both "man" and "cocksman"--shaking my head on that one! Reads like a subversive Easter egg :·) Thanks for the efforts, Tim. The results (memorandum → memo, others) indicate to me that a dictionary-based solution has been chosen by Bitext. I have decided to enhance our Port

Re: [basex-talk] Using error and catch for error paths in REST API endpoint code

2022-04-27 Thread Christian Grün
Hi Omar, > > I am hopeful that #[2063] will greatly reduce locking issues. > I will try my "worst case" Data with my API with new BaseX release. I > will post any changes I see. Good to hear! Please note, however, that static and dynamic compilation (#2063) has not been finalized yet, but it wil

Re: [basex-talk] Integers as attribute values

2022-04-27 Thread Christian Grün
> > This is also not guaranteed. You can, however, write, > > [if (. castable as xs:integer) then (. = 21) else false() ] > True; thanks, Liam. In BaseX, specifically, sequential evaluation is guaranteed for all three variants (if; and; multiple predicates).

Re: [basex-talk] Integers as attribute values

2022-04-26 Thread Christian Grün
Hi Giuseppe, Is this due to the fact that BaseX tries to convert the values of @n of all > div elements into a number and, if it happens that the @n values returned > are all numbers, then an error is not raised (the comparison is then > possible), otherwise it is? Is this BaseX specific? Thanks.

[basex-talk] BaseX 9.7.1: Tweaks, Fixes, Features

2022-04-26 Thread Christian Grün
Dear all, We provide you with a new version of BaseX, our open source XML framework, database system and XQuery 3.1 processor. Apart from performance tweaks and bug fixes, it comes with the following enhancements [1,2]: • Backups: support for comments added • RESTXQ: improved caching for unmodifi

Re: [basex-talk] Using error and catch for error paths in REST API endpoint code

2022-04-25 Thread Christian Grün
> > Although this can run into issues like #[1194]. For example trying to do > all modules... > > (: hack to scrape module names from github :) > let $mods:=fetch:xml(" > https://github.com/acdh-oeaw/vleserver_basex/tree/main/vleserver > ",map{"parser":"html"}) > //a[@data-pjax="#repo-content-pjax

Re: [basex-talk] Free Text - understanding

2022-04-25 Thread Christian Grün
Hi Hans-Jürgen, PS: I think there is a bug concerning "different sentence": > > basex "'base.x' contains text 'base x' same sentence" > false > > basex "'base.x' contains text 'base x' different sentence" > false > After some intents, I decided to stick with the current solution, as I believe it’

Re: [basex-talk] Using error and catch for error paths in REST API endpoint code

2022-04-24 Thread Christian Grün
e" in this case > because "changes.xqm" should not be able to see what is imported by > "data/changes.xqm" > The variables are defined in different scopes. Saxon XQuery runs with no > error. > > /Andy > > [2091] https://github.com/BaseXdb/basex/issues/

Re: [basex-talk] Using error and catch for error paths in REST API endpoint code

2022-04-23 Thread Christian Grün
Hi Andy, > (: hack to scrape module names from github :) > let $mods:=fetch:xml(" > https://github.com/acdh-oeaw/vleserver_basex/tree/main/vleserver > ",map{"parser":"html"}) > //a[@data-pjax="#repo-content-pjax-container"][ends-with(.,".xqm")] > /concat("https://raw.githubusercontent.com",repla

Re: [basex-talk] Interrupted queries - partial results?

2022-04-21 Thread Christian Grün
://files.basex.org/releases/latest-10/ On Wed, Apr 20, 2022 at 9:58 AM Christian Grün wrote: > > > > Is it possible to capture partial results from an interrupted query? > > Thanks for the suggestion, Patrick; it’s not the first time we got this > request. > > If you use BaseX on co

Re: [basex-talk] Interrupted queries - partial results?

2022-04-20 Thread Christian Grün
> > Is it possible to capture partial results from an interrupted query? Thanks for the suggestion, Patrick; it’s not the first time we got this request. If you use BaseX on command line, results will be returned as soon as they are available. In the GUI, all results are cached before they are pr

Re: [basex-talk] Improving the understanding for counting of entries in data groups

2022-04-19 Thread Christian Grün
If the following result is the one you would expect … topic_combination|incidence Test1*Test2*Test3|3 Demo1*Demo2|2 Probe1|1 … it is sufficient to replace … > let $incidence := count($topics) … by … let $incidence := count($x) The string join yields a single item, which is assigned to $topi

Re: [basex-talk] Joining a varying number of information sources (with XQuery)?

2022-04-19 Thread Christian Grün
> An example application was published already with the XQuery 3.1 specification > for the combination of information from three documents. > https://www.w3.org/TR/2017/REC-xquery-31-20170321/#id-joins I have seen this link. I was asking for your personal uses case or examples, and I think this is

Re: [basex-talk] Joining a varying number of information sources (with XQuery)?

2022-04-19 Thread Christian Grün
Hi Markus, Could you please get specific and provide real use cases and examples? Thanks, Christian On Tue, Apr 19, 2022 at 10:46 AM Markus Elfring wrote: > > > > I propose once more to take another look at specification efforts for > > > join conditions (or constraints). > > > > What specific

Re: [basex-talk] Free Text - understanding

2022-04-14 Thread Christian Grün
Hi Hans-Jürgen, > it would be kind if you could check my understanding of Free Text @ BaseX. You mean Full Text? > (1) Tokenization ignores element borders. You could say so. Before tokenization, a node that’s to be tokenized will be atomized, similar to when you apply fn:data to it. For exampl

Re: [basex-talk] Stemming in BaseX Full-Text

2022-04-14 Thread Christian Grün
Dear Tim, It’s exactly how Bridger said: The Porter algorithm is one of the fastest available, but it doesn’t provide support for various edge cases, including words, however, that are very common, such as (wo)?m(a|e)n, child(ren)? or t(oo|ee)th. We could switch to a more advanced solution. I ass

Re: [basex-talk] CVE-2022-22965: Spring framework 0-day remote code execution vulnerability

2022-04-14 Thread Christian Grün
Dear Gilles, Thanks for writing to the list. BaseX does not use Spring, so you’ll be fine. Best, Christian On Wed, Apr 13, 2022 at 5:02 PM Bülow, Gilles wrote: > Hi all, > > to exclude issues with BaseX and the topic in this email-subject > (CVE-2022-22965: > Spring framework 0-day remote co

Re: [basex-talk] Closing a socketconnection

2022-04-14 Thread Christian Grün
Hi Ben, The exit command shouldn’t be required (but my knowledge on C is limited and I haven’t checked the implementation in more detail). Best, Christian On Wed, Apr 13, 2022 at 3:54 PM Ben Engbers wrote: > > Hi, > > While reading the basexdbc.c code from Alexander Holupirek, I saw that > he

Re: [basex-talk] Basexgui Feature suggestion

2022-04-11 Thread Christian Grün
oXygen) > > On 11.04.2022 08:37, Christian Grün wrote: > > Thanks, Andy for fishing out the old issue on this; I remember you’ve > > once come up with a similar proposal. > > > > We’re indeed using the standard Swing component for the tabs, and it’s > > alwa

Re: [basex-talk] Checking the display of line breaks in the info view

2022-04-11 Thread Christian Grün
Maybe we should drop the shrinked representation of the original query string from the Info View (and the command-line output) as it seems to be confusing. In most cases, it’s redundant anyway. On Sun, Apr 10, 2022 at 8:45 PM Markus Elfring wrote: > > > What do you mean with space character? >

Re: [basex-talk] Basexgui Feature suggestion

2022-04-11 Thread Christian Grün
> > BTW: Here’s what I get with 9.7 on my Mac (OS v11.6.4), selecting an .xml > file. > I see. The menu item for setting the context had not been embedded in the search panel yet. Things have changed [1]. Best, Christian [1] https://files.basex.org/releases/latest/

Re: [basex-talk] Checking the display of line breaks in the info view

2022-04-10 Thread Christian Grün
> > I find the shown query display improvable. > Feel free ;)

Re: [basex-talk] Checking the display of line breaks in the info view

2022-04-10 Thread Christian Grün
Hi Markus, May I expect that original line breaks will be preserved in the shown query > display? > Yes, you can. is just another notation for the newline character. You can see that in the result view. Best, Christian

Re: [basex-talk] html document retrieval runs out of main memory

2022-04-08 Thread Christian Grün
> > Which leads to "is there a way to get the type of an item?" > You can use inspect:type for that [1]. Hope this helps Christian [1] https://docs.basex.org/wiki/Inspection_Module#inspect:type

Re: [basex-talk] Basexgui Feature suggestion

2022-04-08 Thread Christian Grün
Hi Steven, Thanks to Hans-Jürgen, the "Set as context" menu item was introduced just recently. And thanks to Tamara: Creating intermediate databases is exactly what I do, too. If the query output is a valid XML document, it can also be stored by clicking on the “Save” icon in the result view pane

Re: [basex-talk] html document retrieval runs out of main memory

2022-04-08 Thread Christian Grün
Hi Graydon, Maybe it’s TagSoup that has problems to convert some specific HTML files to XML. Did you try to write the responses to disk and parse them in a second step? If your input data is not confidential, could you possibly provide us with an example that runs out of the box? Best, Christian

Re: [basex-talk] I would like to share some code I use for easier RestXQ development

2022-04-08 Thread Christian Grün
Hi Omar, Thanks for the kudos, and for sharing all the details on your experiences with BaseX. I hope I’ll find some more time to analyze your use case more closely soon. Christian On Wed, Apr 6, 2022 at 6:40 PM Omar Siam wrote: > > Hi list, > > I am using BaseX here at my institution a lot a

Re: [basex-talk] Support for format “XQuery” by CSV parser configuration?

2022-04-08 Thread Christian Grün
> I would like to create another database from a CSV file with the software > “BaseX 9.7”. > It seems that I can not choose the format option “XQuery” on the tab “Parsing” > of the dialogue “Create Database”. > https://docs.basex.org/wiki/CSV_Module#Conversion The 'xquery' format converts a CSV s

Re: [basex-talk] Reversal of Hebrew?

2022-04-08 Thread Christian Grün
Hi Patrick, Unfortunately, RTL (right-to-left) languages (Arabic, Hebrew, Persian, others) are only poorly supported by BaseX. Various years ago, Masoumeh Seydi from Iran helped us to improve BaseX GUI support for Farsi. Back then, I came to know that most text editors, including MS Office, regula

Re: [basex-talk] Incompatibility with Tomcat 10

2022-04-05 Thread Christian Grün
[1] https://tomcat.apache.org/ On Tue, Apr 5, 2022 at 6:47 PM Christian Grün wrote: > > Hi Marc, > > Thanks for testing and the StackOverflow links. > > I think you’ve already discovered the weak spot, which is also > documented in the Tomcat Migration Guide [1]: The jav

Re: [basex-talk] Incompatibility with Tomcat 10

2022-04-05 Thread Christian Grün
On Tomcat 10.0.2 I couldn't get either BaseX 9.5 or 9.7 to work (same issue). > > I now have Tomcat 9.0.62 running and I've successfully run both BaseX 9.5 and > 9.7. > > Regards > Marc > > > On Monday, 4 April 2022, 12:26:32 BST, Christian Grün > wrote: &g

Re: [basex-talk] Enclosing strings by double quotes for CSV data output

2022-04-05 Thread Christian Grün
Thanks a lot for the example, Markus. No quotes will be added, as your delimiter does not occur in the text value. The result can successfully be imported in spreadsheet applications without quotes. The quotes will be added if the delimiter occurs in the texts: declare option output:method 'csv'

Re: [basex-talk] Update on latest version: Re: copy-paste, can't copy in BaseX and then paste into Emacs (Debian)

2022-04-04 Thread Christian Grün
> The Editor window, and Result page, the content from a prior > copy-n-paste in the top line appears. Oops; paste operations in the result view (and all other read-only components) are definitely illegal. That has been fixed, and I have further aligned the behavior of the two component types [1].

Re: [basex-talk] Enclosing strings by double quotes for CSV data output

2022-04-04 Thread Christian Grün
> I did not observe text quotation during my software tests. See [1] for some instruction on how to create a reproducible example. Thanks in advance. [1] http://sscce.org/

Re: [basex-talk] Enclosing strings by double quotes for CSV data output

2022-04-04 Thread Christian Grün
> I would like to know a bit more about corresponding requirements. Sorry again, maybe someone else can you help here. I simply don’t understand what you want to express. > * Text Import Wizard by Microsoft Excel > > https://support.microsoft.com/en-gb/office/text-import-wizard-c5b02af6-fda1-4

Re: [basex-talk] copy-paste, can't copy in BaseX and then paste into Emacs (Debian)

2022-04-04 Thread Christian Grün
> I think we could try to extend the standard Swing > components (JTextField, etc.) to also support the middle mouse button; I have added middle mouse button support to single-line text fields [1], and I have revised the implementation for our custom text areas. I decided to either copy or paste t

Re: [basex-talk] Incompatibility with Tomcat 10

2022-04-04 Thread Christian Grün
Hi Marc, I remember there were problem with a past release of BaseX and Tomcat. Which version of BaseX are you using? Best, Christian On Sun, Apr 3, 2022 at 10:45 PM Marc Balston wrote: > > Hello, > > I've been successfully running BaseX on Amazon AWS using Tomcat 8.5, but I've > been lookin

Re: [basex-talk] Enclosing strings by double quotes for CSV data output

2022-04-04 Thread Christian Grün
> Examples: > * LibreOffice Calc > * Microsoft Excel Double quotes are only required for parsing, they are not used to judge if the input is a string or number. A little example: 1;"1" If you save this one-liner as CSV file and open it with Excel, but values will be interpreted and formatted as

Re: [basex-talk] copy-paste, can't copy in BaseX and then paste into Emacs (Debian)

2022-04-04 Thread Christian Grün
Hi Bridger, > Glad that helped. I find myself working with Unix-like OS most of the time, > and I'm very accustomed to the XWindows "use the middle mouse button to copy > highlighted selection" behavior. I've noticed that some applications don't > support this behavior - BaseX GUI is one of the

Re: [basex-talk] Typo in basexgui.bat? since 9.6.4? Also in 9.7

2022-04-04 Thread Christian Grün
Hi Patrick, > basexgui fails with: "Windows cannot find 'javaw.' Make sure you typed > the name correctly, then try again." That’s good to know. We invoke "javaw" instead of "java” as it won’t open any ephemeral command line window. Can you tell which Java distribution is used in your Windows VM

Re: [basex-talk] Support for performing queries on query results

2022-04-04 Thread Christian Grün
> I am trying also to become more familiar with the capabilities of > the programming language “XQuery” (and corresponding software libraries). > > I achieved some data processing results together with mutable data structures. > Now I am looking more at the construction of data structures by the me

Re: [basex-talk] Enclosing strings by double quotes for CSV data output

2022-04-01 Thread Christian Grün
> I hope that such code can be avoided if the BaseX CSV module could be > adjusted accordingly. > https://docs.basex.org/wiki/CSV_Module#Options I wouldn’t completely factor out this option, but we definitely need to define more rules to nail this down. Just some examples: 1. Is there any specif

Re: [basex-talk] Support for performing queries on query results

2022-04-01 Thread Christian Grün
> I guess that it is expected that this kind of query result binding > would work only with XML data structures. You can bind arbitrary XQuery values to variables (XML, strings, numbers, binaries, maps, arrays, function items, and others). > Can any XQuery scripts be referenced by known file name

Re: [basex-talk] Enclosing strings by double quotes for CSV data output

2022-04-01 Thread Christian Grün
> > What about other data types (booleans, etc.)? > Further data type indications can eventually be omitted, can't they? A custom XQuery function may be the best option if you require a data-type specific output of CSV data. For further general information on CSV serialization and the handling of

Re: [basex-talk] Support for performing queries on query results

2022-04-01 Thread Christian Grün
> I would prefer to avoid the creation of another BaseX database > for each query result. Just fine as well. If you use XQuery, you can bind your query results to variables for further processing. > I guess that a popular use case is to count items also in XML data structures. > The computed numb

Re: [basex-talk] Enclosing strings by double quotes for CSV data output

2022-04-01 Thread Christian Grün
> I came along software applications which would need the usage of double quotes > for the distinction that provided data should be handled as text strings. So you would probably require all non-numeric values to be enclosed by quotes, no matter if it contains spaces? What about other data types (

Re: [basex-talk] Support for performing queries on query results

2022-04-01 Thread Christian Grün
Hi Markus, > XQuery scripts can be used also to compute values from selected XML data > structures. > Query results can be exported then into other file formats. > But I would like to reuse query results for further queries directly. One common approach is to create volatile database instances f

Re: [basex-talk] Enclosing strings by double quotes for CSV data output

2022-04-01 Thread Christian Grün
Hi Markus, > I observed data processing results where displayed columns contained space > characters. > I would expect that such data should be handled as text strings then. Double quotes in CSV files do not give any information on the data type of a value. Instead, they merely ensure that the d

Re: [basex-talk] keeping relative paths in the document-uri?

2022-03-31 Thread Christian Grün
Hi Graydon, It’s sufficient to supply the directory path as second argument: db:create('db', '/path') If you want to filter the input paths before passing them on to db:create, you can supply the paths as both inputs and database paths: let $files := file:descendants('/path') [file:is-file(

Re: [basex-talk] Add a comment to a backup?

2022-03-31 Thread Christian Grün
) wrote: > > It’s in ZipFile.getComment() > > https://docs.oracle.com/javase/8/docs/api/java/util/zip/ZipFile.html#getComment-- > > — Steve M. > > On Mar 30, 2022, at 12:17 PM, Christian Grün > wrote: > > I'm wondering if zip's `setComment` might be usef

Re: [basex-talk] Add a comment to a backup?

2022-03-30 Thread Christian Grün
> I'm wondering if zip's `setComment` might be useful here. Interesting hint. I have discovered the ZipOutputStream.setComment function. There doesn’t seem to be an equivalent ZipInputStream.getComment function, though. Maybe I overlooked something? > On Wed, Mar 30, 2022 at 1

Re: [basex-talk] Simple delete bug

2022-03-30 Thread Christian Grün
Hi Jonathan, > delete //m/@n This may be surprising, but your expression is a valid query: It’s a path expression starting with an initial child::delete step. Best, Christian

Re: [basex-talk] Add a comment to a backup?

2022-03-30 Thread Christian Grün
Hi Jonathan, Currently, it’s not possible to attach comments to backups. I’ll have some more thoughts on your feature request. Maybe we could add an info file in the zipped archive and partially unzip it when listing available backups. All the best, Christian On Wed, Mar 30, 2022 at 12:26 AM Jo

Re: [basex-talk] fn:count() performance

2022-03-29 Thread Christian Grün
Dear Josselin, The group by clause can be used to speed up repeated value lookups: declare default element namespace 'xpr' ; for $group in db:open('xpr')/xpr/expertises/expertise for $year in $group/description/sessions/ date[@when castable as xs:date]/year-from-date(@when) group by $year retu

Re: [basex-talk] attribute-range()

2022-03-29 Thread Christian Grün
Hi Johannes, Good catch! Support for the third function argument seems to have got lost recently. A new snapshot is available [1]. Best, Christian [1] https://files.basex.org/releases/latest/ On Tue, Mar 29, 2022 at 6:53 AM Johannes Bauer wrote: > > Hello, > > when I use the db:attribute-ran

Re: [basex-talk] BaseX for Newbies Tutorial

2022-03-28 Thread Christian Grün
Hi Tamara, Thanks for your excellent introduction to BaseX, very appreciated! I have added your primer in our documentation [1]. Next, I have uploaded a copy of it onto our server. Just tell us if you prefer us to reference your original URL. All the best, Christian [1] https://docs.basex.org/w

Re: [basex-talk] Storing maps in BaseX

2022-03-24 Thread Christian Grün
e this: > > > one > two > three > four > five > six > seven > eight > nine > ten > > > So I always use XML for this? There's no persistent representation of the > map data structure? > > Jonathan > > On Thu, Mar 24, 2022 at 2:

Re: [basex-talk] Storing maps in BaseX

2022-03-24 Thread Christian Grün
Hi Jonathan, You can create databases that contain key/value pairs: let $words := { for $i in 1 to 10 return { format-integer($i, 'w') } } return db:create('words', $words, 'words.xml') If you look up values in that database … for $n in (1 to 10) ! string() return db:open('words')//word[@n

Re: [basex-talk] Local deployment of a database

2022-03-24 Thread Christian Grün
> And for Windows and Mac, just tell them to install the databases from .zip > files or whatever? Right, that’s the easiest solution: You can simply add databases of your choice in our BaseX zip distribution. > On Thu, Mar 24, 2022 at 6:45 AM Christian Grün > wrote: >>

Re: [basex-talk] Local deployment of a database

2022-03-24 Thread Christian Grün
Hi Jonathan, hi Hans-Jürgen, If you are using our Windows installer, the NSIS installer configuration file could be enhanced to additionally copy database files to the target installation directory [1,2]. Does this help? Christian [1] https://nsis.sourceforge.io/ [2] https://github.com/BaseXdb/b

Re: [basex-talk] BaseX 9.7 • Ukraine Edition

2022-03-24 Thread Christian Grün
Dear Mohammed Reda, Thanks for your reply. I can only agree on what you are saying: We are all human. By focusing on the Ukrainian war, we didn’t want to trivialise any single other conflict in the world now and in the past. That’s one of the reasons why donating money to large NGOs like Médecin

[basex-talk] BaseX 9.7 • Ukraine Edition

2022-03-23 Thread Christian Grün
Dear all, Just next to us, millions of people are currently being torn out of their home country, and we desperately hope that the situation in Ukraine will calm down soon. For those of you who are planning to donate money to us in the upcoming weeks, we kindly ask you this time to redirect it to

Re: [basex-talk] GUI syntax highlighting

2022-03-23 Thread Christian Grün
Fixed [1]; thanks for the observation. All the best, Christian [1] https://files.basex.org/releases/latest/ > The syntax highlighting doesn't change when changing the look and feel in > the BaseX GUI (9.6.2). I noticed this also happens in earlier versions. > After changing to a dark background

Re: [basex-talk] Anticipating more complex data to follow

2022-03-22 Thread Christian Grün
I would write it as follows: let $string := '{ "parties": [ { "id": 0, "role": "CN", "name": "name1" }, { "id": 1, "role": "SH", "name": "name2" } ] }' let $data := json:parse($string) return $data/json/parties[_[name = 'name1'][role = 'CN']] Martin provided the solution for the XQuery map/ar

Re: [basex-talk] Anticipating more complex data to follow

2022-03-22 Thread Christian Grün
Hi Patrick, Which problem would you like to solve exactly? Maybe I should read the MarkLogic article in more detail, though. Best, Christian On Tue, Mar 22, 2022 at 12:15 AM Patrick Durusau wrote: > > Greetings! > > While working on some large but fairly simple data, I encountered BaseX > usin

Re: [basex-talk] OpenJDK vs. Oracle JDK versus ...

2022-03-22 Thread Christian Grün
> And which one do you prefer for Linux? That depends on the Linux distribution: Most of them provide OpenJDK builds via the package managers. If no builds are available, the Adoptium builds can be used as well. > On Tue, 22 Mar 2022 at 17:04, Christian Grün > wrote: >>

Re: [basex-talk] OpenJDK vs. Oracle JDK versus ...

2022-03-22 Thread Christian Grün
Hi Jonathan, The Adoptium OpenJDK distributions are currently my favorite ones for Windows [1]. Hope this helps, Christian [1] https://adoptium.net/ Jonathan Robie schrieb am Di., 22. März 2022, 20:22: > I am setting up a Windows 11 box. > > Which Java is best for BaseX? > > Jonathan >

Re: [basex-talk] Dumb question: Adding files to BaseX database

2022-03-14 Thread Christian Grün
Hi Patrick, You need to: • open a database; • go to “Database Properties” (Ctrl-Shift-M); and • choose a local resource and press “Add…” Best, Christian On Mon, Mar 14, 2022 at 6:45 PM Patrick Durusau wrote: > > Greetings! > > I'm using db:add to add files to a BaseX database, but am I just m

Re: [basex-talk] Way to Dynamically import a module?

2022-03-14 Thread Christian Grün
> Thank you! Follow up (strange) question. Is there the ability to "unload" a > module dynamically? Imported modules will stay in the context until the query execution is completed. > -Original Message- > From: Christian Grün > Sent: Sunday, March 13,

Re: [basex-talk] Way to Dynamically import a module?

2022-03-13 Thread Christian Grün
Hi Buddy, > I was wondering if in BaseX there is a way at run time to import a .xqm > module, outside of the traditional “import module” statement. Check out inspect:functions [1]. Hope this helps, Christian [1] https://docs.basex.org/wiki/Inspection_Module#inspect:functions

Re: [basex-talk] Fuzzy matching in ft:search for terms with spaces

2022-03-10 Thread Christian Grün
t; > {ft:search('test', 'test finding aid', > map { 'mode': 'phrase', 'fuzzy': true() } > ) } > Returns: > > {ft:search('test', 'test finding aid', > map { 'mode': 'phrase', 'fuzzy

Re: [basex-talk] Fuzzy matching in ft:search for terms with spaces

2022-03-08 Thread Christian Grün
Hi Tamara, I tried to reproduce your use case. When running the following two queries … db:create( 'test', test xml test finding aid 1964 2002 test finding aid finding aid prepared central oregon community college 2008 [etc.] 'tokens.xml', map { 'ftindex': true() } ) ft:search('test'

Re: [basex-talk] Edit to https://docs.basex.org/wiki/Database_Server and question

2022-03-08 Thread Christian Grün
> Oh, not question about keeping the command, just wanted to gather the > stopping commands all together in one place. Feel free to adjust it if you think it’s helpful. Thanks. > On 3/8/22 10:35, Christian Grün wrote: > > Hi Patrick, > > > >> "Pressing |Ctr

Re: [basex-talk] Edit to https://docs.basex.org/wiki/Database_Server and question

2022-03-08 Thread Christian Grün
Hi Patrick, > "Pressing |Ctrl+c| will close all connections and databases and > gracefully shut down the server process." > > True? False? Somewhere in between? True. I think it’s still reasonable to keep this command in our documentation as you can start the BaseX server in the background (e.g.

Re: [basex-talk] Results of some experiments for improving full-text search speeds

2022-03-05 Thread Christian Grün
where $result/@db=$dbs > let $ark := string($result/@ark) [etc.] > > I also compared moving up the index entries with /parent::tokens/parent::ead > instead of /ancestor::ead and didn't see a difference. I'm sure it would make > a big difference in our original

Re: [basex-talk] Results of some experiments for improving full-text search speeds

2022-03-04 Thread Christian Grün
Hi Tamara, I assume that many of my thoughts are already known to you, so simply skip them in them just in case: While ft:search is pretty fast, it’s often the subsequent traversal of ancestor steps that consumes most of the time. In some cases, it can already make a difference if you use "parent

Re: [basex-talk] have a query report a warning?

2022-03-04 Thread Christian Grün
Hi Graydon, In XQuery, there is no such thing as a warning function. If we included such a function in BaseX, we’d probably need to define rules for each API (GUI, clients, RESTXQ, others) how to return such warnings. If you use BaseX on command-line, however, all output of fn:trace, prof:dump, e

Re: [basex-talk] feature request: opening database at arbitrary file path

2022-03-03 Thread Christian Grün
Hi Eric, There had been the suggestion that our documentation will provide you more information on how BaseX works. After you have invested more time on the status quo, we might be able to get some progress on this discussion. Best, Christian On Thu, Mar 3, 2022 at 4:31 PM Eric Levy wrote: > >

Re: [basex-talk] How Best to Determine What BaseX Is Doing When It Pegs the Processor?

2022-03-03 Thread Christian Grün
> Based on that work it appears I may be causing problems by trying to load > large numbers of nodes using db:open-id(). If you have numerous single db:open-id calls, you could potentially reduce them to a single call: db:open-id($db, $sequence-of-ids)

Re: [basex-talk] How Best to Determine What BaseX Is Doing When It Pegs the Processor?

2022-03-02 Thread Christian Grün
Hi Eliot, It’s hard to judge if the freeze-up is due to the query, RESTXQ or your general configuration. Let me see… • Do you get the full result if you invoke the query in the GUI or on command line? How long does that take/how large is the result? • How do you send the HTTP request? Does it mak

Re: [basex-talk] Results of some experiments for improving full-text search speeds

2022-02-28 Thread Christian Grün
Hi Tamara, Thanks a lot for sharing your interesting experiences with BaseX. You mentioned that you are working with various custom indexes. Have you also considered adding an auxiliary index element to your main databases? for $ead in db:open($db)//ead return insert node index { ft:tokenize($ea

Re: [basex-talk] CREATEFILTER Setting Not Being Applied

2022-02-28 Thread Christian Grün
Hi Eliot, I was surprised to see your observation leading me back to an adjustment made in 2014. Back then, global parsing options erroneously influenced the behavior of fn:doc. The global value of the CREATEFILTER, among others, is now considered when using db:create. See [1] for the whole pictur

Re: [basex-talk] bizarre exceptions

2022-02-24 Thread Christian Grün
Hi Leo, Which JDK version are you using? Maybe you get more helpful error output with BaseX in debug mode (basexgui -d). Mac support with BaseX 10 will differ slightly from the status quo, as JDK 11 comes with improved support for Apple. Do you get the same error messages with our snapshot [1]?

[basex-talk] .

2022-02-24 Thread Christian Grün
It’s a dire day. We wish safety and the rapid establishment of peace to our fellows and friends in Ukraine. BaseX 9.7 was scheduled for today, it will be postponed.

Re: [basex-talk] feature request: opening database at arbitrary file path

2022-02-24 Thread Christian Grün
> The base case for an embedded database has no user model, and supports > creation of new databases only through the target path. However, such > differences might press the limits of a benign request. > > If a target path is needed beyond the database itself, then it might be > passed on the comm

Re: [basex-talk] feature request: opening database at arbitrary file path

2022-02-23 Thread Christian Grün
> The design seems to present a dilemma, as it is unlikely that there would be a viable route for beginning work on a Java application, before a concept is proved through much more lightweight development approaches. It depends on you. > Returning to the thought of a feature request, let me sugge

Re: [basex-talk] How to call XQuery function from Java?

2022-02-23 Thread Christian Grün
Hi Paul. > Is it possible for a Java function called from XQuery in BaseX to call back > to an XQuery function that's passed to it in BaseX? Your solution looks fine; it can be further simplified: package my; import org.basex.query.*; import org.basex.query.value.*; import org.basex.query.valu

Re: [basex-talk] Content is not allowed in prolog

2022-02-23 Thread Christian Grün
> Do you have a test-set with xquery-statements? You could have a look at the official QT3 test suite https://github.com/w3c/qt3tests 30.000 tests should be enough I hope ;) You find additional BaseX-specific tests (for XQUF, XQFT, edge cases) in our JUnit tests: https://github.com/BaseXdb/base

Re: [basex-talk] Content is not allowed in prolog

2022-02-23 Thread Christian Grün
Hi Ben, > Everywhere where you use 'input', It is unclear what is valid input, a > file or a document? Thanks for the pointer. Further above in the documentation, it says: “The create(), add(), replace() and store() methods pass on input streams to the corresponding database commands.” I have

Re: [basex-talk] feature request: opening database at arbitrary file path

2022-02-22 Thread Christian Grün
; On Wed, 2022-02-23 at 00:22 +0100, Christian Grün wrote: > > > I understand the distinction. It seems the issues I originally > > > raised > > > would be the same in both cases. The difference is whether the > > > application would be built as a collecti

Re: [basex-talk] feature request: opening database at arbitrary file path

2022-02-22 Thread Christian Grün
> > I understand the distinction. It seems the issues I originally raised > would be the same in both cases. The difference is whether the > application would be built as a collection of scripts versus a full > Java application. As I tried to explain, no configuration files will be written to di

Re: [basex-talk] Content is not allowed in prolog

2022-02-22 Thread Christian Grün
> This works: > Session$Create(DB_Name, "Content 1") Fine. > So you distinguish a XML-DOCUMENT from a XML-FILE and that was something > I didn't know. I guess so. Do we use these two terms in our documentation? Or did you want to point out that you used “document” and “files” for describing the

Re: [basex-talk] Content is not allowed in prolog

2022-02-22 Thread Christian Grün
> (On close reading I see that "Session$Execute(paste("Create db", DB_Name, Single_File))" should have been "Session$Execute(paste("Create db", DB_Name, "Single", Single_File))" The "paste() function just concatenates the strings) Does that solve your problem? > My guess was that the some convent

Re: [basex-talk] Faster in the cloud?

2022-02-22 Thread Christian Grün
לֹהִ֑ים > after=" " lemma="853" morph="To" id="01vuQ">אֵ֥ת > lang="H" lemma="d">הַ > state="absolute" n="010010010052" morph="Ncmpa" lang="H" lemma="8064" > after=" &q

Re: [basex-talk] Content is not allowed in prolog

2022-02-22 Thread Christian Grün
se the same set of xml-files. > Session$Execute(paste("Create db", DB_Name, XML_Files)) accepts them. > Session$Create(DB_Name, XML_Files) don't > > Ben > > Op 22-02-2022 om 16:15 schreef Christian Grün: > > Hi Ben, > > > >> The server protocol does

Re: [basex-talk] Content is not allowed in prolog

2022-02-22 Thread Christian Grün
Hi Ben, > The server protocol does not specify the format that is to be used for input. In order to understand the syntax of "{input}", you can have a look at the Conventions paragraph: {...}: utf8 strings or raw data, suffixed with a \00 byte. To avoid confusion with this end-of-string byte,

Re: [basex-talk] How to produce multipart/mixed results with RESTXQ?

2022-02-22 Thread Christian Grün
Hi Gerrit, As for now, multipart support is only available for requests (multipart/mixed [1], multipart/form-data [2]). Responses are limited to single parts as multipart data had not been considered in the RESTXQ specification. It would be reasonable to also choose sequences for multipart/mixed

<    1   2   3   4   5   6   7   8   9   10   >