Changes

Jump to navigation Jump to search
41 bytes added ,  02:04, 21 July 2016
All RESTXQ [[XQuery 3.0#Annotations|annotations]] are assigned to the <code><nowiki>http://exquery.org/ns/restxq</nowiki></code> namespace, which is statically bound to the {{Code|rest}} prefix. A ''Resource Function'' is an XQuery function that has been marked up with RESTXQ annotations. When an HTTP request comes in, a resource function will be invoked that matches the constraints indicated by its annotations.
Whenever If a RESTXQ URL is requested, the [[Options#RESTXQPATH|RESTXQPATH]] module directory and its sub-directories will be traversed, and all [[XQuery Extensions#Suffixes|XQuery files]] will be parsed for functions with RESTXQ annotations in library modules (detected by the extension {{Code|.xqm}}) and main modules (detected by Sub-directories that include an {{Code|.xqignore}}). In main expressions, the main module file will never be evaluated. All modules will be cached and parsed again when their timestamp changesskipped.
To speed up processing, the functions of parsed XQuery modules will automatically be cached in main memory. A sub-directory cached module will not be invalidated and parsed for RESTXQ files again if it contains a file named {{Code|its timestamp changes.ignore}}. Module caching The timestamp check can be turned on disabled by setting enabling the [[Options#CACHERESTXQ|CACHERESTXQ]] to trueoption. The option This is helpful in recommedable for productive environments with a high load, but . If files should not be are all the same replaced while the web server is running. If files are still replaced, the RESTXQ module cache must be explicitly invalidated by calling the static root path {{Code|/.init}}or by calling the [[RESTXQ Module#rest:init|rest:init]] function.
==Examples==
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu