Simple Linear Pipeline
Pipeline of Generator->Transformer->Serializer
Index > Books > Cocoon 2 NetKernel Adaption Kit > Example Pipelines > Simple Linear Pipeline


<idoc>
  <comment>Initialise Cocoon if necessary</comment>
  <instr>
    <type>cocoon.Initialise</type>
    <operand>cocoon.xconf</operand>
  </instr>
  <comment>Read XML document from a URI</comment>
  <instr>
    <type>cocoon.generator.FileGenerator</type>
    <src>data.xml</src>
    <target>var:a</target>
  </instr>
  <comment>Transform to a simple HTML document</comment>
  <instr>
    <type>cocoon.transformer.TraxTransformer</type>
    <src>simple.xsl</src>
    <operand>var:a</operand>
    <target>var:b</target>
  </instr>
  <comment>Serialise to HTML</comment>
  <instr>
    <type>cocoon.serializer.HTMLSerializer</type>
    <operand>var:b</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>
</idoc>
© 2003,2004, 1060 Research Limited
1060 registered trademark, NetKernel trademark of 1060 Research Limited