=Module Declarations=
A RESTXQ module must contain a declaration to the namespace {{Mono|http://exquery.org/ns/rest/annotationrestxq}}. A ''Resource Function'' is an XQuery function that has been marked up with RESTXQ annotations (annotations will be introduced with the upcoming [[XQuery 3.0]] standard). When an HTTP request comes in, a resource function will be invoked that matches the constraints indicated by its annotations.
A simple RESTXQ module is shown below:
module namespace hw = 'http://basex.org/modules/restxq-demo';
declare namespace rest = 'http://exquery.org/ns/rest/annotationrestxq';
declare