Dear BaseX-Community,
I try to access my BaseX-Database or Collection over the Web-Interface.
This is what I´ve done so far:
1) Installed Jetty und started it.
2) Downloaded the BaseX76.war, extracted it to the folder BaseX76 and placed the folder in the Directory "<user>/jetty/webapps".
3) Now I started my Browser (Safari) and went to "http://localhost:8080" => Ok, the jetty-Startpage on my local web server is shown.
4) Now on the Browser, I navigate to "http://localhost:8080/BaseX76/" => OK, the Welcome-Page of baseX-Http-Services is shown. On this page, I click on the link "RestXQ and I get the Page "Welcome to the RestXQ-Service" which has the path "<user>/jetty/webapps/BaseX76/restxq/restxq.xqm". The examples HelloWorld and HelloUniverse give the right responses.
5) I modified the response of the POST-Handler (form) to find out, if this is the right place to do such things:
(This is the modified content:)
-------------- declare %restxq:path("form/") %restxq:POST %restxq:form-param("message","{$message}", "'no message delivered'") function page:hello-postman($message as xs:string) {
let $ZaVar := 'Dies ist Dieter' let $ZaVar2 := ' und dies ist Anne' return <response>
<title>Hello!</title> <info>It seems you posted a message: { $message }</info>
<Za> Dies ist mein Text in Zrestxq und { $ZaVar } { $ZaVar2 } </Za>
</response> ----------------
=> my changes are given as response when I click on the Button of the "Welcome to the RestXQ-Service" page. So far, everything works.
6) My question is now:
a) How do I access my local BaseX-Database (named "ZaTest", which I created and queried successfully by use of the BaseX-Gui?
b) Are there examples or does anybody give me an advice, which settings in the jetty-preferences-files I do have to change, or what text I do have to put into the file "<user>/jetty/webapps/BaseX76/restxq/restxq.xqm".
c) Where (which Filepath) do I have to place the Database-Folder "ZaTest", which I created with the Gui?
d) If I have to connect or open or close the database - how is this done with the restxq-Interface (please example(s)).
------- Thanks in advance. I think, this is a real beginner´s example for people like me, which are very new to jetty and baseX, as well to restxq. I searched all documentation, but didn´t find, what I needed.
Sincerely
Dieter Zanzinger zanzinger@alice-dsl.de