Questions tagged [exist-db]

eXist-db is an open-source database management system built using XML technology. It stores XML data according to the XML data model and features efficient, index-based XQuery processing.

EXist-db is a native XML Database. Resources are stored in a directory-like structure called collections. There are different ways to access the data: XML-RPC, REST, WebDAV, SOAP, XUpdate, XMLDB and so on.

EXist-db is released under the GNU LGPL.

536 questions
9
votes
3 answers

Getting filename of an XML file with XQuery

I store my entities in the eXist XML database and I use a file name (resource id) as an ID of an entity. Example: String xquery = "for $movie in collection('/db/movie')//movie " + "return $movie"; After executing this query I retrieve…
VaclavDedik
  • 1,960
  • 4
  • 20
  • 27
6
votes
2 answers

Scope and statically known namespaces in XQuery

consider a library module ctx xquery version "3.1"; module namespace ctx="module/ctx"; declare function ctx:resolve ( $ctx as function(xs:string) as xs:QName ) as function(xs:string, xs:integer) as function(*)? { function ($name as…
line-o
  • 1,885
  • 3
  • 16
  • 33
6
votes
1 answer

How to preform restore - docker based exists dB

We are running the existdb from the image (existdb/existdb:5.3.0-SNAPSHOT). I am trying to follow information from herre to run restore: https://github.com/eXist-db/docker-existdb/issues/40 However the container based on that image does not seem to…
6
votes
2 answers

Should cast of xs:double to xs:decimal be implemented as BigDecimal.valueOf(double) or new BigDecimal(double)?

XQuery, shared with XSLT and XPath 2.0 and later, supports various number data types, two of them are xs:double and xs:decimal. It is possible to cast an xs:double to an xs:decimal, as defined in…
Martin Honnen
  • 160,499
  • 6
  • 90
  • 110
6
votes
1 answer

XMLHttpRequest cannot load http://localhost:8080/exist/rest/db/.... Origin null is not allowed by Access-Control-Allow-Origin

I am trying to retrieve an XML response using ajax calls to the eXist DB REST API(1). Google Chrome provides me the following console error: XMLHttpRequest cannot load XMLHttpRequest cannot load…
Paul
  • 103
  • 1
  • 2
  • 11
5
votes
3 answers

element() vs. node() in XQuery

Can someone tell me the exact difference between node() and element() types in XQuery? The documentation states that element() is an element node, while node() is any node, so if I understand it correctly element() is a subset of node(). The thing…
pajevic
  • 4,607
  • 4
  • 39
  • 73
5
votes
1 answer

XSLT fails to add DOCTYPE using xs:output

I'm using XSLT to create a HTML output page. I need to add a doctype to the output page. I googled and this seems to be able to get it working:
r1234x
  • 51
  • 3
5
votes
2 answers

Allowing XForm controls for optional XML elements

In designing an XForm interface to an XML database (using eXist and XSLTForms), I'd like to include an input control for an optional element. The XML data records already exist and while some contain the optional element, others don't. To update a…
Cam
  • 146
  • 1
  • 4
5
votes
2 answers

range index on mixed content node in exist db

My xml file is with the structure abca b c xyzx y z I have created a range index on I…
5
votes
5 answers

Dynamic sort (order by), based on variable, in XQuery

I'm trying to implement a dynamic sort in XQuery. I'm currently developing with Saxon-PE 9.5, but will be using the XQuery (or xqueries plural) in eXist and marklogic so any answers using their modules/functions is fine (and hopefully the other db…
Daniel Haley
  • 51,389
  • 6
  • 69
  • 95
5
votes
1 answer

search a path between two graph nodes in XQuery

I'm trying to make an algorithm that searchs and returns a path between two nodes in a graph in xQuery, i've had no luck so far as it returns just one node and it's adyacent nodes. First i should make clear that the graph is a directed graph and…
HardCodeStuds
  • 407
  • 2
  • 11
  • 29
4
votes
1 answer

Fulltext Xquery (Lucene/KWIC) doesn't work on "tagged" result. eXist-db bug?

After reading XQuery documentation and eXist-db documentation, I can't figure it out. The fulltext search with KWIC doesn't work if result is put in a tag. Explanations XML file blablabla blab KEYWORD labla
ag_1812
  • 158
  • 2
  • 10
4
votes
3 answers

force all page visits to refresh/clear cache after login/logout

My site is constructed entirely of dynamic data, some of which changes based on user authentication. When a user "logs in" to the site, I show their new status with their user name in the page navigation bar. However when they visit a page they…
jbrehr
  • 775
  • 6
  • 19
4
votes
1 answer

Usage of & in xquery concat

How can I use & (the ampersand character) in an XQuery concat statement? I'm using eXist DB and this works: concat("Marvin ", "and", " Peter") but this doesn't: concat("Marvin ", "&", " Peter") I'm getting the error: expecting '"', found…
karkraeg
  • 445
  • 4
  • 18
4
votes
1 answer

At what point are variables loaded?

We are refactoring a very large system and looking at many of the xQuery's we have written and wondering if using and including an xQuery that declares many global variables would not help. But the question is for the architects ... are these loaded…
Kevin Brown
  • 8,805
  • 2
  • 20
  • 38
1
2 3
35 36