You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by do...@cocoon.apache.org on 2005/01/03 11:47:30 UTC
[Cocoon Wiki] Updated: Schema2CocoonForms
Date: 2005-01-03T02:47:30
Editor: NielsVanKampenhout
Wiki: Cocoon Wiki
Page: Schema2CocoonForms
URL: http://wiki.apache.org/cocoon/Schema2CocoonForms
New version of the XSLs with support for repeaters
Change Log:
------------------------------------------------------------------------------
@@ -1,6 +1,6 @@
= Generating a form from an XML schema =
-A returning question on the cocoon user list is "Can I generate a Cocoon Form from an XML schema?". At Hippo (http://www.hippo.nl), we have built several websites that make use of this concept. I have put together a small example that demonstrates transforming an XML schema into a Cocoon Forms definition, template and binding using three similar XSLs: attachment:schema2form.zip.
+A returning question on the cocoon user list is "Can I generate a Cocoon Form from an XML schema?". At Hippo (http://www.hippo.nl), we have built several websites that make use of this concept. I have put together a small example that demonstrates transforming an XML schema into a Cocoon Forms definition, template and binding using three similar XSLs: attachment:schema2form_v2.zip.
The XSLs in this example were actually one of my firsts attempts at XSL/Schema/Cocoon, so they are not examples of very good programming. In addition, they can only transform schemas of a certain, very simple and restricted structure. These XSLs should be considered as a proof of concept, rather than an example of how it should be done.
@@ -22,7 +22,7 @@
= Remarks =
- * There is some commented out code for repeater blocks in the XSLs, but as we did not need repeaters I discontinued working on it. However it should not be difficult to make it work again.
+ * The new v2 version of the ZIP file contains updated XSLs with limited support for repeaters. Any element with a maxOccurs="unbounded" attribute will result in a repeater in the form. This code was incomplete and commented out in the previous version (attachment:schema2form.zip).
* I noticed that with large schemas/forms, checking checkboxes or radiobuttons becomes a very frustrating activity, as the time between clicking and seeing the check appear can be more than a second. See my post on the user list at http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=108323069201433&w=2 for a description of the problem.