What has changed?

  • From the user point of view mainly the namespaces of your definition, template and bindings files have changed:
    *from xmlns:wd="http://apache.org/cocoon/woody/definition/1.0"BR
    to xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
    *from xmlns:wb="http://apache.org/cocoon/woody/binding/1.0"BR
    to xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
    *from xmlns:wi="http://apache.org/cocoon/woody/instance/1.0"BR
    to xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
    *from xmlns:wt="http://apache.org/cocoon/woody/template/1.0"BR
    to xmlns:ft="http://apache.org/cocoon/forms/1.0#template">
  • Also the namespace of related Java packages has changed from org.apache.cocoon.woody.* to org.apache.cocoon.forms.
    *sitemap This has an impact on your generator and transformer declarations:
    *org.apache.cocoon.woody.generation.WoodyGenerator --> org.apache.cocoon.forms.generation.FormsGenerator
    *org.apache.cocoon.woody.transformation.WoodyTemplateTransformer --> org.apache.cocoon.forms.transformation.FormsTemplateTransformer
    *Also the default hint/name for those two components in the Cocoon sample sitemaps has changed from woody to forms.
    *cocoon.xconf
    *element names (e.g. from woody-binding to forms-binding)
    *class files of widgets have moved from the woody namespace to the forms namespace
  • The name of the default stylesheets of Woody has changed e.g. from "woody-samples-styling.xsl" to "forms-samples-styling.xsl". Also make sure to copy all other files that are responsible for the style into your repository.
  • The flowscript function has changed its name from "woody" to "handleForm" and the function library which is usually included into Woody flowscripts has moved from org/apache/cocoon/woody/flow/javascript/woody2.js to org/apache/cocoon/forms/flow/javascript/Form.js".
  • The repeater binding syntax has been modified for consistency. Furthermore it allows to build the identity of a row from multiple fields:
<fb:repeater id="repeater" row-path="rows" parent-path="." unique-row="id" unique-path="@id">
  <fd:convertor type="long"/>
  <fb:on-bind>
    <fb:value id="rowwidget" path="@rowvalue">
      <fd:convertor type="string"/>
    </fb:value>
  </fb:on-bind>
</fb:repeater>

to

<fb:repeater id="repeater" row-path="rows" parent-path=".">
  <fb:identity>
    <fb:value id="id" path="@id">
      <fd:convertor type="long"/>
    </fb:value>
  </fb:identity>
  <fb:on-bind>
    <fb:value id="rowwidget" path="@rowvalue">
      <fd:convertor type="string"/>
    </fb:value>
  </fb:on-bind>
</fb:repeater>

Can the upgrade be done automatically?

Run the Ant task "Woody2CocoonForms" which is part of the Cocoon build system (run "build Woody2CocoonForms" from your Cocoon base directory). It can also be used to upgrade your custom projects as it requests you to enter the directory which has to be changed at command line.

  • No labels