The goal of xqDoc is to provide a simple vendor neutral solution for documenting XQuery modules, as well as tools to generate a user friendly presentation of this documentation and cross referencing information. Therefore, xqDoc proposes a new commenting convention that extends the currently defined XQuery comment style. This convention is modeled after Java's Javadoc commenting style, and provides a simple, uniform way to document XQuery source code. You can find more information about xqDoc on the website of the xqDoc project. This library module provides XQDoc utility functions.
Generating a user friendly presentation of the documentation is accomplished in the following steps:
This module implements the first and second step of this process. That is, Zorba can parse XQuery modules which are annotated with xqDoc-style documentation and generate the vendor neutral XML representation.
xqdoc-content
($module as xs:string) as element(*)
Generated the an XQDoc XML document for the module provided as parameter to this function. |
xqdoc-content
($module as xs:string, $options as element(opt:enable)) as element(*)
Generated the an XQDoc XML document for the module provided as parameter to this function. |
xqdoc
($module-uri as xs:string) as element(*)
Generates an XQDoc XML document for the module located at the URI provided as parameter to this function. |
xqdoc
($module-uri as xs:string, $options as element(opt:enable)) as element(*)
Generates an XQDoc XML document for the module located at the URI provided as parameter to this function. |
declare function xqd:xqdoc-content($module as xs:string) as element(*)
declare function xqd:xqdoc-content($module as xs:string, $options as element(opt:enable)) as element(*)
<enable xmlns="http://zorba.io/modules/xqdoc-options" comments="true" functions="true" indexes="true" >
declare %an:nondeterministic function xqd:xqdoc($module-uri as xs:string) as element(*)
declare function xqd:xqdoc($module-uri as xs:string, $options as element(opt:enable)) as element(*)
<enable xmlns="http://zorba.io/modules/xqdoc-options" comments="true" functions="true" indexes="true" />