Questions tagged [restxq]

RESTXQ is an API which provides XQuery 3.0 annotations and functions in order to facilitate the use of XQuery as server-side processing language for web application development.

RESTXQ is an which provides annotations and functions in order to facilitate the use of as server-side processing language for development. RESTXQ maps requests to XQuery functions by using a pre-defined set of XQuery 3.0 annotations. These XQuery functions then generate and return HTTP responses. For questions on RESTful services in general please use the tag.

Useful Links:

14 questions
3
votes
1 answer

Is there a way to make BaseX serve an HTML document?

Is there a way to make BaseX's HTTP server serve an HTML document stored either in the db as a raw resource or in the file system, with a text/html content type, so it can be displayed in a browser? The document is a web page that does XHR requests…
ARX
  • 1,040
  • 2
  • 14
  • 20
2
votes
1 answer

How to "stitch together" results into a single XML document with eXist-db?

How do I create a "single" result of one notes element as the root node, with multiple child nodes of note elements? Here's the query in eXide: xquery version "3.0"; for $note in collection('/db/tmp')/note return {$note} where…
2
votes
2 answers

How to register RESTXQ module in eXist-db?

I am trying to use RESTXQ in my exist-db application - lets call it "superapp". I added the restxq trigger to /db/apps/superapp/collection.xconf:
2
votes
2 answers

exist-db restxq trigger : Services deleted but still active

I have issues with the RESTXQ implementation in exist-db. I think it might be the RestXQTrigger which is not working correctly. The problem: I deleted (via the Dashboard) a collection including RESTXQ services inside several .xqm files. However, the…
Eric S
  • 452
  • 4
  • 10
1
vote
2 answers

Returning a zip file from an eXist-db RestXQ call

I am working on creating a zip file of several XML documents from eXist-db. This method creates the zip file, but does not return it. I tried storing in exist, but the zip file is not the proper format. How do I get the call to return the zip…
Loren Cahlander
  • 1,257
  • 1
  • 10
  • 24
1
vote
1 answer

How to configure a "hello world" HTML page using BaseX with RestXQ?

More of a usage question than a programming question, in relation to: BaseX RESTXQ "hello world" example How do I use RESTXQ with BaseX for a simple web app? basex/rest - blog complete app Is there a way to make BaseX serve an HTML…
1
vote
0 answers

Exist-db parallel request(bulk request) failed on exist db restxq (post,put)

I am facing a problem on restxq multiple parallel request of post, put. When request from web application as async bulk request (approx. more then 5 ). I am using exist db 5.1.0 or 5.1.1 I am sending request through angular forkjoin because of i…
1
vote
2 answers

How to authenticate exist-db users in RESTXQ

(complete rephrase - since no answer): I am developing an exist-db application with user authentication and RESTXQ. My users log in via the login:set-user function from the login module. Here a snippet from the controller: import module namespace…
1
vote
2 answers

How can I return JSONP in RestXQ (using eXist-db)?

I cannot figure out how to return JSONP in RestXQ. After adding let $x := util:declare-option("exist:serialize", fn:concat("method=json jsonp=",request:get-parameter("callback", "callback"))) to the function, I get the error…
klickagent.ch
  • 559
  • 6
  • 21
1
vote
1 answer

Too many files open with a RestXQ service

I have a eXist 2.1 (version eXist-db-setup-2.1-rev18721) installed on a Debian server, on which a very simple RestXQ service is set: declare %rest:PUT("{$content}") %rest:path("/foo") function init:init($content as node()*) as item()+ { …
lomobob
  • 11
  • 1
0
votes
1 answer

Why does Firefox show: XML Parsing Error: junk after document element?

Error: yet from the console, desired output: nicholas@mordor:~$ nicholas@mordor:~$ curl http://localhost:8080/exist/rest/db/scripts/notes.xq Tove Jani Reminder Don't forget me this…
0
votes
1 answer

FLWOR query in eXist gives: XML Parsing Error: no root element found

I'm looking to adapt the simplest possible FLWOR possible from BaseX to eXist as below. Error in eXist: XML Parsing Error: no root element found Location: http://localhost:8080/exist/rest/db/scripts/notes.xq Line Number 1, Column 1: Query: xquery…
0
votes
0 answers

Exist-db Multiple request(post,put) failed on restxq

I am facing a problem on restxq multiple parallel request of post, put. When request from web application as async bulk request (approx. more then 5 ).…
DC Gayari
  • 1
  • 1
0
votes
1 answer

RestXQ [XPTY0004] Cannot convert empty-sequence() to document-node()

I have a RestXQ method: declare %rest:path("/doSomething") %rest:POST %rest:form-param("name","{$name}") function page:doSomething($name as document-node()) { (: Code... :) }; I tried to send a POST request to this…
Ian Fako
  • 1,148
  • 1
  • 15
  • 34