=Module Declarations=
A RESTXQ module must contain a declaration to the namespace {{Mono|http://exquery.org/ns/rest/annotation}}. A resource function ''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: