cocoon.generator.*
Cocoon Generator Adaption Accessor
Index > Books > Cocoon 2 NetKernel Adaption Kit > Accessor Listing > cocoon.generator.*


Module

urn:org:ten60:netkernel:mod:cocoon

Definition

Format

<instr>
  <type>cocoon.generator.DirectoryGenerator</type>
  <src>file:/home/tab/</src>
  <param>
    <map:parameters xmlns:map="http://apache.org/cocoon/sitemap/1.0">
      <map:parameter name="depth" value="2" />
    </map:parameters>
  </param>
  <target>var:generated-data</target>
</instr>

Syntax

ElementRulesDescription
typeMandatory cocoon.generator.*
srcOptional a source URI specification
paramOptional any parameterisation of generator

This adaptor accessor matches all URI of the form active:cocoon.generator.*. All generators shipped with the version of cocoon specified in the guide are available though many may not be useful because they have no ability to access data from the object model/environment such as the request and session. The exact match for the generators type is matched against the transformers classname, not against a name specified in a sitemap. Sitemaps are not used within the Cocoon 2 NetKernel Adaption Kit.

It provides an adaptor for instantiating and executing a standard cocoon generator which must implement the interface org.apache.cocoon.generation.Generator.

The src and param arguments are optional depending upon the exact generator. The parameter argument, if specified, should be an XML fragment as would appear in the cocoon sitemap pipeline section as the map:transform element with attributes and sub elements specifying parameters.

The result of sucessful execution is an SAX stream generating aspect. Upon failure an exception aspect is thrown.

© 2003,2004, 1060 Research Limited
1060 registered trademark, NetKernel trademark of 1060 Research Limited