apache > cocoon
 

XML:DB Collection 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 Collection Generator

As for the filesystem there are two generators provided (a file generator and a directory generator), so is for XML:DB, which can roughly be tought as an XML filesystem, where Collections stand for directories and Resources stand for (XML) files.

This generator outputs a list of collections and resources given a starting collection. It can be used together with the XMLDBGeneratot, and coupled with the appropriate XSLT, to easily navigate any XML:DB compliant database.

  • Name: xmldbcollection
  • Class: org.apache.cocoon.generation.XMLDBCollectionGenerator
  • Cacheable: no

The configuration is the same of the XMLDBGenerator: it needsi a driver (a class name) and base URI. An example configuration, based on the stock dbXML implementation, will look like this:

<map:generator name="xmldbcollection"
               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.