494
questions
0
votes
1
answer
45
views
Is "deep lookup operator" for map implemented in any XQJ processor?
https://qt4cg.org/specifications/xquery-40/xquery-40.html#id-deep-lookup educates about deep lookup operator for maps and arrays. Although BaseX and Saxon XQJ processors implement this Xquery 4.0 (...
0
votes
1
answer
38
views
XQUERY Counting & Unique Values
Working in BaseX, I'm trying to list the number of publishers in an xml database that contains a bookstore and how many books there are for each publisher. So I have the below xquery:
let $publisher:= ...
0
votes
1
answer
45
views
Convert HTML strings in JSON input to XML nodes
I'm trying to parse a json file with BaseX 10.7 thanks to the json:parse function.
My file presents some values with html characters, for example like this in "text" value:
"order&...
0
votes
1
answer
50
views
Run xquery on updated xml file
Im new to BaseX so I apologize if my question sounds silly.
I was looking for a tool where I can simply run xquery on an xml with ease so I found your tool basex which seems very powerful and probably ...
1
vote
2
answers
71
views
XQuery "except" expression is not producing a desired result
I am using BaseX latest version 11.0 beta.
I am trying to remove Texas cities in the /root/base/r sequence by using /root/remove/r sequence.
The goal is to use XQuery except expression.
Here is my ...
0
votes
1
answer
67
views
Location of CSS files for web applications
I'm new to BaseX and attempting to set up a simple web application. Looking at DBA as an example, I can see that there is a file webapp/dba/static/style.css which is referenced in HTML as <link rel=...
1
vote
1
answer
57
views
How to include HTML5 DOCTYPE in HTTP response
When using BaseX for developing a web application, I'd like to return HTML and include the DOCTYPE that is typical for HTML5, namely <!DOCTYPE html> I've noticed that if I set up a RESTXQ ...
0
votes
1
answer
57
views
namespace prefix not declared basex
I'm trying to use a module that I have imported into Basex database engine.
The module can be found here : https://git.unistra.fr/estrades/heimdall
I have done what they said to import the module in ...
-1
votes
1
answer
70
views
Issue with BaseX XQuery content:unable to add an attribute, and I don't know how to add tags, just know how to add values
PS- Please tell admins to enable more usability to review code indentation, the task was too rough, had to use a link and it forces a format when code formats are several ones, and i had to remove ...
0
votes
1
answer
67
views
How to send a xquery to a BaseX database via http
I am trying to use the http interface to access a BaseX database.
The setup is as follows:
installed the latest basex on my windows 10 system (version 10.7)
created a user test with password test
...
0
votes
1
answer
39
views
How does a person work with the BlastXML2 namespace on import?
The Xquery schema is shown here: https://www.ncbi.nlm.nih.gov/data_specs/schema_alt/NCBI_BlastOutput2.xsd (Outfmt = 16 on Blast+ command line).
The aim is to:
Include search term (Just one for now, ...
0
votes
1
answer
129
views
how to query the result of fn:analyze-string()?
In XQuery (in BaseX which uses Saxon 10.something as well as in XSLT with Saxon 9.9.1.7 within Oxygen), I tried to iterate the matches of fn:analyze-string() by
fn:analyze-string($term, $pattern)/...
1
vote
1
answer
284
views
How to set initial password in BaseX
I use tomcat and have downlaoded and deployed the basex105.war in the folder webapps. I can successfully access BaseX via localhost:8080/BaseX105/.
Now I want to access the DBA: Database ...
1
vote
2
answers
46
views
I got an Invalid XQuery syntax, syntax does not pass static validation error working with java
I'm getting this error: Invalid XQuery syntax, syntax does not pass static validation. eac4.gestors.GestorException
at eac4.gestors.GestorOrdinador.inserir(GestorOrdinador.java:57)
at eac4.gestors....
0
votes
1
answer
47
views
Database "test" is being updated or update was not complited
I am using BaseX version 9.0.5 There was some update operation was going on but now I am not able to do anything with the database nether read operation nor write operation.
I am getting the message &...
1
vote
1
answer
198
views
Send HTTP Request from local server to remote server
I am using BaseX version 9.5, I am trying to send HTTP request from local to remote server to read database, but not getting the response.
let $server := 'http://10.102.xxx.xxx:8984/rest/'
let $...
1
vote
1
answer
82
views
BaseX close Spring Boot classloader
I have a Spring Boot (2.7.5) with BaseX 10.3
On start up I have a server component starting the server in a @PostConstruct
System.setProperty("org.basex.path", basexDataPath);
Context c = ...
0
votes
1
answer
47
views
BaseX parrallel Client
I have client like this :
import org.basex.api.client.ClientSession;
@Slf4j
@Component(value = "baseXAircrewClient")
@DependsOn(value = "baseXAircrewServer")
public class ...
0
votes
1
answer
90
views
Query BaseX with xslt module error on [XPST0003] Expecting variable declaration
I'm using xslt module to query BaseX.
<query><text>
let $xml := doc("/dsn_ext/pcbtestxmldbdata001_test001.xml")
let $style := <xsl:stylesheet version="1.0" xmlns:xsl="http:/...
0
votes
1
answer
51
views
number() not supported in LXML XPath parsing?
I am running into some unexpected issues with XPath. I have a query that runs fine when using a database system like BaseX, but in Python with lxml it throws an error.
Here is an example:
import lxml....
0
votes
1
answer
111
views
Output XML file in BaseX DB
I need to create a console app on C# which creates BaseX DB based on a certain xml file and then outputs this file on the console. I've figured out how to connect, create and then make a query to ...
0
votes
1
answer
76
views
XQuery Inject data for testing
I have a library module (lib) with functions in which variables from another module (const) are used. I now want to test the functions from the lib module in a test module. I have tried changing the ...
0
votes
2
answers
127
views
How to convert string to XPATH in BaseX
How can i convert string into XPATH, below is the code
let $ti := "item/title"
let $tiValue := "Welcome to America"
return db:open('test')/*[ $tiValue = $ti]/base-uri()
0
votes
1
answer
92
views
Dynamic combination search on specific path in BaseX
I want to perform dynamic combination (AND OR) search on the basis of the provided parameter by the user.
Search Combination Example:
( (title = "United States" or isbn = "2345371242192&...
0
votes
0
answers
41
views
"No default collection available" error message in BaseX
I've recently reinstalled BaseX on a new laptop. When I run the same xQueries that I've run for years in BaseX, I get the following error message: "No default collection available"
As far as ...
0
votes
0
answers
79
views
Using BaseX 10.3 the parameter 'indent' of serializer option don't work fine
I'm using BaseX 10.3.
I have assigned the following value in my .basex configuration file
# Local Options
SERIALIZER = indent=yes
But the result of my query are not indented.
If I run this query:
for ...
0
votes
1
answer
276
views
BaseX stopped finding anything with XPath
I am a (so far) happy user of BaseX for a few month, but when I wanted to use this tool Today I noticed that for some weird reason the Xpath expressions and Xquery stopped working.
Whatever I type as ...
0
votes
1
answer
101
views
How to write a sequence of XQuery function calls?
I have a lot of such assignment statements let $tmp :=, because otherwise I get the error message "Incomplete FLOWR Expression, expecting return":
declare function module:import($xmlsrc as ...
0
votes
1
answer
71
views
XQuery - Filter deep child nodes for duplicates
I am trying to remove duplicates on a lower level under my elements, as they can not be processed in the system. Unfortunately without much success so far.
The XML has several <Article> childs ...
0
votes
1
answer
85
views
Returning an element and count of element for an xquery
I am new to xquery and I have been tasked with getting a list of how many section listings each instructor has been assigned.
So for example I'd want to return a list with the instructor and the count ...
-1
votes
1
answer
120
views
Can a BaseX database span multiple folders?
New to BaseX. Working on a project where 100's or sometimes 1000's of XML files are generated each day. Due to other exogenous factors, the preferred file structure would look like:
blah/20220714/
...
0
votes
1
answer
129
views
Problem with exercise with Xquery on Basex
I really need your help with a query in BaseX.
The problem is that I really do not understand the logic behind this language which is Xquery.
So I have this first exercise and it is asking me:
"...
1
vote
1
answer
117
views
XSD schema not validating in basex
I am tasked with adding type="DeptType" to an xsd file and validating it in basex against an xml document. I have validated both in notepad++ but I get an error in basex when trying to ...
0
votes
1
answer
71
views
XQuery tumbling window: group by start item of first window
Using BaseX 9.7.3, I have a sorted list of names that has been produced using a tumbling window clause.
A snippet of the data looks like this:
<data>
<group>
<key id="...
0
votes
1
answer
64
views
Toolbar options are disabled in BaseX
I am using BaseX 9.7.2 and I don't know why most of my toolbar options are disabled so I can't use them except for the "New","Open & Manage", "Editor", "Result&...
0
votes
1
answer
354
views
XQuery "Cannot conver to xs:double"
Im new to learning XQuery and im not sure why i get the error "Cannot conver to xs:double" for the
following code:
for $element in db:open("data", "restaurants_basex.json"...
0
votes
1
answer
108
views
How read with xQuery several similar nodes?
Let's imagine I have an XML with the following structure:
<book>
<title>My car is red</title>
<author>Jhon Doe</author>
<date>05-21-2021</date>
<...
0
votes
1
answer
63
views
First steps: Analyze directory hierarchy of XMLs
I am just getting started on using BaseX. For that I downloaded basex97.zip and extracted it.
My xml data files reside in a directory I will call DATA, and in there are multiple directories with the ...
0
votes
1
answer
56
views
How do I prevent duplication of my root xml during my for loop
for $i in doc(test.xml)//hosptial
return file:append(filepath\dirTest.xml,
<studentID>
<hospitalName>
<ambo>{$i//ambo}</ambo>
</hospitalName&...
0
votes
1
answer
224
views
BaseX GUI Command Bar Error Unknown Command
I occassionally use BaseX GUI for examining XML files and trying XSL transforms. I don't know what has happened but I can no longer run one-liners in the Command/Find/XQuery bar that sits below the ...
0
votes
1
answer
304
views
Replace text node with element if text match in the document BaseX
I am trying to replace text node with element if document matches that text, below query I have tried but it is giving error "Target is not an element, text, attribute, comment or pi" below ...
0
votes
1
answer
130
views
Count number of word occurrences working slow BaseX xquery
I want to count occurrences of the words in the XML document, query giving the actual count but it is working slow.
There are only two xml files size (236 KB, 155 KB) and it is taking 17 sec to ...
0
votes
0
answers
61
views
compound queries (composed from separate sources) in basex
I am trying to conceive of a way to use BaseX to process a compound query that incorporates an external query.
The core idea is a very simple application, expressed as an XQuery file, that results in ...
0
votes
1
answer
391
views
How to escape square bracket, curly bracket for "contains text" query in xQuery (BaseX)?
I'm working with a BaseX in which we integrate TEI files.
We are looking for results that contain items with the following text:
"{AAXX}".
The braces are part of the text. (Note that ...
1
vote
1
answer
314
views
How to merge in memory XML documents?
I have 2 batches of documents. In batch 1, I need to merge pit/score when its SPID equals to characteristic/score/SPID. The expected merge looks like batch 2 documents, characteristic/score/default is ...
1
vote
0
answers
42
views
Store unwellformed XHTML in Basex DB
I have to store XHTML which is not wellformed e.g.(<img href"tes.jpg">) so there is no closing element for element or self close.
I am using the REST service to store data into ...
1
vote
1
answer
176
views
BaseX for Wikipedia Dumps: feature_secure_processing Problem
I try to use BaseX (basex.org, no forum, paid help for commercial use cases, no occurrence of the above search term within the help file) db for creating an offline db for a wikipedia text dump (.xml ...
0
votes
1
answer
119
views
Why the where clause doesn't work with count on xQuery?
I'm currently working at a project that requires me some xQueries with a certain dataset. This is a fraction of the said dataset:
<root>
<Transaction>
<Person>
<Full_Name>...
0
votes
0
answers
116
views
Merge/combine BaseX databases with upserts in memory constrained environment
I have two databases in BaseX, source_db and target_db, and would like to merge them by matching on the id attribute of each element and upserting the element with a replace or an insert depending on ...
0
votes
0
answers
56
views
Search for single punctuation character (full-text indexed basex)
There is an entity in my basex database that basically looks like this (I added wrapping):
<Paragraph>
mRNA made from thyroid carcinoma, cDNA made by oligo-dT priming.
Non-directionally ...