Since Thomas asked about anyone being interested in XForms with Cocoon, I thought I would share the results of my looking into the combination the last few days.
Doubtless, many will know more about this subject than me, so I welcome corrections and additions. This email will just focus on the how-to, not on the why of XForms in Cocoon. Potential approaches: XMLForms was an XForms package that was part of Cocoon, but has been removed. (See http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=108876021513344&w=2) There seems to have been a project called ExFormula, which, according to http://cocoon.apache.org/link/projects.html, 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 2.1.5.1 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 (http://chiba.sourceforge.net/) 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. However, it seems to have lain dormant since April 2003 and is not compatible with recent versions of Chiba or Cocoon. There is little documentation on how to use it either. The Chiba Cookbook has a section on Chicoon but it's empty. 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). Looking through the list at http://www.w3.org/MarkUp/Forms/#implementations (which still lists Cocoon XMLForms, btw), I found "Mozquito DENG zero-install XForms". [Another helpful XForms implementation list is at http://www.xml.com/pub/a/2003/09/10/xforms.html?page=1] The DENG blurb says "Mozquito's latest XForms implementation is fully client-side and written in Actionscript to allow instant deployment for any flash-6-enabled browser on the web. Mozquito deploys XForms on MarkupLanguage.net for personal communication including Email and Blog over the 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 http://claus.packts.net/deng/examples/ See e.g. http://claus.packts.net/deng/deng_test.php?f=examples/xforms/textarea.html&debug=1 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 http://claus.packts.net/deng/forum/viewtopic.php?t=201 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 http://claus.packts.net/deng/features.php 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 should add a disclaimer... I'm pretty new to XForms (and CForms). So far I have really only worked with a simple form display sample, and have not delved into repeater widgets or submission options. So it's possible that there are issues of substance that I haven't yet encountered. I would be interested in hearing from others about their experiences with Cocoon and XForms. Lars --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
