Inspection Module

From BaseX Documentation
Revision as of 00:12, 31 May 2013 by CG (talk | contribs)
Jump to navigation Jump to search

This XQuery Module contains functions for generating xqDoc files from XQuery modules.


xqDoc provides a simple vendor neutral solution for generating a documentation from XQuery modules. The documentation conventions have been inspired by the JavaDoc standard. Documentation comments begin with (:~ and end with :), and tags start with @. xqDoc comments can be specified for main and library modules, variable declarations and function declarations, as shown in the following example:

 : This module provides some sample functions to demonstrate
 : the features of the XQDoc Module.
 : @author BaseX Team
 : @see
 : @version 1.0
module namespace samples = '';

(:~ This is a sample number. :)
declare variable $samples:number := 1;

 : This function simply returns the specified number.
 : @param $number number to return
 : @return specified number
declare function samples:same($number as xs:integer) as xs:integer {


All functions in this module are assigned to the namespace, which is statically bound to the xqdoc prefix.
All errors are assigned to the namespace, which is statically bound to the bxerr prefix.



Signatures xqdoc:parse($input as xs:string) as element(xqdoc:xqdoc)
Summary Parses the specified $input and generates an xqDoc element.


This module was introduced with Version 7.7.