Re: [basex-talk] BaseX installation cannot see Java

2024-05-07 Thread Martin Honnen
On 07/05/2024 17:15, ykhab...@bellsouth.net wrote: Hello, Trying to install BaseX via launching BaseX110-20240320.152714.exe in Windows 10 OS environment in a corporate environment. The build version is irrelevant. I tried few of them with the same outcome. Even running the installation as

Re: [basex-talk] Request and JSON parsing

2024-04-25 Thread Martin Honnen
On 25/04/2024 21:58, Günter Dunz-Wolff wrote: Hi there, via RESTXQ I request a vectorstore. The response is an JSON-Object. For example: With the following curl: curl https://vector.io/query-data \   -H "Authorization: Bearer ABcFMGhetc" \   -d '{ "data": "Du hast dem Menschen ein so

Re: [basex-talk] Performance issue with BaseX CLI

2024-04-19 Thread Martin Honnen
Am 19.04.2024 um 10:45 schrieb ANDRADE Antonio: Hie, For the purposes of European Water Framework Directive reporting, I compared the performances of the Saxon and BaseX XQuery engines. I observe a performance gap of a factor of 100 to 200 depending on the use case (see functions

Re: [basex-talk] some eq versus =

2024-04-08 Thread Martin Honnen
On 08/04/2024 23:58, Leo Studer wrote: Hello are the following queries equivalent? 1. //*city*[*some* *$city* *in* following::*city* *satisfies* /string/(.) eq /string/(*$city*)] 2. //*city*[.=following::*city*] More or less, I would say, depending on whether there is schema-aware

Re: [basex-talk] Item Separator

2024-02-27 Thread Martin Honnen
Just to be clear: Is item-separator set as the empty string or is it not set at all for the cases where you don't get the result you expect? My tests with (the lastest) Saxon HE 12.4: declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization;; declare option output:method

Re: [basex-talk] Help with usage of Regex while deleting resources

2024-02-12 Thread Martin Honnen
On 12/02/2024 18:03, Deepak Dinakara wrote: Similarly I also want to execute queries against a list of collections using regex. Something like "*for $document in collection('db-name/20230*')*" (First 9 months of 2023) Right now, I am doing something like "for $i in ('01', '02', '03', '04',

Re: [basex-talk] Processing stack traces in XQuery code

2024-01-11 Thread Martin Honnen
> Am 11.01.2024 um 12:37 schrieb Omar Siam : > > I get: Unknown function: fn:stack-trace() when I use stack-trace(). > > Ah, sorry, it looks like it is not yet implemented. Wait for Christian to give you hopefully some better info than my ill guess.

Re: [basex-talk] Processing stack traces in XQuery code

2024-01-11 Thread Martin Honnen
> Am 11.01.2024 um 12:15 schrieb Omar Siam : > > Hi, > > Until 10.6 one could find the stack trace of an error in $err:additional. > This feature is now gone from BaseX and the documentation. > > I made my life much easier with reporting stack traces on errors in RestXQ > endpoints. Now I

[basex-talk] fiddle certificate error

2024-01-09 Thread Martin Honnen
Hi, trying to access https://bxfiddle.cloud.basexgmbh.de/ Chrome tells me Your connection is not private Attackers might be trying to steal your information from bxfiddle.cloud.basexgmbh.de (for example, passwords, messages, or credit cards). Learn more NET::ERR_CERT_DATE_INVALID

Re: [basex-talk] XQuery fold-left Problem

2023-12-19 Thread Martin Honnen
On 19/12/2023 09:53, Marco Duiker - LandGoed wrote: Please help me with the following problem: I try to construct the current status of a series of objects along the following simple rules: *  the current status of on object with a certain `identificatie` (id) is the newest version of

Re: [basex-talk] XQuery fold-left Problem

2023-12-19 Thread Martin Honnen
On 19/12/2023 09:53, Marco Duiker - LandGoed wrote: Please help me with the following problem: I try to construct the current status of a series of objects along the following simple rules: *  the current status of on object with a certain `identificatie` (id) is the newest version of

Re: [basex-talk] Passing an array to REST HTTP service

2023-11-03 Thread Martin Honnen
On 03/11/2023 08:30, Csaba Fekete wrote: I defined an array variable in my XQUERY: declare variable $caas array(xs:integer)external := []; How can I assign a value (e.g [1,2]) to this variable through the URL? I have already tried: http://host:port/rest/dbname?run=query.xq&$ca[]=1&$ca[]=2

Re: [basex-talk] Strange "group by" behavior

2023-10-06 Thread Martin Honnen
On 06/10/2023 09:16, Alexander Krasnogolowy wrote: Given the following XQuery: let $input := a1 b2 b3               let $map :=  map:merge((   map:entry(1, "A"),   map:entry(2, "B"),   map:entry(3, "C") )) for $result in $input/* let $key := $result/key/text() let $value :=

Re: [basex-talk] passing complex parameters to modules

2023-08-13 Thread Martin Honnen
On 13.08.2023 04:15, Graydon Saunders wrote: Hello -- I've got a module full of functions.  I've got two (and expect more) queries which import the function module.  The queries have slightly different requirements; for example, in one case, it's necessary to use normalize-unicode() during a

Re: [basex-talk] Counterintuitive behavior with cast to double

2023-05-23 Thread Martin Honnen
On 5/23/2023 11:35 AM, Shuxin Li wrote: Hi, I'm Shuxin. Recently I came across this test case in which BaseX returned counterintuitive result. From my feelings it seems like a bug but the behavior of Saxon is similar, and therefore is hard for me to confirm. Give XML document 111 and XPath

Re: [basex-talk] "class file versions" discrepancy

2023-03-14 Thread Martin Honnen
Am 3/14/2023 um 3:18 PM schrieb Martin Honnen: Am 3/14/2023 um 3:10 PM schrieb Murray, Gregory: I’m new to BaseX. I’m on a Mac with an Apple M1 chip, running macOS 12.6.3. I downloaded the ZIP distribution of BaseX. When I open BaseX.jar I get an error message saying to check the console

Re: [basex-talk] "class file versions" discrepancy

2023-03-14 Thread Martin Honnen
Am 3/14/2023 um 3:10 PM schrieb Murray, Gregory: I’m new to BaseX. I’m on a Mac with an Apple M1 chip, running macOS 12.6.3. I downloaded the ZIP distribution of BaseX. When I open BaseX.jar I get an error message saying to check the console. When I run basexgui at the command line, I get

Re: [basex-talk] XQuery Prolog with serialization settings - basex "Unknown option 'basex'?

2023-02-13 Thread Martin Honnen
On 2/13/2023 8:28 PM, Patrick Durusau wrote: Greetings! I have the following in the prolog of an XQuery: declare namespace output = 'http://www.w3.org/2010/xslt-xquery-serialization'; declare option output:method 'basex'; declare option output:basex 'indent=yes, newline=\n'; I'm following

Re: [basex-talk] Minor issue: format-date?

2023-01-20 Thread Martin Honnen
Am 1/20/2023 um 11:44 AM schrieb Alexander Witzigmann: Hi, The format-date has one minor issue using format-date(xs:date("2022-01-01"),"[D]. [Mn] [Y]","de",(),()) should return 1. Januar 2022 but currently (BaseX 10.4) returns 1. januar 2022 I think you need/want to use   

Re: [basex-talk] Scope of a xPath variable

2022-12-19 Thread Martin Honnen
On 12/19/2022 10:58 PM, Graydon wrote: On Mon, Dec 19, 2022 at 10:43:25PM +0100, Leo Studer scripsit: In the code below I encounter the problem, that I have to define the same xPath function variable $organizations twice and I do not understand why. In line 10, you've used a let clause to

Re: [basex-talk] Scope of a xPath variable

2022-12-19 Thread Martin Honnen
On 12/19/2022 10:43 PM, Leo Studer wrote: Hello Cracks ;-) In the code below I encounter the problem, that I have to define the same xPath function variable $organizations twice and I do not understand why. Running the code with the newest versions of BaseX or with Saxon EE, I get a runtime

Re: [basex-talk] Pretty print

2022-11-17 Thread Martin Honnen
Am 11/17/2022 um 2:29 PM schrieb Giuseppe G. A. Celano: it is: declare option output:method 'xml'; declare option output:indent 'yes’; doc(“myfile.xml”) How/where are you running that code? In the BaseX GUI? There I get an indented output with similar code.

Re: [basex-talk] Pretty print

2022-11-17 Thread Martin Honnen
Am 11/17/2022 um 2:10 PM schrieb Giuseppe G. A. Celano: Hi, I am trying to prettyprint an XML file. I tried the serialization option “indent”=“yes”, but it does not work as expected. On BaseX 9, the prettyprint was the default setting: how to get the same result in BaseX 10 (and later)?

Re: [basex-talk] basex client implementation

2022-11-04 Thread Martin Honnen
Am 11/4/2022 um 10:27 AM schrieb Martin Honnen: Am 11/4/2022 um 1:38 AM schrieb Erik Peterson: The CLI basexclient uses the same client api as other clients found here yes? https://docs.basex.org/wiki/Clients from basexclient CLI >BINARY GET lib/example.jpg as expected, returns the jp

Re: [basex-talk] Lookup operator, conformance

2022-10-24 Thread Martin Honnen
Am 10/24/2022 um 1:29 PM schrieb Martin Honnen: Am 10/24/2022 um 12:45 PM schrieb Hans-Jürgen Rennau: Hello, I noticed that the lookup operator (?) accepts as key expression also non-parenthesized expressions, e.g.: $map?$key It seems to me that the XQuery spec does not allow

Re: [basex-talk] Lookup operator, conformance

2022-10-24 Thread Martin Honnen
Am 10/24/2022 um 12:45 PM schrieb Hans-Jürgen Rennau: Hello, I noticed that the lookup operator (?) accepts as key expression also non-parenthesized expressions, e.g.: $map?$key It seems to me that the XQuery spec does not allow that - the key specifier must be an NCName, an integer, * or a

Re: [basex-talk] BaseX 10.2: Maintenance Release

2022-10-11 Thread Martin Honnen
Am 10/11/2022 um 11:59 AM schrieb Christian Grün: A new maintenance release is available. It comes with… • a new command-line option -W for indenting results; • better pooling of HTTP requests; • minor bug fixes. Superb, somehow sneaking that in on MS patch day Tuesday but long before their

Re: [basex-talk] current-dateTime() function precision

2022-09-09 Thread Martin Honnen
On 9/9/2022 7:46 PM, ykhab...@bellsouth.net wrote: Hi Vincent and Martin, Thanks for the clarification. I switched to using the Profiling module. let $before_datetime := convert:integer-to-dateTime(prof:current-ms()) (: current-dateTime() :) And it is working well.

Re: [basex-talk] current-dateTime() function precision

2022-09-09 Thread Martin Honnen
Am 9/9/2022 um 6:03 PM schrieb Martin Honnen: I think, due to the functional/declarative language that is XQuery, the static context defines that current-dateTime() doesn't change during the execution of a single query, it is part of the static context. It is defined in the dynamic context

Re: [basex-talk] current-dateTime() function precision

2022-09-09 Thread Martin Honnen
Am 9/9/2022 um 6:03 PM schrieb Martin Honnen: Am 9/9/2022 um 5:55 PM schrieb ykhab...@bellsouth.net: Hello, I am using BaseX v.10.1 It seems that the current-dateTime() function precision is off. I am validating an XML file against an XSD 1.1 file via Xerces 2.12.2 validator. And trying

Re: [basex-talk] current-dateTime() function precision

2022-09-09 Thread Martin Honnen
Am 9/9/2022 um 5:55 PM schrieb ykhab...@bellsouth.net: Hello, I am using BaseX v.10.1 It seems that the current-dateTime() function precision is off. I am validating an XML file against an XSD 1.1 file via Xerces 2.12.2 validator. And trying to measure a timing of it. Here is my code.

Re: [basex-talk] an Earley parser in XQuery?

2022-08-22 Thread Martin Honnen
On 22.08.2022 19:07, Graydon Saunders wrote: I'm trying to test if some extracted sentences validate as productions of a particular context-free grammar expressed in a BNF dialect. Is there an available implementation of a parser in XQuery that can do this? In the context of Invisible XML

Re: [basex-talk] BaseX 10.1: Fixes, Previews

2022-08-18 Thread Martin Honnen
Am 18.08.2022 um 15:09 schrieb Martin Honnen: Am 18.08.2022 um 12:03 schrieb Christian Grün: Enjoy the latest BaseX patch release of BaseX, our XML Framework:    https://basex.org/ …and (still undocumented) XQuery 4 preview features. Now that sounds interesting, what do we need to do

Re: [basex-talk] BaseX 10.1: Fixes, Previews

2022-08-18 Thread Martin Honnen
Am 18.08.2022 um 12:03 schrieb Christian Grün: Enjoy the latest BaseX patch release of BaseX, our XML Framework: https://basex.org/ It contains various bug fixes… • HTTP Requests, sending headers • Storage handling of main-memory databases • GUI editor, double clicks • function items and

Re: [basex-talk] Multi-valued values in maps - sequences vs arrays

2022-08-03 Thread Martin Honnen
Am 03.08.2022 um 04:27 schrieb Bridger Dyson-Smith: I would appreciate some help understanding how I might go about having a multi-valued array as the value of a map key, or if this is even possible; e.g. map{ "key": [1,2,3,4,5] } map { 'key' : array { 1 to 5 } } Or have I missed the

Re: [basex-talk] BaseX YAML Parser?

2022-07-26 Thread Martin Honnen
Am 26.07.2022 um 15:25 schrieb Marco Lettere: Hi Elliot, I remember having asked info about a possible YAML serialization format on the Slack Xml.com channel one year ago. They don't really have a nice opinion about Yaml and no-one looked really interested in supporting it. Thus I think there

Re: [basex-talk] How To: Sort nodes in document order?

2022-07-04 Thread Martin Honnen
Am 04.07.2022 um 17:14 schrieb Martin Honnen: Am 04.07.2022 um 17:11 schrieb Eliot Kimber: I feel like I should know how to do this (and possibly I’ve previously been told how and have forgotten), but I’m at a loss. I am implementing a process that gathers nodes from a single document

Re: [basex-talk] How To: Sort nodes in document order?

2022-07-04 Thread Martin Honnen
Am 04.07.2022 um 17:11 schrieb Eliot Kimber: I feel like I should know how to do this (and possibly I’ve previously been told how and have forgotten), but I’m at a loss. I am implementing a process that gathers nodes from a single document (a DITA map) and constructs a system of maps where

Re: [basex-talk] the implicit context of position

2022-06-30 Thread Martin Honnen
Am 30.06.2022 um 17:21 schrieb Graydon Saunders: Hello -- I've got an element node that's part of a document.  I need its position among the element children of its parent. $step/position() will (correctly!) always return 1, there's one thing in $step, of course it does.

Re: [basex-talk] Constructing and querying map structures in a dynamic way

2022-05-25 Thread Martin Honnen
Am 25.05.2022 um 17:35 schrieb Markus Elfring: The standard specification just shows examples for topics like “days” and “books” with map constructors based on literal data. Perhaps https://www.w3.org/TR/xquery-31-requirements/ shows some more complex queries.

Re: [basex-talk] ODBC support for BaseX?

2022-05-20 Thread Martin Honnen
Am 20.05.2022 um 10:56 schrieb Markus Elfring: The software “BaseX” is providing direct support for document databases. Is any support available for data management by interfaces like the following? * Open Database Connectivity * Java Database Connectivity Are you just looking for

Re: [basex-talk] Repeating data based on varying items in an array

2022-05-16 Thread Martin Honnen
Am 16.05.2022 um 10:18 schrieb Markus Elfring: Can you show us the input structure? A sequence of arrays with a string literal as the first array item but an element or document node as the second array item? I stumbled on the design challenge if the sequence of nested arrays would be

Re: [basex-talk] Repeating data based on varying items in an array

2022-05-13 Thread Martin Honnen
Am 13.05.2022 um 15:08 schrieb Markus Elfring: Can such an XQuery script variant be adapted also for the handling of items from a subtree instead of the shown number array? Can you show us the input structure? A sequence of arrays with a string literal as the first array item but an

Re: [basex-talk] Repeating data based on varying items in an array

2022-05-13 Thread Martin Honnen
Am 13.05.2022 um 13:47 schrieb Markus Elfring: How do you think about to extend an XQuery sccript variant like the following for the desired transformation? declare option output:method "csv"; declare option output:csv "header=yes"; for $x in (["f", [1, 2, 3]], ["g", [4, 5]]) return

Re: [basex-talk] Repeating data based on varying items in an array

2022-05-13 Thread Martin Honnen
Am 13.05.2022 um 12:46 schrieb Markus Elfring: A sequence like “(["f" [1 2 3]], ["g" [4, 5]])” might be an interesting test example. It contains two nested arrays. That is not even syntactically close to a sequence of two nested arrays, I am afraid.

Re: [basex-talk] Performing extra data conversion for double values (by XQuery)

2022-04-21 Thread Martin Honnen
On 21.04.2022 09:20, Markus Elfring wrote: I would like to perform a sanity check for some input data which represent numbers that are using the comma as the decimal separator. I stumbled on the message “[FORG0001] Cannot convert to xs:double: …” Depending on the format of the numeric

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

2022-04-04 Thread Martin Honnen
Am 04.04.2022 um 16:16 schrieb Markus Elfring: for $x in $results group by $count := $x(1) I tried the code variant “for $r in $results let $count := $r(1)” also out. But I wonder that the incidence “1” (only one) would be determined then for all record set counters. As I said, consider

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

2022-04-04 Thread Martin Honnen
Am 04.04.2022 um 15:27 schrieb Markus Elfring: for $x in $results let $count := $x[1] Perhaps you want   $x(1) here to access the first item in the array $x? Yes. ‒ Thanks that you pointed a typo out. Thus I adjusted the member access specification. But I stumble on the message

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

2022-04-04 Thread Martin Honnen
Am 04.04.2022 um 13:00 schrieb Markus Elfring: With XQuery 3.0, a group by clause was introduced [1, 2]. I can be applied to all data structures including arrays (“sequences” are the most basic data structure in XQuery, though). I am looking for further hints in this software design area.

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

2022-03-22 Thread Martin Honnen
On 22.03.2022 21:48, Patrick Durusau wrote: I'm anticipating incorporation of JSON sources with anonymous nodes and if they all appear with the element name _, how do I distinguish one from another, structurally speaking? Are you not able to use XPath/XQuery 3.1 map/array lookup operators

Re: [basex-talk] XQuery versus XSL

2022-03-09 Thread Martin Honnen
On 09.03.2022 13:11, Ben Engbers wrote: Hi, I have a collection of 740 documents with the following structure: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:noNamespaceSchemaLocation="http://technische-documentatie.oep.overheid.nl/schema/op-xsd-2012-1;>      

Re: [basex-talk] validate:xsd-info agains more than one schema

2022-03-04 Thread Martin Honnen
On 04.03.2022 10:28, Arantza Etxebarria Pablo wrote: Dear Community, We have been trying to validate a file using the function *validate:xsd-info*($input as item(), $schema as item()?) as xs:string* against several different schemas and, we don't know how to send the parameter “schema” with

Re: [basex-talk] 'Flatten' a collection

2022-02-14 Thread Martin Honnen
On 14.02.2022 15:53, Ben Engbers wrote: Hi, I have a collection of 740 XML-documents which I want to flatten. The files all have the same structure:     spreker_1   spreker_3     spreker_2 spreker_1 spreker_4     spreker_2   spreker_3   spreker_2   spreker_1 The

Re: [basex-talk] RESTXQ generated HTML - unexpected behaviour

2022-01-07 Thread Martin Honnen
Am 07.01.2022 um 10:56 schrieb Hans-Juergen Rennau: Phantastic, Martin - you made it work! Many thanks! Could you help me fully understand the reason - so why /exactly/ is     %output:method("xhtml") essential? I would have thought that the reason is fully given by the serialization details.

Re: [basex-talk] RESTXQ generated HTML - unexpected behaviour

2022-01-06 Thread Martin Honnen
Am 07.01.2022 um 08:39 schrieb Martin Honnen: Am 07.01.2022 um 01:29 schrieb Hans-Juergen Rennau: Hello, I face a problem with RESTXQ of a fairly general character, as it seems to me. When the XQuery functions of a RESTXQ application construct HTML pages, I expect these pages to behave

Re: [basex-talk] RESTXQ generated HTML - unexpected behaviour

2022-01-06 Thread Martin Honnen
Am 07.01.2022 um 01:29 schrieb Hans-Juergen Rennau: Hello, I face a problem with RESTXQ of a fairly general character, as it seems to me. When the XQuery functions of a RESTXQ application construct HTML pages, I expect these pages to behave exactly as a static page with the same content would

Re: [basex-talk] BaseX 9.6.4: Tweaks, Fixes & Thank Yous

2021-12-17 Thread Martin Honnen
Am 17.12.2021 um 10:17 schrieb Christian Grün: We conclude this year with yet another release of BaseX, our XML framework, database and XQuery processor [1]. The new version contains new performance tweaks and minor bug fixes, the details of which can be examined on our GitHub page [2].

Re: [basex-talk] Didn't know ....

2021-12-07 Thread Martin Honnen
Am 07.12.2021 um 10:16 schrieb Marco Lettere: Hi all, Just because "abc" || () returns "abc", it felt natural to me that should return but I get instead. This is on a 9.6.1. I can't recall whether this has always been like that thus it's one of my xquery shortcomings or if actually

Re: [basex-talk] Output script-element with javascript source code

2021-12-07 Thread Martin Honnen
Am 07.12.2021 um 10:00 schrieb Kristian Kankainen: Hi all, Can I somehow control the serialization of element contents? I want to use Xquery to generate parts of source code for javascript and put the generated code inside a script element on the webpage. Basically this: define function

Re: [basex-talk] items of type map(*) cannot be serialized

2021-11-10 Thread Martin Honnen
On 10.11.2021 19:34, Jonathan Robie wrote: I want to serialize JSON.  Consider the following function: declare function local:index() {  array{ $levinsohn/levinsohn/feature/header ! map {./name : ./description ! string() } } }; When I run that, I get output that looks like this: [map {  

Re: [basex-talk] probably a bug

2021-09-02 Thread Martin Honnen
On 02.09.2021 17:22, Rob Stapper wrote: Consider snippets [1] and [2], both result in false(). That can’t be right to me. [1] () = 4 [2] () != 4 The empty sequence is neither equal to nor unequal to the number 4 as it doesn't contain any item to compare 4 to:

Re: [basex-talk] XQuery output without namespace declaration

2021-08-25 Thread Martin Honnen
Am 25.08.2021 um 17:41 schrieb Yann NICOLAS (ABES): Did you see my other suggestion in the first answer  to try to change your XQuery code to use    insert node $record/c ! element { node-name() } {  @*, node() } into db:open('uk_parlement_ead')/dsc Oh, i missed it ! Sorry. It is working

Re: [basex-talk] XQuery output without namespace declaration

2021-08-25 Thread Martin Honnen
Am 25.08.2021 um 17:16 schrieb Yann NICOLAS (ABES): Actually, i am trying to omit the *namespaces*, not the xml declaration. Sorry for the mistake in my first post, Martin. Did you see my other suggestion in the first answer  to try to change your XQuery code to use    insert node

Re: [basex-talk] XQuery output without namespace declaration

2021-08-25 Thread Martin Honnen
Am 25.08.2021 um 15:12 schrieb Yann NICOLAS (ABES): Hi all, I am looking for the equivalent instruction of XSLT attribute @omit-xml-declaration in XQuery. In the Query prolog you can declare declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization;; declare option

Re: [basex-talk] BaseX 9.6 - BaseX96.zip - missing? Image not found: /img/c_go.png and Image not found: /img/c_editopen.png

2021-08-19 Thread Martin Honnen
On 20.08.2021 00:04, Martin Honnen wrote: On 19.08.2021 23:56, Patrick Durusau wrote: Running ./basexgui 2 image not found messages (omitting the at messages) Image not found: /img/c_go.png and Image not found: /img/c_editopen.png On Debian (Buster I think). On Windows (installed

Re: [basex-talk] BaseX 9.6 - BaseX96.zip - missing? Image not found: /img/c_go.png and Image not found: /img/c_editopen.png

2021-08-19 Thread Martin Honnen
On 19.08.2021 23:56, Patrick Durusau wrote: Running ./basexgui 2 image not found messages (omitting the at messages) Image not found: /img/c_go.png and Image not found: /img/c_editopen.png On Debian (Buster I think). On Windows (installed with BaseX96.exe) I see a yellow triangle with an

Re: [basex-talk] Can XQuery return unique values present across multiple databases?

2021-08-13 Thread Martin Honnen
Am 13.08.2021 um 00:12 schrieb Tamara Marnell: Short question: Is it possible to write an XQuery FLWOR statement that can return a set of unique values present across multiple databases? Long question: Our new website in development displays EAD finding aids stored across 45 databases in

Re: [basex-talk] XProc?

2021-08-12 Thread Martin Honnen
Am 12.08.2021 um 13:58 schrieb Jonathan Robie: What hooks does BaseX provide for XProc?  Where can I find examples of BaseX use in an XProc pipeline? Morgana XProc for XProc 1 has support for using BaseX for the p:xquery step:

Re: [basex-talk] automatically running an unknown number of queries on a variable content set

2021-07-06 Thread Martin Honnen
Am 06.07.2021 um 18:38 schrieb Graydon Saunders: So the idea is to -- via some automatic process, so "the command line" -- load a content set into BaseX and then run some arbitrary list of queries on that content set, returning an aggregated report. It's important that it's easy to add a

Re: [basex-talk] Re: Command Files - string syntax

2021-06-28 Thread Martin Honnen
oes an update. If I run the same query in the GUI, it works, but not in this ... um ... bxs file.  What do I do to enable updates? Jonathan On Mon, Jun 28, 2021 at 3:57 PM Martin Honnen <martin.hon...@gmx.de&

Re: [basex-talk] Command Files - string syntax

2021-06-28 Thread Martin Honnen
On 28.06.2021 20:54, Jonathan Robie wrote: I decided to try creating some command files to simplify administration: https://docs.basex.org/wiki/Commands#String_Syntax I was surprised that this did not work: % cat foo.bsx CREATE DB test

Re: [basex-talk] differencing the string value of documents

2021-06-11 Thread Martin Honnen
Am 11.06.2021 um 08:34 schrieb Martin Honnen: Am 11.06.2021 um 03:06 schrieb Graydon Saunders: So I have XML documents A and B. For this purpose, the markup (which is known to be different) is not relevant; the thing I need to do is prove that all of the text in the string value

Re: [basex-talk] differencing the string value of documents

2021-06-11 Thread Martin Honnen
Am 11.06.2021 um 03:06 schrieb Graydon Saunders: So I have XML documents A and B. For this purpose, the markup (which is known to be different) is not relevant; the thing I need to do is prove that all of the text in the string value of A is present in B in the same order in which it exists

Re: [basex-talk] insert MS SQL server bigint from BaseX via sql:execute-prepared

2021-05-31 Thread Martin Honnen
On 31.05.2021 18:01, Christian Grün wrote: I have added "long" to the list of supported data types, as well as "byte" and "bigdecimal" [1]. I hope it works as expected. A new snapshot is available [2]; your feedback is welcome Looks great, thanks a (put some bigint here) lot. Turns out my

[basex-talk] insert MS SQL server bigint from BaseX via sql:execute-prepared

2021-05-31 Thread Martin Honnen
I am trying to use BaseX to enter data from its XML db into an MS SQL server database, according to https://docs.microsoft.com/en-us/sql/connect/jdbc/using-basic-data-types?view=sql-server-ver15 the MS SQL server column type bigint is mapped to long in Java. However, when I try   {$id} with

Re: [basex-talk] BUG node comparison

2021-05-26 Thread Martin Honnen
Am 26.05.2021 um 11:03 schrieb ydy...@post.cz: Dear BaseX, according to github instructions I’m sending a bug report via email: Using BaseX 9.5.1, cmd-line “basex.bat -i datafile.xml queryfile.xq” leads to no result at all. I’m convinced there should be result equivalent to the one of the

Re: [basex-talk] CSV and automatic encoding detection

2021-05-24 Thread Martin Honnen
Am 24.05.2021 um 09:22 schrieb Kristian Kankainen: Hi folks, I am aware that with the HTML module you can let it guess a file's encoding by itself by providing it in binary format: If the input encoding is unknown, the data to be processed can be passed on in its binary representation. The

Re: [basex-talk] Histogramming a large dataset

2021-03-10 Thread Martin Honnen
:28 PM, Martin Honnen (martin.hon...@gmx.de <mailto:martin.hon...@gmx.de>) wrote: > (: 3 items - 52 sec :) > let $safetyreport := db:open('FAERS')/ichicsr/safetyreport > for $value in distinct-values($safetyreport/patient/patientsex) > return concat($value, " ", &g

Re: [basex-talk] Histogramming a large dataset

2021-03-10 Thread Martin Honnen
On 10.03.2021 21:37, Ron Katriel wrote: Hi, I would appreciate your advice on optimizing a query against a large BaseX (9.2.4) database. It is loaded with data from the FDA’s Adverse Event Reporting System (FAERS). Currently this is just the 2020 dataset which comprises 12 documents stored as

Re: [basex-talk] file:read-text

2021-01-12 Thread Martin Honnen
-text suggests you can use   file:read-text("file.txt", "UTF-8", true) and you won't get the error about invalid characters, instead the returned string contains the Unicode replacement character|FFFD| On 12. Jan 2021, at 13:41, Martin Honnen mailto:martin.hon...@gmx.de>&

Re: [basex-talk] file:read-text

2021-01-12 Thread Martin Honnen
On 12.01.2021 13:33, Giuseppe G. A. Celano wrote: Hi, I am trying to open a bunch of files with file:read-text, but I get the error [file:io-error] invalid XML character: #0, even I am not dealing with XML. Any idea why this happens? Thanks! Perhaps as XQuery strings impose XML rules for

Re: [basex-talk] Sequence comparison

2020-11-25 Thread Martin Honnen
Am 26.11.2020 um 07:14 schrieb Martin Honnen: My bad, use group by $k := $a return {$a} To describe it clearer, the whole FLOWR should be for $a in (1,2,3,5) where $a = (1,3,2,3) group by $k := $a return {$a}

Re: [basex-talk] Re: Sequence comparison

2020-11-25 Thread Martin Honnen
two 3), I will still get two 3, while I should get only one. > > Or more FLOWR like > for $a in (1,2,3,5,3) > where $a . = (1,3,2) > group by $o := $a > return > {$a} > On 25. Nov 2020, at 09:11, Martin Honnen wrote: > > Am 2

Re: [basex-talk] Sequence comparison

2020-11-25 Thread Martin Honnen
Am 25.11.2020 um 08:39 schrieb Martin Honnen: Am 25.11.2020 um 06:37 schrieb Giuseppe G. A. Celano: I have to compare two sequences and find common items, irrespective of their positions: for $a  in (1,2,3,5,3) for $u  in (1,3,2,3) where $a = $u group by $o := $a return {$a} This returns 1 2

Re: [basex-talk] Sequence comparison

2020-11-24 Thread Martin Honnen
Am 25.11.2020 um 06:37 schrieb Giuseppe G. A. Celano: I have to compare two sequences and find common items, irrespective of their positions: for $a  in (1,2,3,5,3) for $u  in (1,3,2,3) where $a = $u group by $o := $a return {$a} This returns 1 2 3 3 3 3 I would like 3 to be repeated only

Re: [basex-talk] importing data from powershell

2020-11-17 Thread Martin Honnen
On 18.11.2020 01:47, Nicholas wrote: for some simple data as: PS /home/nicholas> PS /home/nicholas> $data = @{ >> customer = 'something' >> name = 'whatever' >> } PS /home/nicholas> PS /home/nicholas> ($data | ConvertTo-Xml).OuterXml namewhatevercustomersomething PS /home/nicholas>

Re: [basex-talk] XQuery Update delete attributes

2020-09-27 Thread Martin Honnen
Question to Christian: why does   . update delete node descendant-or-self::*/@class work for me but / update delete node descendant-or-self::*/@class gives an error unexpect end of query. OK, / update is ambigious, it has to be (/) update delete node //@class to make sure the

Re: [basex-talk] XQuery Update delete attributes

2020-09-27 Thread Martin Honnen
On 27.09.2020 14:48, Günter Dunz-Wolff wrote: Hi all, can’t figure it out. Is there any way in XQuery Update, to delete a specific attribute from any node? Doesn't   delete node //@foo delete all "foo" attributes? Or . update delete node descendant-or-self::*/@foo ? Question to

Re: [basex-talk] Accessing Flexmark (Java) from Query

2020-09-20 Thread Martin Honnen
On 20.09.2020 01:41, Andreas Mixich wrote: Am 19.09.2020 um 23:30 schrieb Martin Honnen: import com.vladsch.flexmark.parser.Parser.Builder; with   $builder => Parser.Builder:build() Hello Martin, thanks for taking the time! I am not quite sure I understand. Do you want me to:   imp

Re: [basex-talk] Accessing Flexmark (Java) from Query

2020-09-19 Thread Martin Honnen
On 19.09.2020 22:54, Andreas Mixich wrote: Hi, how can I translate this Java[1] to XQuery according to [2]?   package com.vladsch.flexmark.samples;   import com.vladsch.flexmark.util.ast.Node;   import com.vladsch.flexmark.html.HtmlRenderer;   import com.vladsch.flexmark.parser.Parser;  

Re: [basex-talk] Best way to re-create existing root element with all attributes

2020-09-13 Thread Martin Honnen
On 13.09.2020 21:46, Yitzhak Khabinsky wrote: Hello, This is input XML: Peter Director John Animator James Assistant Desired output XML: Peter Director Overall, it is a so called ‘modified identity transformation’ in XSLT parlance. Output XML shall be the same, except the child

Re: [basex-talk] Yaml serialization

2020-08-12 Thread Martin Honnen
Am 12.08.2020 um 12:38 schrieb Christian Grün: YAML serialization would be a nice feature indeed. Are you aware of existing (ideally bidirectional) mappings that would be appropriate for general use? At XML Prague, Norm did a demo of casting YAML to JSON as described in

Re: [basex-talk] Inserting a two double quoted attribute

2020-07-27 Thread Martin Honnen
Am 27.07.2020 um 12:01 schrieb Ramzi Hammouda: Hello BaseX team, I need to insert a node that has an attribute with two double quotes. An example: let $message:='3.00' With XML markup, to have an attribute value delimited by double quotes but to also use double quotes inside the attribute

Re: [basex-talk] Joining large files

2020-07-11 Thread Martin Honnen
On 11.07.2020 14:41, Giuseppe G. A. Celano wrote: I am trying to perform a join operation between two large XML files (~490 MB and ~40 MB), which are the result of the automatic conversion of old sql dumps into XML files. I created two databases for the files. The query I wrote to join them is

Re: [basex-talk] Joining large files

2020-07-11 Thread Martin Honnen
Am 11.07.2020 um 14:41 schrieb Giuseppe G. A. Celano: I am trying to perform a join operation between two large XML files (~490 MB and ~40 MB), which are the result of the automatic conversion of old sql dumps into XML files. I created two databases for the files. The query I wrote to join them

Re: [basex-talk] How to serialize HTML as text

2020-06-27 Thread Martin Honnen
Am 27.06.2020 um 18:32 schrieb Emmanuel Chateau: I need to output a JSON object with HTML content without a parent element. Weird idea I grant you, but required by the people I work with. Working from a map, in the map value, the content should not appear in a parent element. Instead of :

Re: [basex-talk] sum() is returning inaccurate sums

2020-06-17 Thread Martin Honnen
Am 17.06.2020 um 10:50 schrieb Martin Honnen: Whether you do that with a long `for .. return` or simply with   //gross/xs:decimal(.) or   //gross!xs:decimal(.) is up to you. Schema-aware XQuery could also help of the `gross` elements were declared as `xs:decimal`, but I don't think XQuery

Re: [basex-talk] sum() is returning inaccurate sums

2020-06-17 Thread Martin Honnen
Am 17.06.2020 um 10:37 schrieb Jay Straw: Hi all, I'm building a budgeting system for home use, using XSLTForms and -- ready for it? -- BaseX! sum() has been behaving weird. I'm adding USD, which means only 2 decimals of precision. But depending on the combination of elements I add, I'll get a

Re: [basex-talk] Serializing with xml-stylesheet prolog

2020-06-07 Thread Martin Honnen
Am 07.06.2020 um 10:25 schrieb Jay Straw: I need to run a client-side stylesheet (XSLTForms, I tried it server side, didn't work), but getting my assembled XHTML document to output with has been hard. After searching https://docs.basex.org/wiki/Serialization,

Re: [basex-talk] Runtime load of a module?

2020-05-17 Thread Martin Honnen
Am 17.05.2020 um 16:46 schrieb Buddy Kresge: We have a situation where we have certain XQuery modules and we want to know if there is a way to load a module into BaseX at Run-time? https://docs.basex.org/wiki/XQuery_Module#xquery:parse-uri seems to allow that. The W3C library also defines

  1   2   >