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"
- Also the namespace of related Java packages has changed from org.apache.cocoon.woody.* to org.apache.cocoon.forms.
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.
- 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 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>
<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.