apache > cocoon

- Home

# XML:DB Generator

## Warning!

The XML:DB generators are currently unmaintained and going to be deprecated soon. Please use the XML:DB pseudo-protocol instead.

## XML:DB Generator

Generates XML documents out of an XML:DB compliant database. XML:DB is a generic API developed by the XML:DB group in order to allow access via a consistent API to the upcoming XML databases such as dbXML, Ozone and eXist (as of now only the first one has an almost compliant API implementation). For the sake of this document, an XML:DB compliant database can be seen as a filesystem where directories are called "collections" and files are called "resources".

- Name: xmldb
- Class: org.apache.cocoon.generation.XMLDBGenerator
- Cacheable: no

The generator needs to be configured in a "JDBCish" way: a driver (a class name) must be provided, together with a "base" URI. An example configuration, based on the stock dbXML implementation, will look like this:

    <map:generator name="xmldb"
                   src="org.apache.cocoon.generation.XMLDBGenerator"
                   label="content">
      <driver>org.dbxml.client.xmldb.DatabaseImpl</driver>
      <base>xmldb:dbxml:///db/</base>
    </map:generator>

Note that the content of the "base" tag will be prepended to the requested resource. It's important to keep a trailing slash at the end of the `base` tag.

Errors and Improvements? If you see any errors or potential improvements in this document please help us: View, Edit or comment on the latest development version (registration required).