cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Cocoon Wiki] New: XFormsInCocoon
Date Wed, 22 Sep 2004 19:26:17 GMT
   Date: 2004-09-22T12:26:17
   Editor: LarsHuttar <>
   Wiki: Cocoon Wiki
   Page: XFormsInCocoon

   no comment

New Page:

=== XForms in Cocoon ===

Although ["CForms"] is the approved way to do forms in Cocoon, it is still possible to use
W3C standard [ XForms]. This page is an attempt
to gather information on the various ways to use XForms in Cocoon, and how to decide whether
you want to do so.

Additions and corrections are welcome.

Potential approaches:

As I looked for XForms implementations, my ideal was an open-source package that would allow
client-side XForms functionality without users having to install additional software (such
as a plugin).

* XMLForms was an XForms package that was part of Cocoon, but
has been removed. (See

* There seems to have been a project called ExFormula, which,
according to,
was to implement XForms for Cocoon. However the sourceforge
project page seems to lack anything beyond the initial
"what it's going to do" statement.

* (Side note: The Web Service Proxy in Cocoon 2.1 depends on XMLForms,
but the samples for the proxy in did not work for
me. I don't know if that is because XMLForms was removed, or what.
If this sample is no longer expected to work, it should probably
be marked as such. Too bad; it sounds like a useful thing.)

* Chiba ( is a servlet webapp (i.e. like a sibling of Cocoon
rather than its child) that implements XForms. I'm not sure how easy it would be to use Chiba
from within Cocoon.
There is a project called Chicoon whose purpose is to integrate Chiba into Cocoon. The latest
available release, 0.1, is not compatible with recent versions of Chiba or Cocoon, but the
author says "I have been working on Chicoon and posted revised source code to the Chiba CVS
repository recently, so it is hardly dormant.  More to come in the way of revised code and
docs very shortly." I look forward to that. In the last release (0.1), there was little documentation
on how to use chicoon.

=== Experiences with Mozquito DENG ===

Looking through the list at [] (which still
lists Cocoon XMLForms, btw), I found "Mozquito DENG zero-install XForms". (Another helpful
XForms implementation list is at [].)

The DENG blurb says "Mozquito's latest XForms implementation is fully client-side and written
Actionscript to allow instant deployment for any flash-6-enabled browser on the web. Mozquito
deploys XForms on for personal communication including Email and Blog over
web via XForms. Supported are subsets of CSS2, CSS3, XHTML, XForms, XFrames and SVG."

I tried DENG and have had good success with it, with a few caveats.
Good points:
1) It's free.
2) Doesn't require an explicit software download (if SWF is already there).
3) DENG is tiny - about 76KB.
4) Looks good.
5) Cool idea -- using a Shockwave movie as an XForms renderer.
6) Lets you deploy XForms to users right away, without having
 to develop or decide on stylesheets for rendering.
7) It's pretty easy to generate the necessary code from Cocoon.
You just generate an HTML page that contains an <object> tag;
the latter has URLs for (a) the deng.swf renderer file on your server,
and (b) the XForms XML document you want to use. Make sure you also put
pipelines in your sitemap to serve requests for (a) and (b).
8) The rendering is customizable via CSS.

Demos of DENG can be found at []
See e.g. []

OK, now the caveats:

1) It's not highly obvious how to get your web pages to use DENG.
However I wrote a tiny how-to which is currently at
and with that, it should be easy.
2) Only a subset of XForms is supported. I'm not sure what's left out;
a feature list is available at
3) Users do have to have a Flash plugin installed. However it seems to
me that most will already have it, or can easily do so.
4) It's a little slow in "rendering" the forms... it can take a few seconds.
But if you have something for users to look at at the top of the page
and the XForm rendering at the bottom, it's not noticeable.
5) If it has to scroll, instead of using browser scrollbars at the side
of the window where you expect them, you have SWF scroll buttons across
the top and bottom of the window, which are not as easy to use.
6) The rendering of the XForms is customizable with CSS, but if you
needed to do more flexible transforms, a la XSLT, between the XForms
markup and the rendering step, you don't have that option.

The caveats don't seem to bad for the time being. Moreover, I feel
comfortable with them because I'm not locked in. If I decide on a
different solution, I should be able to repurpose the XForms output to
some other renderer, such as Chicoon, without much trouble.
I haven't done this yet, but I will most likely create an "insert DENG object"
transformer that isolates any DENG-specific code from the rest.

I would be interested in hearing from others about their experiences
with Cocoon and XForms.

View raw message