Questions tagged [basex]

BaseX is a robust, high-performance XML database engine and a highly compliant XQuery 3.1 processor with full support of the W3C Update and Full Text extensions. It serves as excellent framework for building complex data-intensive web applications.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
37 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 ...
Ruben Vela Nuñez's user avatar
0 votes
1 answer
34 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 ...
MartinK's user avatar
  • 21
0 votes
1 answer
33 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, ...
Mog's user avatar
  • 1
0 votes
1 answer
46 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)/...
meistermuh's user avatar
1 vote
1 answer
104 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 ...
Thanthla's user avatar
  • 526
1 vote
2 answers
43 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....
Jose M Lopez's user avatar
0 votes
1 answer
32 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 &...
Dharmendra Kumar Singh's user avatar
1 vote
1 answer
150 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 $...
Dharmendra Kumar Singh's user avatar
0 votes
0 answers
31 views

Write and read document in the same run

I am using BaseX version 9.5 and trying to ingest docs into database and read it in the same run: let $result := for $i in 1 to 10 return ( db:...
Dharmendra Kumar Singh's user avatar
1 vote
1 answer
53 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 = ...
jpprade's user avatar
  • 3,527
0 votes
1 answer
32 views

BaseX parrallel Client

I have client like this : import org.basex.api.client.ClientSession; @Slf4j @Component(value = "baseXAircrewClient") @DependsOn(value = "baseXAircrewServer") public class ...
jpprade's user avatar
  • 3,527
0 votes
1 answer
62 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:/...
Walley Chan's user avatar
0 votes
1 answer
42 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....
Bram Vanroy's user avatar
  • 27.3k
0 votes
1 answer
76 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 ...
Michael_Y's user avatar
0 votes
1 answer
62 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 ...
user18451290's user avatar
0 votes
2 answers
87 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()
Dharmendra Kumar Singh's user avatar
0 votes
1 answer
80 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&...
Dharmendra Kumar Singh's user avatar
0 votes
0 answers
40 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 ...
Akan's user avatar
  • 1
0 votes
0 answers
43 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 ...
MMT's user avatar
  • 1
0 votes
1 answer
179 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 ...
Monoist's user avatar
0 votes
1 answer
84 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 ...
user18451290's user avatar
0 votes
1 answer
63 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 ...
Alexander D.'s user avatar
0 votes
1 answer
73 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 ...
user avatar
-1 votes
1 answer
90 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/  ...
dcs1001's user avatar
0 votes
1 answer
105 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: "...
Disf's user avatar
  • 3
1 vote
1 answer
96 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 ...
user avatar
0 votes
1 answer
65 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="...
tat's user avatar
  • 321
0 votes
1 answer
42 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&...
iyy0v's user avatar
  • 61
0 votes
1 answer
240 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"...
Winston's user avatar
  • 15
0 votes
1 answer
90 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> <...
Germanpr's user avatar
0 votes
1 answer
54 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 ...
queeg's user avatar
  • 8,120
0 votes
1 answer
55 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&...
Julio's user avatar
  • 3
0 votes
1 answer
159 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 ...
M Bain's user avatar
  • 103
0 votes
1 answer
252 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 ...
Dharmendra Kumar Singh's user avatar
0 votes
1 answer
112 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 ...
Dharmendra Kumar Singh's user avatar
0 votes
0 answers
58 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 ...
brainchild's user avatar
0 votes
1 answer
346 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 ...
corben's user avatar
  • 1
1 vote
1 answer
311 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 ...
Chris's user avatar
  • 123
1 vote
0 answers
41 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 ...
Dharmendra Kumar Singh's user avatar
1 vote
1 answer
165 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 ...
xmlabc's user avatar
  • 11
0 votes
1 answer
113 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>...
Andrea La Rosa's user avatar
0 votes
0 answers
98 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 ...
mrdziuban's user avatar
  • 759
0 votes
0 answers
55 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 ...
Mark Miller's user avatar
  • 3,051
0 votes
1 answer
67 views

Filtering based on an attribute in deep level

Running Xquery on BaseX. I want to filter based on an attribute in a deep level (/BLA1/BLA2/BLA3) but return attribute from both the filtering level and from one above it (/BLA1/BLA2). So, as far as I ...
user16361572's user avatar
1 vote
1 answer
114 views

How to insert XML Content in db using SQL Module

I am a beginner in XQuery and I could use some help on how to insert XML elements in my MySQL database. So far, it only inserts pieces of fragments of an xml file but I'd like to fetch the full ...
Salim-dev's user avatar
0 votes
2 answers
116 views

Error parsing html with extended unicode characters with basex

I have been facing issue with parsing html with extended unicode characters using the basex html parser. Is it possible to make the parser support special characters? Code: let $htmlRaw := '<span ...
Sandeep S's user avatar
  • 218
0 votes
1 answer
51 views

variables undeclared when wrapped with CSV serialization

I have a query that runs over ftp://ftp.ncbi.nlm.nih.gov//biosample/biosample_set.xml.gz in Basex 9.5.1 for $bsattrib in doc( 'biosample_set' )/BioSampleSet/BioSample/Attributes/Attribute let $...
Mark Miller's user avatar
  • 3,051
0 votes
2 answers
231 views

XQuery 3: Count occurrences of element names across document

Building on Count number of elements with same tag I will be running this query with BaseX 9.5.2. Given the data <?xml version="1.0" encoding="UTF-8"?> <bookstore> &...
Mark Miller's user avatar
  • 3,051
2 votes
1 answer
94 views

read non-xml file from BaseX database

How can I read a non-XML (specifically CSV) file that is stored in a BaseX database from a query? csv:doc() expects a URI, how do I point it to a file inside the database?
Mehmet Aydin's user avatar
1 vote
3 answers
510 views

BaseX XQUERY selecting nodes with the value of a specific attribute

XML sample: <mondial> <continent id="f0_119" name="Europe"/> <continent id="f0_123" name="Asia"/> <continent ...
Oscar Cubz's user avatar

1
2 3 4 5
10