I want to build a website, the service is so simple: It gets a document as input, and tries to replace each word of it with something that it keeps in the database for the word.
It also has a forum in which people can vote for the equivalents, and these votes form the basis of the main service.
I want to do it in XML way, meaning that in bottom there is an XML native database, and there is an XQuery engine in the middle layer, handling the requests and elections.
However, the problem is that although I’ve read a lot about each of these product, and also implemented some codes, I don’t have any clue from where I should start.
I mean I don’t know what should be displayed to users, and how I can pass the form to the XQuery engine in server side, and how I connect the XQuery to the database.
You need three components;
Examples
XML database/processor: You could simply store your XML data as plain text files on disk, in which case you only need an XML processor eg. Saxon-HE. This is absolutely fine for data of less than say 1mb in size. Above 1mb you’ll probably need a combined xquery processor and XML database eg. Saxon-PE, eXist DB, BaseX or Qizx. This wiki page lists the major ones.
Web server: You’re creating a website so you need a web server, eg. Apache, IIS or Nginx. In this context, the web server accepts an HTTP request from the web browser, then invokes the scripting language engine which in turn invokes the xquery processor. The web server then returns an HTTP response to the browser.
A scripting language to tie everything together eg. PHP, ASP or PERL.
I’m currently using this combination;
In the past I’ve used;
and;
The trickiest bit is working out how to get your chosen scripting language to invoke your chosen xquery processor.