Implementations of xqDoc have three main components:

  1. A component to parse the XQuery source code and generate the corresponding xqDoc XML elements for functions and variables, etc.

  2. A component to parse xqDoc style comments (:~ … :) into the corresponding xqDoc.

  3. Optionally, a means to render the resulting XML into formats for reading, such as HTML. This part typically uses XSLT.