Project
History
Mission
Quotes
License
News
Related Efforts
XQuery Style
Quick Start
General
BaseX
eXist
MarkLogic
Saxon
xquerydoc
Zorba
Documentation
Assumptions
Limitations
xqDoc Comments
xqDoc Schema
xqDoc Conversion
xqDoc Display
xqDoc Drivers
Downloads
Binaries
Source
Sample Output
xqDoc Basic
xqDoc Standard
xqDoc Enhanced
Credits
Who We Are
|
|
|
|
xqDoc Drivers
|
This section briefly describes driver functionality suggestions for xqDoc independent of any
vendor's specific XQuery implementation. For information on xqDoc drivers for a vendor specific
implementation, visit the QuickStart guide.
The following set of xqDoc drivers define the core functionality that is desirable for any vendor's XQuery implementation
that fronts an underlying XML database. The first two drivers are for creating and storing xqDoc XML into a XML database.
The third driver is for accessing xqDoc XML stored in the XML database and creating an off-line xqDoc
static XHTML presentation view.
FileDriver
This driver processes XQuery library and main modules stored in a file system. The generated
xqDoc XML for each module is then stored in the 'xqdoc' collection for the XML database. This
driver will invoke vendor neutral methods defined in the XQDoc Conversion package to parse
the modules and retrieve the generated xqDoc XML. In particular, the driver will only interact
with the XQDocController class [view the XQDocController javadoc] contained in the xqDoc Conversion package. Vendor specific methods will need to be provided to
properly insert the generated xqDoc XML into the vendor's XML database.
Here is a vendor neutral FileDriver code snippet that provides a representative example for
interacting with XQDocController. By using this code sample as a template, it should take little
effort to develop a xqDoc FileDriver for a particular vendor's XML database.
ModuleDriver
This driver will process XQuery library and main modules stored in a vendors XML database as opposed to the file system.
The generated xqDoc XML for each module is then stored in the 'xqdoc' collection for the XML
database. This driver will invoke vendor neutral methods defined in the xqDoc Conversion
package to parse the modules and retrieve the generated xqDoc XML. In particular, the driver will only interact
with the XQDocController class [view the XQDocController javadoc] contained in the xqDoc Conversion package. Vendor specific methods will need to be
provided to retrieve the modules to be parsed from the vendor's database and insert the generated
xqDoc XML into the vendor's XML database.
ZipDriver
This driver will process all of the xqDoc XML files stored in the 'xqdoc' collection and
create a static view of the documentation by creating numerous XHTML files and placing them
into a zip file named xqdoc.zip. This view of xqDoc XML is useful for those people who may
not have real-time access to the XML database for dynamically rendering the content via scripts.
Instead, an appointed person can create the .zip file and disseminate the files to the appropriate people.
Since the xqDoc XML is already stored in the XML database, this driver will not need to invoke
any methods defined in the xqDoc Conversion package. But, vendor specific methods may need to be provided to
properly execute XQuery functions contained in xqdoc/xqdoc-display.
In particular, the following functions will be directly executed by the driver.
- get-module-uris()
Get the list of xqDoc module URIs stored in the xqdoc collection.
- get-default-html(true())
Get the xqDoc home page. The parameter of 'true()' indicates
that links should be built for 'off-line' viewing.
- get-module-html(uri, true())
Get the module display page for the specified xqDoc module uri. The parameter of
'true()' indicates that links should be built for 'off-line' viewing.
- get-code-html(uri, (), true())
Get the module source code for the specified xqDoc module uri. The parameter of
'true()' indicates that links should be built for 'off-line' viewing.
- get-function-names(uri)
Get the list of functions defined within the specified xqDoc module uri.
- get-code-html(uri, functionName, true())
Get the function source code for the specified xqDoc module uri and function name.
The parameter of 'true()' indicates that links should be built for 'off-line' viewing.
The following xqDoc driver defines the core functionality that is desirable for XQuery processors that
are not reliant upon an XML database.
LiteDriver
This driver processes XQuery library and main modules stored in a file system. The generated
xqDoc XML for each module is then stored in the filesystem. This driver will invoke vendor neutral
methods defined in the XQDoc Conversion package to parse
the modules and retrieve the generated xqDoc XML. In particular, the driver will only interact
with the XQDocController class [view the XQDocController
javadoc]
contained in the xqDoc Conversion package. Vendor specific methods will need to be provided to
properly transform the xqDoc XML stored in the filesystem to XHTML. Overall, this driver is very
similar to the FileDriver; the main exception is the LiteDriver does not leverage a XML database.
|
|