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 Conversion
|
The xqDoc conversion package is a collection of vendor neutral Java classes with the sole responsibility of
converting valid XQuery library modules and main modules into xqDoc XML. The package leverages the open source ANTLR
parser to assist with the processing of XQuery library modules and main modules. There are some key
assumptions and limitations
associated with the xqDoc conversion package that have been documented.
The following is a brief description for the major classes contained in the xqDoc conversion package
and their basic interactions with one another and the outside world.
XQDocController
This is the class that drivers will use to process a library module or main module. Drivers will
have the ability to set 'predefined' namespace and prefix mappings as well as a default function
namespace. After a driver invokes the process() method in XQDocController, the controller will create
the supporting cast of objects including the XQDocContext (the context) and XQDocParser (the parser). The
controller will then pass control to the parser (after setting the context in the parser) to begin processing the module.
When the parser is finished processing the module, the controller will call a method in the context to set
the generated xqDoc XML and xqDoc URI in the XQDocPayload and return the payload to the driver.
XQDocContext
This class is created and initialized by the controller. It is then passed to the parser where the
parser will make periodic callbacks that will set variables in the context. When called by the controller
(after the parser is finished processing the module) the context will then create the XQDocXML class and invoke methods to generate the xqDoc XML.
Finally, the context will create the XQDocPayload and set the generated xqDoc XML and xqDoc URI
in this payload. This payload is then returned to the driver (via the controller).
XQDocPayload
This is the 'container' class that will hold the response returned from the controller to the driver. The
payload (set by the context) will consist of the generated xqDoc XML and the xqDoc URI. Although not required, the driver should then store the xqDoc
XML into the vendor specific XML database with the associated xqDoc URI or the filesystem with an appropriate filename.
XQDocXML
This is the class that knows how to generate xqDoc XML. The context will create and invoke various methods (and
supply the necessary information) to enable this class to construct the xqDoc XML.
XQDocParser
This is the ANTLR generated class (addressed by this interface) that will actually parse the library
and main modules. While processing the module, the parser will make periodic callbacks to the context.
These callbacks will set variables in the context that will subsequently enable XQDocXML to generate
the xqDoc XML.
The javadoc or source for
the xqDoc conversion package is a great resource for uncovering further details about the classes contained
in this package.
|
|