IKAT Serializer for Cocoon - WARNING: NOT maintained#

The IKAT Serializer is a Cocoon serializer that allows an RSF Component Tree, expressed in XML form, to be rendered to XHTML using the IKAT rendering engine.

See Cocoon/RSF integration for more information about configuring your Cocoon webapp to use this.


Provisional Documentation#

Put the .html templates in directory mapped to path defined in applicationContext.xml, as in the following stanza:

 <bean id="viewtemplateresolver"
    class="uk.org.ponder.rsf.templateresolver.BasicTemplateResolver">
    <property name="baseDirectory">
      <value>/content/templates/</value>
    </property>
  </bean>

Example sitemap.xmap excerpt...

        <map:serialize type="ikat">
          <map:parameter name="isDebugMode" value="{request-param:ikat_debug}"/>
          <map:parameter name="pathInfo" value="/{request-param:ikat_view}"/>
        </map:serialize>

Parameters:

  • pathInfo: this is used to derive the viewID from which your template (.html) file is selected. Templates are located relative to the base directory mapped in your TemplateResolver.
  • isDebugMode: true/false - currently turning debug mode on logs the byte stream received by the Serializer from Cocoon before passing it to IKAT

Example XML Component Tree to be fed to the Serializer... this XML could have been generated by any means that Cocoon already provides - generators, transformers etc...

<?xml version="1.0" encoding="UTF-8"?>
<view>
  <component id="numberOfResults" type="output">
    <value>1</value>
  </component>
  <component id="item:" type="branchcontainer">
    <component id="id" type="output">
      <value>Demo:37</value>
    </component>
    <component id="titledata" type="output">
      <value>Dissemination Proposal</value>
    </component>
    <component id="titlelink" type="link">
      <target>
        <value>results.html?sortby=title</value>
      </target>
      <linktext>
        <value>Dissemination Proposal</value>
      </linktext>
    </component>
    <component id="projectlink" type="link">
      <target>
        <value>project.html</value>
      </target>
      <linktext>
        <value>Gethsemane Project</value>
      </linktext>
    </component>
    <component id="datedata" type="output">
      <value>1981-04-24</value>
    </component>
    <component id="langdata" type="output">
      <value/>
    </component>
    <component id="descdata" type="output">
      <value>This is Bob Zebedee's report to the funders of the project reporting
             on the progress made in writing up the report and proposing a
             dissemination strategy</value>
    </component>
    <component id="authors:" type="branchcontainer">
      <component id="author:" type="output">
        <value>Z, Bob</value>
      </component>
    </component>
    <component id="datastreamdata:" type="branchcontainer">
      <component id="link:" type="link">
        <target>
          <value>http://doodahzz.org/get/Demo:37/DC</value>
        </target>
        <linktext>
          <value>Dublin Core Metadata</value>
        </linktext>
      </component>
      <component id="link:" type="link">
        <target>
          <value>http://doodahzz.org/get/Demo:37/PDF</value>
        </target>
        <linktext>
          <value>PDF Document</value>
        </linktext>
      </component>
    </component>
    <component id="reldata:" type="branchcontainer"/>
  </component>
</view>

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-) was last changed on 01-Aug-2007 10:46 by UnknownAuthor