ivelin 02/05/20 06:33:50 Modified: src/webapp/WEB-INF/db cocoondb.backup cocoondb.data cocoondb.properties cocoondb.script src/webapp/docs/samples sample-apps.xml src/webapp/samples samples.xml Added: src/webapp/samples/xmlform README.txt sitemap.xmap src/webapp/samples/xmlform/schematron wizard-xmlform-sch-report.xml src/webapp/samples/xmlform/stylesheets wizard2html.xsl src/webapp/samples/xmlform/wizard Readme.txt confirm.xml deployment.xml end.xml start.xml system.xml userIdentity.xml Log: moved XMLForm demo from webapp/mount to webapp/samples added link to it from the refactored samples page webapp/samples/samples.xml Revision Changes Path 1.2 +1 -2 xml-cocoon2/src/webapp/WEB-INF/db/cocoondb.backup <<Binary file>> 1.3 +1 -3 xml-cocoon2/src/webapp/WEB-INF/db/cocoondb.data <<Binary file>> 1.4 +1 -1 xml-cocoon2/src/webapp/WEB-INF/db/cocoondb.properties Index: cocoondb.properties =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/WEB-INF/db/cocoondb.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- cocoondb.properties 20 May 2002 06:53:15 -0000 1.3 +++ cocoondb.properties 20 May 2002 13:33:49 -0000 1.4 @@ -1,4 +1,4 @@ #HSQL database -#Mon May 20 01:42:46 CDT 2002 +#Mon May 20 08:21:25 CDT 2002 version=1.6 modified=yes 1.5 +3 -5 xml-cocoon2/src/webapp/WEB-INF/db/cocoondb.script Index: cocoondb.script =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/WEB-INF/db/cocoondb.script,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- cocoondb.script 20 May 2002 06:53:15 -0000 1.4 +++ cocoondb.script 20 May 2002 13:33:49 -0000 1.5 @@ -4,8 +4,8 @@ CREATE TABLE GROUPS(GID INTEGER IDENTITY PRIMARY KEY,GNAME VARCHAR,UNIQUE(GNAME)) CREATE TABLE USER_GROUPS(UID INTEGER,GID INTEGER,UNIQUE(UID,GID),FOREIGN KEY(UID)REFERENCES USER(UID),FOREIGN KEY(GID)REFERENCES GROUPS(GID)) CREATE TABLE STATE_TAX(CATEGORY VARCHAR NOT NULL,GROSSTAX_COLLECTED DOUBLE NOT NULL,NETTAX_COLLECTED DOUBLE NOT NULL,YEAR INTEGER NOT NULL) -GRANT ALL ON CLASS "org.hsqldb.Library" TO PUBLIC GRANT ALL ON CLASS "java.lang.Math" TO PUBLIC +GRANT ALL ON CLASS "org.hsqldb.Library" TO PUBLIC CREATE USER SA PASSWORD "" ADMIN CREATE ALIAS DAYNAME FOR "org.hsqldb.Library.dayname" CREATE ALIAS SPACE FOR "org.hsqldb.Library.space" @@ -115,7 +115,5 @@ INSERT INTO STATE_TAX VALUES('Horse Racing',1.7921198E7,1.7321198E7,2001) INSERT INTO STATE_TAX VALUES('Severance',7981539.0,7967438.0,2001) INSERT INTO STATE_TAX VALUES('School District Income',1.61257059E8,1.53238001E8,2001) -/*C1*/CONNECT USER sa PASSWORD "" -/*C2*/CONNECT USER sa PASSWORD "" -/*C5*/CONNECT USER sa PASSWORD "" -/*C6*/CONNECT U \ No newline at end of file +/*C3*/CONNECT USER sa PASSWORD "" +/*C4*/CONNECT USER sa PASSWORD "" 1.4 +2 -2 xml-cocoon2/src/webapp/docs/samples/sample-apps.xml Index: sample-apps.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/docs/samples/sample-apps.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- sample-apps.xml 20 May 2002 06:53:16 -0000 1.3 +++ sample-apps.xml 20 May 2002 13:33:50 -0000 1.4 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- CVS: $Id: sample-apps.xml,v 1.3 2002/05/20 06:53:16 ivelin Exp $ --> +<!-- CVS: $Id: sample-apps.xml,v 1.4 2002/05/20 13:33:50 ivelin Exp $ --> <samples xmlns:xlink="http://www.w3.org/1999/xlink"> @@ -31,7 +31,7 @@ <group name="Sample Forms"> - <sample name="Cocoon Feedback Wizard" href="mount/xmlform/wizard.html" xlink:role="dynamic"> + <sample name="Cocoon Feedback Wizard" href="samples/xmlform/wizard.html" xlink:role="dynamic"> Presents a sophisticated form handling demo - multi page wizard with two way navigation. Features the 1.6 +20 -1 xml-cocoon2/src/webapp/samples/samples.xml Index: samples.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/samples.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- samples.xml 19 May 2002 19:21:32 -0000 1.5 +++ samples.xml 20 May 2002 13:33:50 -0000 1.6 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- CVS: $Id: samples.xml,v 1.5 2002/05/19 19:21:32 ovidiu Exp $ --> +<!-- CVS: $Id: samples.xml,v 1.6 2002/05/20 13:33:50 ivelin Exp $ --> <samples xmlns:xlink="http://www.w3.org/1999/xlink"> @@ -66,6 +66,25 @@ <sample name="Examples" href="flow/samples.html"> Samples implemented using control flow. + </sample> + </group> + + <group name="Form Handling"> + <sample name="Documentation" href="xmlform/README.txt"> + Introduction to Cocoon's form handling framework, + which provides + <xlink:link href="http://www.w3.org/MarkUp/Forms/">XForms</xlink:link> + based markup, + <xlink:a href="http://www.ascc.net/xml/resource/schematron/schematron.html">Schematron</xlink:a> + instance validation and + automated binding to + <xlink:a href="http://java.sun.com/products/javabeans/">JavaBeans</xlink:a> and + <xlink:a href="http://www.w3.org/DOM/">DOM</xlink:a> instances. + </sample> + + <sample name="Examples" href="xmlform/wizard.html"> + Presents a sophisticated form handling demo - + multi page wizard with two way navigation. </sample> </group> 1.1 xml-cocoon2/src/webapp/samples/xmlform/README.txt Index: README.txt =================================================================== The XMLForm framework is inspired by Apache Jakarta Struts and W3C XForms. Its goal is to: * Ease the development of sophisticated web applications utilizing complex data types and multi-page transactions * Provide an automated 2 way mapping between HTML Forms <-> XML <-> JavaBeans * Use standard XML validation languages like XML Schema, Relax-NG, Schematron for data validation * Promote natural reuse of validation, binding and business logic between cocoon actions (which are best utilized for interactive clients driven web applications ) and web services (which are in turn becoming the standard machine-to-machine web technology) * In doing so, utilize as much as possible of the existing cocoon 2 technology. More specifically: actions, action sets, cocoon-action parameters and transformers. * Utilize existing XPath tools like JXPath for read/write access to JavaBeans, DOM nodes and mixed objects. -------------------------------------------------------------------------------------------- The current implementation offers the following features: 1) Automated 2 way binding of HTML Forms to JavaBeans (and DOM nodes) through XPath 2) Automatic validation of JavaBeans(and DOM nodes) through Schematron schemas 3) Intermediate XForms like XML markup for form views -------------------------------------------------------------------------------------------- To try the demo, link to: http://localhost:8080/cocoon/mount/xmlform/wizard.html -------------------------------------------------------------------------------------------- For questions contact: Ivelin Ivanov, [EMAIL PROTECTED] -------------------------------------------------------------------------------------------- Following is a summary provided by Daniel Fagerstrom <[EMAIL PROTECTED]> Background ---------- The aim of XMLForm, is to build and edit an xml document (called the instance), subject to constraints from some schema (XMLSchema, Schematron, ...), through a sequence of form pages. The instance is either a dom-document or a Java bean-structure or a mix. XMLForm consist, of three main components: * Form - is responsible for the instance and validation of it. Form objects are stored in request attributes for one page forms and session attributes for wizards (multi page forms). A Form can be populated from the request parameters. This is the "model in MVC terms. * XMLFormTransformer - takes a form descriptor, (similar to XForms) as input and fill it with data and error messages from a Form object that is referred in an attribute. This is the "view" in MVC terms. * AbstractXMLFormAction, (WizardAction) - creates the Form object if necessary and populates it with data based on the request parameters. It can also take care of flow handling and checkbox state. This is the "controller" in MVC terms. -------------------------------------------------------------------------------------------- Following are copies of the announcement emails send to the Cocoon development mailing list. [EMAIL PROTECTED] <[EMAIL PROTECTED]> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ----- Original Message ----- From: "Ivelin Ivanov" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 16, 2002 Subject: [Announcement] Cocoon Form Handling - XML Form Release 0.8 First, I would like to thank everyone who participates in the Form Handling discussion. I have learned a lot from this discussion in the last few weeks. There are plenty of great ideas coming from all directions, and some of them influenced my thinking significantly. As I have already mention more than once, I have a certain fear that this topic may be too large to handle at once and may eventually wind up as it did several times before (Schemox, ExFormular, etc.) I would very much like this time Cocoon to end up with a better overall form handling solution, than the one that currently exists. It does not have to be perfect from the start. With all tha said, I am presenting to anyone interested the new incarnation of the xmlform solution. It has gone through major refactoring based on heavy influence from Torsten and Konstantin. I will not advertsise what it is this time. I would instead encourage people who are *really* interested in bettering Cocoon, to look at the demo and provided feedback. This time there is only one demo, which is an extension of the survey wizard, originally offered by Torsten. Once you build c2 with scratchpad, point to http://localhost:8080/cocoon/mount/xmlform/wizard.html For those who will take the time to peek in, I would like to request votes on the following: 1) Does this solution prohibit further extensions in directions that you might be interested? 2) Does this solution offer better overall form handling than the existing one for C2? 3) Can this solution be the base for 2.1? Thanks everyone, Ivelin ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ----- Original Message ----- From: "Ivelin Ivanov" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Sam Robertson" <[EMAIL PROTECTED]>; "Torsten Curdt" <[EMAIL PROTECTED]>; "Dmitri Plotnikov" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, March 14, 2002 3:31 PM Subject: [Announcement] HTML Form binding and validation arrived =============================================================== ! The HTML Form symmetry loop is closed: ! =============================================================== HTML Forms <-> XPath <-> JavaBeans <-> XML -> Schematron -> HTML Forms =============================================================== Just released the next version of the symmetric Form binding and validation toolkit ( a CocoonBlock wannabe :). In addition to the form-binding it now has integrated Schematron validation support. The zip file can be downloaded from: http://prdownloads.sourceforge.net/freebuilder/CocoonForm_0-6.zip With this in place one can provide form binding with just a few lines of code (~5 lines) and Sophisticated form validation with 0! lines of Java code. ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ----- Original Message ----- From: "Ivelin Ivanov" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Oliver Becker" <[EMAIL PROTECTED]>; "Rick Jelliffe" <[EMAIL PROTECTED]>; "Dmitri Plotnikov" <[EMAIL PROTECTED]> Sent: Sunday, March 24, 2002 7:03 AM Subject: [Announcement] Fast Schematron Validation Here ! We've got the rainbow ! +===========================================+ + *Fast* Java API for Schematron Validation *Ready* ! + +===========================================+ + Validates both JavaBeans and DOM nodes + +===========================================+ It's been another long and fruitful Saturday here in Austin... I am grateful to everyone in the Cocoon community as well as Dmitri Plotnikov for his help with JXPath, Rick Jelliffe for his guidance with Schematron and Oliver Becker for the clarifications on his XSLT based Java API for Schematron. As I mentioned already, I've decided to implement Schematron in Java using JXPath. The result is surprisingly little code (~1K lines) and quite exciting speed (~20ms per validation for the demo setup). What's more: - Does not need Castor mapping - Does not do XSL transformation - Direct access through the JXPath library * Someone let me know if this can be implemented too much faster * I hope this answers some outstanding questions like: "How do we validate HTML Forms ?" "How do we reuse validation rules and code for HTML Forms, Web Services and domain validation ?" "What language do we use or build to implement validation?" I am not sure if the credits should all go to Schematron or more to XPath, but Schematron being so simple and powerful is clearly my choice: - Schemas can grow organicly. One can start with a few simple rules and grow the document with time. - Native support for validation in "phases". Unlike XML Schema, one doesn't need to provide a complete document in order to be able to perform validation. - Pin-points the bad elements and provides user-friendly reporting. - Very, very simple to learn if one knows XPath. (I just can stop repeating that.) ... ~~~~~~~~~~~~~~~~~~~~~ <end-of-file/> 1.1 xml-cocoon2/src/webapp/samples/xmlform/sitemap.xmap Index: sitemap.xmap =================================================================== <?xml version="1.0"?> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> <!-- =========================== Components ================================ --> <map:components> <map:actions> <map:action name="WizardAction" src="org.apache.cocoon.samples.xmlform.WizardAction" logger="webapp.xmlform"/> </map:actions> <map:generators default="file"/> <map:transformers default="xslt"> <map:transformer name="xmlform" src="org.apache.cocoon.transformation.XMLFormTransformer" logger="webapp.xmlform"/> </map:transformers> <map:readers default="resource"/> <map:serializers default="html"/> <map:selectors default="browser"/> <map:matchers default="wildcard"> <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcherFactory"/> </map:matchers> </map:components> <!-- =========================== Resources ================================= --> <map:resources> </map:resources> <!-- =========================== Pipelines ================================= --> <map:pipelines> <map:pipeline> <map:match pattern=""> <map:redirect-to uri="wizard.html"/> </map:match> <!-- A non-trivial example - Feedback Wizard --> <map:match pattern="wizard.html"> <map:act type="WizardAction"> <!-- XMLForm parameters for the AbstractXMLFormAction --> <map:parameter name="xmlform-validator-schema-ns" value="http://www.ascc.net/xml/schematron"/> <map:parameter name="xmlform-validator-schema" value="schematron/wizard-xmlform-sch-report.xml"/> <map:parameter name="xmlform-id" value="form-feedback"/> <map:parameter name="xmlform-scope" value="session"/> <map:parameter name="xmlform-model" value="org.apache.cocoon.samples.xmlform.UserBean"/> <!-- Content transformation logic --> <map:generate src="wizard/{page}.xml"/> <map:transform type="xmlform" label="xml"/> <map:transform src="stylesheets/wizard2html.xsl"/> <map:transform src="context://stylesheets/xmlform/xmlform2html.xsl"/> <map:serialize type="html"/> </map:act> </map:match> </map:pipeline> </map:pipelines> </map:sitemap> <!-- end of file --> 1.1 xml-cocoon2/src/webapp/samples/xmlform/schematron/wizard-xmlform-sch-report.xml Index: wizard-xmlform-sch-report.xml =================================================================== <?xml version="1.0" ?> <!-- Validating Schematron schema for the xmlform example wizard Schematron Schema language home page: http://www.ascc.net/xml/schematron/ Author: Ivelin Ivanov, [EMAIL PROTECTED], April 2002 --> <schema ns="http://xml.apache.cocoon/xmlform" xmlns="http://www.ascc.net/xml/schematron"> <title>Schema for the XML Form example</title> <phase id="userIdentity"> <p>For user identity information.</p> <active pattern="user"/> </phase> <phase id="deployment"> <p>For deployment info page.</p> <active pattern="dep" /> </phase> <phase id="system"> <p>For system info page.</p> <active pattern="sys" /> </phase> <phase id="confirm"> <p>For final total validation and tracking some tricky problems.</p> <active pattern="user" /> <active pattern="dep" /> <active pattern="sys" /> </phase> <pattern name="User Info Validation Pattern" id="user"> <rule context="/firstName"> <assert test="string-length(.) > 3" diagnostics="dname dcount"> First name should be at least 4 characters. </assert> <assert test="string-length(.) < 20"> First name should be less than 20 characters. </assert> </rule> <rule context="/lastName"> <assert test="string-length(.) > 3" diagnostics="dname dcount"> Last name should be at least 4 characters. </assert> <assert test="string-length(.) < 20"> Last name should be less than 20 characters. </assert> </rule> <rule context="/email"> <assert test="contains( string(.),'@')"> Email format is invalid. </assert> </rule> <rule context="/age"> <assert test="number() > 0 and number(.) < 200"> Age should be a reasonably big positive number. </assert> </rule> </pattern> <pattern name="Deployment Information Validation Pattern" id="dep"> <rule context="/number"> <assert test="number() > 0"> The number of deployments must be non-negative ( hopefully positive :-> ) . </assert> </rule> <rule context="/"> <!-- If the site is to be published, then verify the URL. Note: This assertion demonstrates the unique ability of Schematron to test document node dependencies. This is not possible to do with XML Schema and Relax NG. --> <assert test="not(string(publish) = 'true') or (starts-with(liveUrl, 'http://') and contains( string(liveUrl),'.') ) "> The URL of the published site is invalid. </assert> </rule> </pattern> <pattern name="System Information Validation Pattern" id="sys"> <rule context="/system/@ram"> <assert test="number() > 0"> The RAM value should be a positive number, denoting the memory in MB (e.g. 128, 512, etc.). </assert> </rule> </pattern> </schema> 1.1 xml-cocoon2/src/webapp/samples/xmlform/stylesheets/wizard2html.xsl Index: wizard2html.xsl =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!-- Cocoon Feedback Wizard XMLForm processing and displaying stylesheet. This stylesheet merges an XMLForm document into a final document. It includes other presentational parts of a page orthogonal to the xmlform. author: Ivelin Ivanov, [EMAIL PROTECTED], May 2002 original Author: Konstantin Piroumian, [EMAIL PROTECTED], 21-Feb-2002 --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002" exclude-result-prefixes="xalan" > <xsl:template match="document"> <html> <head> <title>XMLForm - Cocoon Feedback Wizard</title> <style type="text/css"> <![CDATA[ H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color : #0086b2;} HR{color : #0086b2;} input { background-color: #FFFFFF; color: #000099 } table { background-color: #EEEEEE; color: #000099; font-size: x-small; border: 2px solid brown;} select { background-color: #FFFFFF; color: #000099 } .error { color: #FF0000; } .invalid { color: #FF0000; border: 2px solid #FF0000; } .info { color: #0000FF; border: 1px solid #0000FF; } .repeat { border: 0px inset #999999;border: 1px inset #999999; width: 100%; } .group { border: 0px inset #999999;border: 0px inset #999999; width: 100%; } .sub-table { border: none; } .button { background-color: #FFFFFF; color: #000099; border: 1px solid #666666; width: 70px; } ]]> </style> </head> <body> <xsl:apply-templates /> </body> </html> </xsl:template> <xsl:template match="xf:form"> <xf:form method="post"> <xsl:copy-of select="@*" /> <br/><br/><br/><br/> <table align="center" border="0"> <tr> <td align="center" colspan="3"> <h1> <xsl:value-of select="xf:caption"/> <hr/> </h1> </td> </tr> <xsl:if test="count(error/xf:violation) > 0"> <tr> <td align="left" colspan="3" class="{error/xf:violation[1]/@class}"> <p> * There are [<b><xsl:value-of select="count(error/xf:violation)"/></b>] errors. Please fix these errors and submit the form again. </p> <p> <xsl:variable name="localViolations" select=".//xf:*[ child::xf:violation ]"/> <xsl:for-each select="error/xf:violation"> <xsl:variable name="eref" select="./@ref"/> <xsl:if test="count ($localViolations[ @ref=$eref ]) = 0"> * <xsl:copy-of select="." /> <xsl:value-of select="." /> <br/> </xsl:if> </xsl:for-each> </p> <p/> </td> </tr> </xsl:if> <xsl:for-each select="*[name() != 'xf:submit']"> <xsl:choose> <xsl:when test="name() = 'error'"/> <xsl:when test="xf:*"> <xsl:apply-templates select="."/> </xsl:when> <xsl:otherwise> <xsl:copy-of select="."/> </xsl:otherwise> </xsl:choose> </xsl:for-each> <tr> <td align="center" colspan="3"> <xsl:for-each select="*[name() = 'xf:submit']"> <xsl:copy-of select="." /> <xsl:text> </xsl:text> </xsl:for-each> </td> </tr> </table> </xf:form> </xsl:template> <xsl:template match="xf:repeat"> <tr width="100%"> <td colspan="3" width="100%"> <table class="repeat"> <xsl:apply-templates select="*"/> </table> </td> </tr> </xsl:template> <xsl:template match="xf:group"> <tr width="100%"> <td width="100%" colspan="2"> <table class="group" border="0"> <xsl:apply-templates select="*"/> </table> </td> </tr> </xsl:template> <xsl:template match="xf:output[@form]"> <div align="center"> <hr width="30%"/> <br/> <font size="-1"> <code> <xsl:value-of select="xf:caption" /> : <xsl:copy-of select="." /> </code> </font> <br/> </div> </xsl:template> <xsl:template match="xf:*"> <tr> <td align="left"> <xsl:value-of select="xf:caption" /> </td> <td> <xsl:copy-of select="." /> </td> <xsl:if test="xf:violation"> <td class="{xf:violation[1]/@class}" width="100%"> <xsl:for-each select="xf:violation"> * <xsl:value-of select="." /> <br/> </xsl:for-each> </td> </xsl:if> </tr> </xsl:template> <xsl:template match="*"> <xsl:copy-of select="." /> </xsl:template> </xsl:stylesheet> 1.1 xml-cocoon2/src/webapp/samples/xmlform/wizard/Readme.txt Index: Readme.txt =================================================================== This example use a more cleaner approach. The views are defined in XML and the stylesheet only renders into the desired media. Inserting of instance data will happen from within a transformer. 1.1 xml-cocoon2/src/webapp/samples/xmlform/wizard/confirm.xml Index: confirm.xml =================================================================== <?xml version="1.0" ?> <!-- XMLForm instance document for the Cocoon Feedback Wizard. Original Author: Torsten Curdt, [EMAIL PROTECTED], March 2002 Author: Ivelin Ivanov, [EMAIL PROTECTED], April 2002 --> <document xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002"> <xf:form id="form-feedback" view="confirm" action="wizard.html"> <xf:caption>Confirm Input</xf:caption> <!-- from page1 --> <xf:output ref="/firstName"> <xf:caption>First Name</xf:caption> </xf:output> <xf:output ref="/lastName"> <xf:caption>Last Name</xf:caption> </xf:output> <xf:output ref="/email"> <xf:caption>Email</xf:caption> </xf:output> <xf:output ref="/age"> <xf:caption>Age</xf:caption> <xf:violations class="error"/> </xf:output> <xf:group ref="/"> <xf:caption>Professional roles</xf:caption> <xf:repeat nodeset="/role"> <xf:output ref="."/> </xf:repeat> </xf:group> <!-- from page2 --> <xf:output ref="/number"> <xf:caption>Number of installations</xf:caption> </xf:output> <xf:output ref="/liveUrl"> <xf:caption>Live URL</xf:caption> </xf:output> <xf:output ref="/publish"> <xf:caption>Publish URL</xf:caption> </xf:output> <!-- from page3 --> <xf:output ref="/system/os"> <xf:caption>OS</xf:caption> </xf:output> <xf:output ref="/system/processor"> <xf:caption>Processor</xf:caption> </xf:output> <xf:output ref="/system/@ram"> <xf:caption>RAM</xf:caption> </xf:output> <xf:output ref="/system/servletEngine"> <xf:caption>Servlet Engine</xf:caption> </xf:output> <xf:output ref="/system/javaVersion"> <xf:caption>Java Version</xf:caption> </xf:output> <xf:group ref="/" id="favorites_group"> <xf:caption>Favorite web sites</xf:caption> <xf:repeat nodeset="/favorite[position() <= 3]" id="favorites"> <xf:output ref="." class="info"> <xf:caption>URL: </xf:caption> </xf:output> </xf:repeat> </xf:group> <!-- submit --> <xf:submit id="prev" class="button"> <xf:caption>Prev</xf:caption> </xf:submit> <xf:submit id="next" class="button"> <xf:caption>Finish</xf:caption> </xf:submit> </xf:form> <xf:output ref="/count" id="show_count" form="form-feedback" class="info"> <xf:caption>Visits Count</xf:caption> </xf:output> </document> 1.1 xml-cocoon2/src/webapp/samples/xmlform/wizard/deployment.xml Index: deployment.xml =================================================================== <?xml version="1.0" ?> <!-- XMLForm instance document for the Cocoon Feedback Wizard. Original Author: Torsten Curdt, [EMAIL PROTECTED], March 2002 Author: Ivelin Ivanov, [EMAIL PROTECTED], April 2002 --> <document xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002"> <xf:form id="form-feedback" view="deployment" action="wizard.html"> <xf:caption>Cocoon Deployment Information</xf:caption> <error> <xf:violations class="error"/> </error> <xf:textbox ref="/number"> <xf:caption>Number of deployments</xf:caption> <xf:violations class="error"/> </xf:textbox> <xf:textbox ref="/liveUrl"> <xf:caption>Live URL</xf:caption> <xf:violations class="error"/> </xf:textbox> <xf:selectBoolean ref="/publish"> <xf:caption>Publish</xf:caption> </xf:selectBoolean> <xf:group nodeset="" id="favorites_group"> <xf:caption>Favorite web sites</xf:caption> <!-- repeat is a very powerful iterator tag, because it iterates over a nodeset resulting from a the nodeset selector attribute. Very similar to xslt's for-each tag. In this case we iterate over the top three favorite web sites. --> <xf:repeat nodeset="/favorite[position() <= 3]" id="favorites"> <xf:textbox ref="." class="info"> <xf:caption>URL: </xf:caption> </xf:textbox> </xf:repeat> </xf:group> <xf:submit id="prev" class="button"> <xf:caption>Prev</xf:caption> </xf:submit> <xf:submit id="next" class="button"> <xf:caption>Next</xf:caption> </xf:submit> </xf:form> <xf:output ref="/count" id="show_count" form="form-feedback" class="info"> <xf:caption>Visits Count</xf:caption> </xf:output> </document> 1.1 xml-cocoon2/src/webapp/samples/xmlform/wizard/end.xml Index: end.xml =================================================================== <?xml version="1.0" ?> <document> <br/><br/><br/> <table align="center" width="50%" cellspacing="20"> <tr> <td align="center"> <h1> Congratulations, Wizard Complete! </h1> </td> </tr> <tr> <td align="center" class="info"> <code> Your feedback form was processed successfully. </code> </td> </tr> <tr> <td align="center"> <h3> <a href="wizard.html">Go to home page.</a> </h3> </td> </tr> </table> </document> 1.1 xml-cocoon2/src/webapp/samples/xmlform/wizard/start.xml Index: start.xml =================================================================== <?xml version="1.0" ?> <document> <br/><br/><br/> <table align="center" width="50%" cellspacing="20"> <tr> <td align="center"> <h1> Welcome ! </h1> </td> </tr> <tr> <td align="center" class="info"> <code> This wizard will collect feedback information for the <a href="http://xml.apache.org/cocoon">Apache Cocoon</a> project ! </code> </td> </tr> <tr> <td align="center"> <h3> <a href="wizard.html?cocoon-action-start=true"> Start! </a> </h3> </td> </tr> </table> </document> 1.1 xml-cocoon2/src/webapp/samples/xmlform/wizard/system.xml Index: system.xml =================================================================== <?xml version="1.0" ?> <!-- XMLForm instance document for the Cocoon Feedback Wizard. Original Author: Torsten Curdt, [EMAIL PROTECTED], March 2002 Author: Ivelin Ivanov, [EMAIL PROTECTED], April 2002 --> <document xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002"> <xf:form id="form-feedback" view="system" action="wizard.html"> <xf:caption>System Information</xf:caption> <error> <xf:violations class="error"/> </error> <xf:group ref="/system"> <xf:selectOne ref="os"> <xf:caption>OS</xf:caption> <xf:item id="unix"> <xf:caption>Unix/Linux</xf:caption> <xf:value>Unix</xf:value> </xf:item> <xf:item id="mac"> <xf:caption>Mac OS/X</xf:caption> <xf:value>Mac OS/X</xf:value> </xf:item> <xf:item id="win"> <xf:caption>Windows 95/98/NT/2000</xf:caption> <xf:value>Windows</xf:value> </xf:item> <xf:item id="other"> <xf:caption>Other</xf:caption> <xf:value>Other</xf:value> </xf:item> </xf:selectOne> <xf:selectOne ref="processor"> <xf:caption>Processor</xf:caption> <xf:item> <xf:caption>AMD/Athlon</xf:caption> <xf:value>Athlon</xf:value> </xf:item> <xf:item> <xf:caption>AMD/Duron</xf:caption> <xf:value>Duron</xf:value> </xf:item> <xf:item> <xf:caption>Pentium Celeron</xf:caption> <xf:value>Celeron</xf:value> </xf:item> <xf:item> <xf:caption>Pentium III</xf:caption> <xf:value>p3</xf:value> </xf:item> <xf:item> <xf:caption>Pentium IV</xf:caption> <xf:value>p4</xf:value> </xf:item> <xf:item> <xf:caption>Other</xf:caption> <xf:value>other</xf:value> </xf:item> </xf:selectOne> <xf:textbox ref="@ram"> <xf:caption>RAM</xf:caption> <xf:violations class="error"/> </xf:textbox> <xf:selectOne ref="servletEngine"> <xf:caption>Servlet Engine</xf:caption> <xf:item> <xf:caption>Tomcat</xf:caption> <xf:value>Tomcat</xf:value> </xf:item> <xf:item> <xf:caption>Jetty</xf:caption> <xf:value>Jetty</xf:value> </xf:item> <xf:item> <xf:caption>Resin</xf:caption> <xf:value>Resin</xf:value> </xf:item> <xf:item> <xf:caption>Weblogic</xf:caption> <xf:value>weblogic</xf:value> </xf:item> <xf:item> <xf:caption>WebSphere</xf:caption> <xf:value>WebSphere</xf:value> </xf:item> <xf:item> <xf:caption>Other</xf:caption> <xf:value>other</xf:value> </xf:item> </xf:selectOne> <xf:selectOne ref="javaVersion"> <xf:caption>Java Version</xf:caption> <xf:item> <xf:caption>1.1</xf:caption> <xf:value>1.1</xf:value> </xf:item> <xf:item> <xf:caption>1.2</xf:caption> <xf:value>1.2</xf:value> </xf:item> <xf:item> <xf:caption>1.3</xf:caption> <xf:value>1.3</xf:value> </xf:item> <xf:item> <xf:caption>1.4</xf:caption> <xf:value>1.4</xf:value> </xf:item> <xf:item> <xf:caption>Other</xf:caption> <xf:value>Other</xf:value> </xf:item> </xf:selectOne> </xf:group> <xf:submit id="prev" class="button"> <xf:caption>Prev</xf:caption> </xf:submit> <xf:submit id="next" class="button"> <xf:caption>Next</xf:caption> </xf:submit> </xf:form> <xf:output ref="/count" id="show_count" form="form-feedback" class="info"> <xf:caption>Visits Count</xf:caption> </xf:output> </document> 1.1 xml-cocoon2/src/webapp/samples/xmlform/wizard/userIdentity.xml Index: userIdentity.xml =================================================================== <?xml version="1.0" ?> <!-- XMLForm instance document for the Cocoon Feedback Wizard. Original Author: Torsten Curdt, [EMAIL PROTECTED], March 2002 Author: Ivelin Ivanov, [EMAIL PROTECTED], April 2002 --> <document xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002"> <xf:form id="form-feedback" view="userIdentity" action="wizard.html"> <xf:caption>Personal Information</xf:caption> <error> <xf:violations class="error"/> </error> <xf:textbox ref="/firstName"> <xf:caption>First Name</xf:caption> <xf:violations class="error"/> </xf:textbox> <xf:textbox ref="/lastName"> <xf:caption>Last Name</xf:caption> <xf:violations class="error"/> </xf:textbox> <xf:textbox ref="/email"> <xf:caption>Email</xf:caption> <xf:violations class="error"/> </xf:textbox> <xf:textbox ref="/age"> <xf:caption>Age</xf:caption> <xf:violations class="error"/> </xf:textbox> <xf:selectMany ref="/role" selectUIType='listbox'> <xf:caption>Professional roles</xf:caption> <xf:item> <xf:caption>Geek</xf:caption> <xf:value>Geek</xf:value> </xf:item> <xf:item> <xf:caption>Hacker</xf:caption> <xf:value>Hacker</xf:value> </xf:item> <xf:item> <xf:caption>Student</xf:caption> <xf:value>Student</xf:value> </xf:item> <xf:item> <xf:caption>University Professor</xf:caption> <xf:value>University Professor</xf:value> </xf:item> <xf:item> <xf:caption>Software Developer</xf:caption> <xf:value>Developer</xf:value> </xf:item> <xf:item> <xf:caption>Technical Leader</xf:caption> <xf:value>Tech Lead</xf:value> </xf:item> <xf:item> <xf:caption>Development Manager</xf:caption> <xf:value>Development Manager</xf:value> </xf:item> <xf:item> <xf:caption>Executive</xf:caption> <xf:value>Executive</xf:value> </xf:item> <xf:item> <xf:caption>Heir of the Apache tribe</xf:caption> <xf:value>Heir of the Apache tribe</xf:value> </xf:item> </xf:selectMany> <xf:submit id="next" class="button"> <xf:caption>Next</xf:caption> </xf:submit> </xf:form> <xf:output ref="/count" id="show_count" form="form-feedback" class="info"> <xf:caption>Visits Count</xf:caption> </xf:output> </document>
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]