XQuery/Manipulating URIs

= Motivation = Sometimes you need to be able to manipulate the URI of your own XQuery. This is useful when you need to call your own XQuery with different parameters. For example if you have an XQuery that returns the first 20 rows in a query but you want to add a Get Next 20 Records button you may want to simply call yourself with additional parameters for what record to start with, in this case start at record 21.

This program demonstrates some XQuery functions that are not part of the original XQuery specification but are required for precise web server XQuery functionality.

The functions are:
 * /eXist/ request:get-uri - Returns the URI of the current request within the web server. For example
 * /eXist/ request:get-url - Returns the full URL including the server and port.
 * /eXist/ request:get-query-string - Returns the full query string passed to the servlet (without the initial question mark).
 * /eXist/ system:get-module-load-path - returns the path to the place where a module has been loaded from
 * /eXist/ system:get-exist-home - returns the base of the eXist web root

=Sample Program=