cocoon.serializer.*
Cocoon Serializer Adaption Accessor
Index > Books > Cocoon 2 NetKernel Adaption Kit > Accessor Listing > cocoon.serializer.*


Module

urn:org:ten60:netkernel:mod:cocoon

Definition

Format

<instr>
  <type>cocoon.serializer.HTMLSerializer</type>
  <operand>var:transformed-data</operand>
  <configuration>
    <configuration mime-type="text/html">
      <doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN</doctype-public>
      <doctype-system>http://www.w3.org/TR/html4/loose.dtd</doctype-system>
    </configuration>
  </configuration>
  <target>this:response</target>
</instr>

Syntax

ElementRulesDescription
typeMandatory cocoon.serializer.*
operandMandatory input from previous stage in pipeline
paramOptional any parameterisation of serializer
configurationOptional any configuration of serialzer

This adaptor accessor matches all URI of the form active:cocoon.serializer.*. All serializers shipped with the version of cocoon specified in the guide are available. The exact match for the serializers type is matched against the serializers 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 serializers which must implement the interface org.apache.cocoon.serialization.Serializer.

The param and configuration arguments are optional depending upon the exact transformer. 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 configuration argument, if specified, should be an XML fragment as would appear in the cocoon sitemap components section as the map:transformer with attributes and sub elements specifying configuration.

The distinction between parameters and configuration is subtle. In Cocoon components are pooled and all components of a type in a pool must have the same configuration, parameters can be applied differently each time they are used within a sitemap. Because NetKernel does not use Cocoons pooling mechanism configuration and parameters may be applied differently on each usage of a component.

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

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