apache > cocoon
 
Font size:      

XML:DB Collection Generator (2.1 legacy document)

Warning
This document was copied as is from the Cocoon 2.1 documentation, but has not yet been fully reviewed or moved to its new home.

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.

Comments

add your comments