I hope these are the files you requested.
Environment:
Cocoon 2.1-dev
Tomcat 4.1.3
JDK 1.3.1_03
Win2K
-------------------------------------------------------------------
start.xml
<?xml version="1.0" ?>
<document>
<br/><br/><br/>
<table align="center" width="50%" cellspacing="20">
<tr>
<td align="center">
<h1>
Welcome to the XLMForm How-To!
</h1>
</td>
</tr>
<tr>
<td align="center" class="info">
<code>
The following form allows users to join mailing lists.
They are given a choice of areas of interest.
Depending on their interests they will see a
selection of mailing lists to which they can sign up.
</code>
</td>
</tr>
<tr>
<td align="center">
<h3>
<a
href="howto-wizard.html?cocoon-action-start=true">
Start!
</a>
</h3>
</td>
</tr>
</table>
</document>
-------------------------------------------------------------------
registration.xml
<?xml version="1.0" ?>
<document xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002">
<xf:form id="form-feedback" view="registration"
action="howto-wizard.html">
<xf:caption>Registration</xf:caption>
<error>
<xf:violations class="error"/>
</error>
<xf:textbox ref="/userName">
<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:password ref="/password">
<xf:caption>Password</xf:caption>
<xf:violations class="error"/>
</xf:password>
<xf:submit id="next" class="button">
<xf:caption>Next</xf:caption>
</xf:submit>
</xf:form>
</document>
-------------------------------------------------------------------
interest.xml
<?xml version="1.0" ?>
<document xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002">
<xf:form id="form-feedback" view="interest"
action="howto-wizard.html">
<xf:caption>Areas of Interest</xf:caption>
<xf:selectBoolean ref="/organicGardening">
<xf:caption>Organic Gardening</xf:caption>
</xf:selectBoolean>
<xf:selectBoolean ref="/cooking">
<xf:caption>Cooking</xf:caption>
</xf:selectBoolean>
<xf:selectBoolean ref="/smallholdingManagement">
<xf:caption>Smallholding Management</xf:caption>
</xf:selectBoolean>
<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>
</document>
-------------------------------------------------------------------
smallholdingManagement.xml
<?xml version="1.0" ?>
<document xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002">
<xf:form id="form-feedback" view="smallholdingManagement"
action="howto-wizard.html">
<xf:caption>Smallholding Management Mailing Lists</xf:caption>
<xf:selectBoolean ref="/pigKeeping">
<xf:caption>Pig Keeping</xf:caption>
</xf:selectBoolean>
<xf:selectBoolean ref="/pygmyGoats">
<xf:caption>Pygmy Goats</xf:caption>
</xf:selectBoolean>
<xf:selectBoolean ref="/henKeeping">
<xf:caption>Hen Keeping</xf:caption>
</xf:selectBoolean>
<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>
</document>
-------------------------------------------------------------------
organicGardening.xml
<?xml version="1.0" ?>
<document xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002">
<xf:form id="form-feedback" view="organicGardening"
action="howto-wizard.html">
<xf:caption>Organic Gardening Mailing Lists:</xf:caption>
<xf:selectBoolean ref="/flowers">
<xf:caption>Flowers</xf:caption>
</xf:selectBoolean>
<xf:selectBoolean ref="/vegetables">
<xf:caption>Vegetables</xf:caption>
</xf:selectBoolean>
<xf:selectBoolean ref="/fruitTrees">
<xf:caption>Fruit Trees</xf:caption>
</xf:selectBoolean>
<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>
</document>
-------------------------------------------------------------------
cooking.xml
<?xml version="1.0" ?>
<document xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002">
<xf:form id="form-feedback" view="cooking" action="howto-wizard.html">
<xf:caption>Cooking Mailing Lists:</xf:caption>
<xf:selectBoolean ref="/traditionalRecipes">
<xf:caption>Traditional Recipes</xf:caption>
</xf:selectBoolean>
<xf:selectBoolean ref="/soups">
<xf:caption>Soups</xf:caption>
</xf:selectBoolean>
<xf:selectBoolean ref="/veganCookery">
<xf:caption>Vegan Cookery</xf:caption>
</xf:selectBoolean>
<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>
</document>
-------------------------------------------------------------------
confirm.xml
<?xml version="1.0" ?>
<document xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002">
<xf:form id="form-feedback" view="confirm" action="howto-wizard.html">
<xf:caption>Confirm Input</xf:caption>
<!-- from page1 -->
<xf:output ref="/userName">
<xf:caption>User Name</xf:caption>
</xf:output>
<xf:output ref="/email">
<xf:caption>Email</xf:caption>
</xf:output>
<xf:output ref="/password">
<xf:caption>Password</xf:caption>
</xf:output>
<!-- from page2 -->
<xf:output ref="/organicGardening">
<xf:caption>Organic Gardening</xf:caption>
</xf:output>
<xf:output ref="/cooking">
<xf:caption>Cooking</xf:caption>
</xf:output>
<xf:output ref="/smallholdingManagement">
<xf:caption>Smallholding Management</xf:caption>
</xf:output>
<!-- from page3 -->
<xf:output ref="/flowers">
<xf:caption>Flowers</xf:caption>
</xf:output>
<xf:output ref="/vegetables">
<xf:caption>Vegetables</xf:caption>
</xf:output>
<xf:output ref="/fruitTrees">
<xf:caption>Fruit Trees</xf:caption>
</xf:output>
<!-- from page4 -->
<xf:output ref="/traditionalRecipes">
<xf:caption>Traditional Recipes</xf:caption>
</xf:output>
<xf:output ref="/soups">
<xf:caption>Soups</xf:caption>
</xf:output>
<xf:output ref="/veganCookery">
<xf:caption>Vegan Cooking</xf:caption>
</xf:output>
<!-- from page5 -->
<xf:output ref="/pigKeeping">
<xf:caption>Pig Keeping</xf:caption>
</xf:output>
<xf:output ref="/pygmyGoats">
<xf:caption>Pygmy Goats</xf:caption>
</xf:output>
<xf:output ref="/henKeeping">
<xf:caption>Hen Keeping</xf:caption>
</xf:output>
<!-- 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>
</document>
-------------------------------------------------------------------
end.xml
<?xml version="1.0" ?>
<document>
<br/><br/><br/>
<table align="center" width="50%" cellspacing="20">
<tr>
<td align="center">
<h1>
You have reached the last page of the How-To Form
example!
</h1>
</td>
</tr>
<tr>
<td align="center" class="info">
<code>
Your registration form was processed successfully.
</code>
</td>
</tr>
<tr>
<td align="center">
<h3>
<a href="howto-wizard.html">Go to home page.</a>
</h3>
</td>
</tr>
</table>
</document>
-------------------------------------------------------------------
schematron\howto-xmlform-sch-report.xml
<?xml version="1.0" ?>
<schema ns="http://xml.apache.cocoon/xmlform"
xmlns="http://www.ascc.net/xml/schematron">
<title>Schema for the XML Form example</title>
<phase id="registration">
<p>For user identity information.</p>
<active pattern="reg"/>
</phase>
<phase id="confirm">
<p>For final total validation and tracking
some tricky problems.</p>
<active pattern="reg" />
</phase>
<pattern name="User Info Validation Pattern" id="reg">
<rule context="/userName">
<assert test="string-length(.) > 7">
Username should be at least 8 characters.
</assert>
<assert test="string-length(.) < 20">
Username should be less than 20 characters.
</assert>
</rule>
<rule context="/password">
<assert test="string-length(.) > 7">
Password should be at least 8 characters.
</assert>
<assert test="string-length(.) < 20">
Password should be less than 20 characters.
</assert>
</rule>
<rule context="/email">
<assert test="contains( string(.),'@')">
Email format is invalid.
</assert>
</rule>
</pattern>
</schema>
-------------------------------------------------------------------
HowToBean.java
package org.apache.cocoon.samples.xmlform.howto;
import java.util.Set;
import java.util.HashSet;
import java.util.List;
import java.util.ArrayList;
import org.w3c.dom.*;
import javax.xml.parsers.*;
import javax.xml.transform.*;
/**
*
* A sample JavaBean used as a Form model.
*
*/
public class HowToBean
{
private String username = "DonaldDuck";
private String email = "[EMAIL PROTECTED]";
private String password = "secret123";
private boolean organicGardening = true;
private boolean cooking = true;
private boolean smallholdingManagement = true;
private boolean flowers = true;
private boolean vegetables = true;
private boolean fruitTrees = true;
private boolean traditionalReciepes = true;
private boolean soups = true;
private boolean veganCookery = true;
private boolean pigKeeping = true;
private boolean pygmyGoats = true;
private boolean henKeeping = true;
public HowToBean ()
{
}
public String getUserName() {
return username;
}
public void setUserName(String newUserName) {
username = newUserName;
}
public String getPassword() {
return password;
}
public void setPassword(String newPassword) {
password = newPassword;
}
public String getEmail() {
return email;
}
public void setEmail(String newEmail) {
email = newEmail;
}
public boolean getOrganicGardening()
{
return organicGardening;
}
public void setOrganicGardening( boolean newOrganicGardening )
{
organicGardening = newOrganicGardening;
}
public boolean getCooking()
{
return cooking;
}
public void setCooking( boolean newCooking )
{
cooking = newCooking;
}
public boolean getSmallholdingManagement()
{
return smallholdingManagement;
}
public void setSmallholdingManagement( boolean
newSmallholdingManagement )
{
smallholdingManagement = newSmallholdingManagement;
}
public boolean getFlowers()
{
return flowers;
}
public void setFlowers( boolean newFlowers )
{
flowers = newFlowers;
}
public boolean getVegetables()
{
return vegetables;
}
public void setVegetables( boolean newVegetables )
{
vegetables = newVegetables;
}
public boolean getFruitTrees()
{
return fruitTrees;
}
public void setFruitTrees( boolean newFruitTrees )
{
fruitTrees = newFruitTrees;
}
public boolean getTraditionalReciepes()
{
return traditionalReciepes;
}
public void setTraditionalReciepes( boolean newTraditionalReciepes )
{
traditionalReciepes = newTraditionalReciepes;
}
public boolean getSoups()
{
return soups;
}
public void setSoups( boolean newSoups )
{
soups = newSoups;
}
public boolean getVeganCookery()
{
return veganCookery;
}
public void setVeganCookery( boolean newVeganCookery )
{
veganCookery = newVeganCookery;
}
public boolean getPigKeeping()
{
return pigKeeping;
}
public void setPigKeeping( boolean newPigKeeping )
{
pigKeeping = newPigKeeping;
}
public boolean getPygmyGoats()
{
return pygmyGoats;
}
public void setPygmyGoats( boolean newPygmyGoats )
{
pygmyGoats = newPygmyGoats;
}
public boolean getHenKeeping()
{
return henKeeping;
}
public void setHenKeeping( boolean newHenKeeping )
{
henKeeping = newHenKeeping;
}
}
-------------------------------------------------------------------
HowtoWizardAction.java
package org.apache.cocoon.samples.xmlform.howto;
// Java classes
import java.util.Map;
// Cocoon classes
import org.apache.cocoon.acting.*;
// Cocoon Form
import org.apache.cocoon.acting.AbstractXMLFormAction;
import org.apache.cocoon.components.xmlform.Form;
import org.apache.cocoon.components.xmlform.FormListener;
/**
* This action demonstrates
* a relatively complex form handling scenario.
*
* @author Heidi Brannan, [EMAIL PROTECTED]
*/
public class HowtoWizardAction
extends AbstractXMLFormAction
implements FormListener
{
// different form views
// participating in the wizard
final String VIEW_START = "start";
final String VIEW_REGISTRATION = "registration";
final String VIEW_INTEREST = "interest";
final String VIEW_GARDENING = "organicGardening";
final String VIEW_COOKING = "cooking";
final String VIEW_SMALLHOLDING = "smallholdingManagement";
final String VIEW_CONFIRM = "confirm";
final String VIEW_END = "end";
// action commands used in the wizard
final String CMD_START = "start";
final String CMD_NEXT = "next";
final String CMD_PREV = "prev";
/**
* The first callback method which is called
* when an action is invoked.
*
* It is called before population.
*
*
* @return null if the Action is prepared to continue.
* an objectModel map which will be immediately returned by the
action.
*
* This method is a good place to handle buttons with Cancel
* kind of semantics. For example
* <pre>if getCommand().equals("Cancel") return page("input");</pre>
*
*/
protected Map prepare()
{
if ( getCommand() == null )
{
return page( VIEW_START );
}
else if ( getCommand().equals( CMD_START ) )
{
// reset state by removing old form
// if one exists
Form.remove( getObjectModel(), getFormId() );
getForm().addFormListener( this );
return page( VIEW_REGISTRATION );
}
// get ready for action
// if not ready return page("whereNext");
return null;
}
/**
* Invoked after form population
*
* Semanticly similar to Struts Action.perform()
*
* Take appropriate action based on the command
*
*/
public Map perform ()
{
// get the actual model which this Form encapsulates
// and apply additional buziness logic to the model
HowToBean jBean = (HowToBean) getForm().getModel();
//jBean.incrementCount();
// set the page control flow parameter
// according to the validation result
if ( getCommand().equals( CMD_NEXT ) &&
getForm().getViolations () != null )
{
// errors, back to the same page
return page( getFormView() );
}
else
{
// validation passed
// continue with control flow
// clear validation left overs in case the user
// did not press the Next button
getForm().clearViolations();
// get the user submitted command (through a submit button)
String command = getCommand();
// get the form view which was submitted
String formView = getFormView();
// apply control flow rules
if ( formView.equals ( VIEW_REGISTRATION ) )
{
if ( command.equals( CMD_NEXT ) )
{
return page( VIEW_INTEREST );
}
}
else if ( formView.equals ( VIEW_INTEREST ) )
{
if ( command.equals( CMD_NEXT ) )
{
if ( jBean.getOrganicGardening() == true )
{
return page( VIEW_GARDENING );
}
else if ( jBean.getCooking() == true )
{
return page( VIEW_COOKING );
}
else if ( jBean.getSmallholdingManagement() == true )
{
return page( VIEW_SMALLHOLDING );
}
//else if ( getForm().get
return page( VIEW_CONFIRM );
}
if ( command.equals( CMD_PREV ) )
{
return page( VIEW_REGISTRATION );
}
}
else if ( formView.equals ( VIEW_GARDENING ) )
{
if ( command.equals ( CMD_NEXT ) )
{
if ( jBean.getCooking() == true )
{
return page( VIEW_COOKING );
}
else if ( jBean.getSmallholdingManagement() == true )
{
return page( VIEW_SMALLHOLDING );
}
return page( VIEW_CONFIRM );
}
else if( command.equals( CMD_PREV ) )
{
return page( VIEW_INTEREST );
}
}
else if ( formView.equals ( VIEW_COOKING ) )
{
if ( command.equals ( CMD_NEXT ) )
{
if ( jBean.getSmallholdingManagement() == true )
{
return page( VIEW_SMALLHOLDING );
}
return page( VIEW_CONFIRM );
}
else if ( command.equals( CMD_PREV ) )
{
if ( jBean.getOrganicGardening() == true )
{
return page( VIEW_GARDENING );
}
return page( VIEW_INTEREST );
}
}
else if ( formView.equals ( VIEW_SMALLHOLDING ) )
{
if ( command.equals( CMD_NEXT ) )
{
return page( VIEW_CONFIRM );
}
else if ( command.equals( CMD_PREV ) )
{
if ( jBean.getCooking() == true )
{
return page( VIEW_COOKING );
}
else if ( jBean.getOrganicGardening() == true )
{
return page( VIEW_GARDENING );
}
return page( VIEW_INTEREST );
}
}
else if ( formView.equals ( VIEW_CONFIRM ) )
{
if ( command.equals( CMD_NEXT ) )
{
return page( VIEW_END );
}
else if( command.equals( CMD_PREV ) )
{
if ( jBean.getOrganicGardening() == true )
{
return page( VIEW_GARDENING );
}
return page( VIEW_INTEREST );
}
}
}
// should never reach this statement
return page( VIEW_START );
}
/**
*
* FormListener callback
* called in the beginning Form.populate()
* before population starts.
*
* This is the place to handle unchecked checkboxes.
*
*/
public void reset( Form form )
{
// based on the current form view
// make some decisions regarding checkboxes, etc.
String formView = getFormView();
if ( formView.equals ( VIEW_INTEREST ) )
{
// deal with the organicGardening checkbox
form.setValue( "/organicGardening", Boolean.FALSE );
// deal with the cooking checkbox
form.setValue( "/cooking", Boolean.FALSE );
// deal with the smallholdingManagement checkbox
form.setValue( "/smallholdingManagement", Boolean.FALSE );
}
else if ( formView.equals ( VIEW_GARDENING ) )
{
// deal with the flowers checkbox
form.setValue( "/flowers", Boolean.FALSE );
// deal with the vegetables checkbox
form.setValue( "/vegetables", Boolean.FALSE );
// deal with the fruitTrees checkbox
form.setValue( "/fruitTrees", Boolean.FALSE );
}
else if ( formView.equals ( VIEW_COOKING ) )
{
// deal with the traditionalReciepes checkbox
form.setValue( "/traditionalReciepes", Boolean.FALSE );
// deal with the soups checkbox
form.setValue( "/soups", Boolean.FALSE );
// deal with the veganCookery checkbox
form.setValue( "/veganCookery", Boolean.FALSE );
}
else if ( formView.equals ( VIEW_SMALLHOLDING ) )
{
// deal with the pigKeeping checkbox
form.setValue( "/pigKeeping", Boolean.FALSE );
// deal with the pygmyGoats checkbox
form.setValue( "/pygmyGoats", Boolean.FALSE );
// deal with the henKeeping checkbox
form.setValue( "/henKeeping", Boolean.FALSE );
}
}
/**
* FormListener callback
*
* Invoked during Form.populate();
*
* It is invoked before a request parameter is mapped to
* an attribute of the form model.
*
* It is appropriate to use this method for filtering
* custom request parameters which do not reference
* the model.
*
* Another appropriate use of this method is for graceful filtering of
invalid
* values, in case that knowledge of the system state or
* other circumstainces make the standard validation
* insufficient. For example if a registering user choses a username
which
* is already taken - the check requires database transaction, which
is
* beyond the scope of document validating schemas.
* Of course customized Validators can be implemented to do
* this kind of domain specific validation
* instead of using this method.
*
*
* @return false if the request parameter should not be filtered.
* true otherwise.
*/
public boolean filterRequestParameter (Form form, String
parameterName)
{
// TBD
return false;
}
public String getFile( String FileName ) {
try
{
final String FILE_PREFIX = "file:";
String path = getSourceResolver().resolve(FileName).getSystemId();
if(path.startsWith(FILE_PREFIX))
path = path.substring(FILE_PREFIX.length());
return path;
}
catch(Exception e)
{
getLogger().error("could not read mapping file",e);
return null;
}
}
}
-------------------------------------------------------------------
xmlform/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:action name="HowtoWizardAction"
src="org.apache.cocoon.samples.xmlform.howto.HowtoWizardAction"
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.WildcardURIMatcher"/>
</map:matchers>
</map:components>
<!-- =========================== Views
=================================== -->
<!--
The debug view can be used to output an intermediate
snapshot of the pipeline.
Pass cocoon-view=debug as a URL parameter to see
the pipeline output produced by the transofrmer
labeled "debug". You can move the label to different
transformers to understand each processing
stage better.
-->
<map:views>
<map:view name="debug" from-label="debug">
<map:serialize type="xml"/>
</map:view>
<map:view name="xml" from-label="xml">
<map:serialize type="xml"/>
</map:view>
</map:views>
<!-- =========================== Resources
================================= -->
<map:resources>
</map:resources>
<!-- =========================== Pipelines
================================= -->
<map:pipelines>
<map:pipeline>
<map:match pattern="">
<map:redirect-to uri="overview.html"/>
</map:match>
<map:match pattern="overview.html">
<map:read src="overview.html"/>
<map:serialize type="html"/>
</map:match>
<!-- A non-trivial example - Feedback Wizard -->
<map:match pattern="wizard*">
<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="debug, xml"/>
<map:transform src="stylesheets/wizard2html.xsl" />
<map:transform
src="context://samples/stylesheets/xmlform/xmlform2html.xsl"/>
<map:serialize type="xhtml"/>
</map:act>
</map:match>
<!-- A non-trivial example - Feedback HowTo Wizard -->
<map:match pattern="howto-wizard.html">
<map:act type="HowtoWizardAction">
<!-- XMLForm parameters for the HowtoWizardAction -->
<map:parameter name="xmlform-validator-schema-ns"
value="http://www.ascc.net/xml/schematron"/>
<map:parameter name="xmlform-validator-schema"
value="howto/schematron/howto-xmlform-sch-report.xml"/>
<map:parameter name="xmlform-id" value="form-howto"/>
<map:parameter name="xmlform-scope" value="session"/>
<map:parameter name="xmlform-model"
value="org.apache.cocoon.samples.xmlform.howto.HowToBean"/>
<!-- Content transformation logic -->
<map:generate src="howto/{page}.xml"/>
<map:transform type="xmlform" label="xml"/>
<map:transform src="stylesheets/wizard2html.xsl"/>
<map:transform
src="context://samples/stylesheets/xmlform/xmlform2html.xsl"/>
<map:serialize type="xhtml"/>
</map:act>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
<!-- end of file -->
-------------------------------------------------------------------
-------------------------------------------------------------------
-------------------------------------------------------------------
> -----Original Message-----
> From: Ivelin Ivanov [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 17, 2002 6:04 AM
> To: [EMAIL PROTECTED]
> Subject: Re: XMLForm How-To problems
>
>
>
> Does the standard demo work (Feedback Wizard @
> /cocoon/samples/xmlform/) on your box? Does the HOWTO example
> work in your setup?
The feedback wizard does work, yes. The howto does not work, though.
>
> I can guess it is a problem with the XForms markup.
>
> Send me your XForms files.
>
> Ivelin
>
>
> ----- Original Message -----
> From: "Matthew Hailstone" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 16, 2002 6:05 PM
> Subject: XMLForm How-To problems
>
>
> I followed the XMLForm How-To, which was very thorough and
> excellent BTW. Everything seems like it should work: I can
> see the start view, but when the registration view comes up,
> I get the following stacktrace:
>
> Original exception : java.lang.ArrayIndexOutOfBoundsException
> at org.apache.xml.utils.IntStack.pop(IntStack.java:127)
> at
> org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.endElement(SAX2DTM.java:1892)
> at
> org.apache.xml.dtm.ref.IncrementalSAXSource_Filter.endElement(
> Incrementa
> lSAXSource_Filter.java:287)
> at
> org.apache.xalan.transformer.TransformerHandlerImpl.endElement
> (Transform
> erHandlerImpl.java:552)
> at
> org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPi
> pe.java:14
> 7)
> at
> org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPi
> pe.java:14
> 7)
> at
> org.apache.cocoon.transformation.AbstractSAXTransformer.endEle
> ment(Abstr
> actSAXTransformer.java:366)
> at
> org.apache.cocoon.transformation.XMLFormTransformer.endTransfo
> rmingEleme
> nt(XMLFormTransformer.java:791)
> at
> org.apache.cocoon.transformation.AbstractSAXTransformer.endEle
> ment(Abstr
> actSAXTransformer.java:358)
> at
> org.apache.cocoon.components.sax.XMLTeePipe.endElement(XMLTeeP
> ipe.java:1
> 24)
> at
> org.apache.xerces.parsers.AbstractSAXParser.endElement(Abstrac
> tSAXParser
> .java:559)
> at
> org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XML
> NamespaceB
> inder.java:853)
> at
> org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamesp
> aceBinder.
> java:643)
> at
> org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XM
> LDTDValida
> tor.java:2978)
> at
> org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDVa
> lidator.ja
> va:918)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEn
> dElement(X
> MLDocumentFragmentScannerImpl.java:1145)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndE
> lement(XML
> DocumentFragmentScannerImpl.java:988)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragment
> ContentDis
> patcher.dispatch(XMLDocumentFragmentScannerImpl.java:1446)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocu
> ment(XMLDo
> cumentFragmentScannerImpl.java:333)
> at
> org.apache.xerces.parsers.StandardParserConfiguration.parse(St
> andardPars
> erConfiguration.java:529)
> at
> org.apache.xerces.parsers.StandardParserConfiguration.parse(St
> andardPars
> erConfiguration.java:585)
> at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
> at
> org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXP
> arser.java
> :1148)
> at
> org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:269)
>
> at
> org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:222)
>
> at
> org.apache.excalibur.xmlizer.impl.TextXMLizer.toSAX(TextXMLize
> r.java:92)
>
> at
> org.apache.excalibur.xmlizer.impl.XMLizerImpl.toSAX(XMLizerImp
> l.java:75)
>
> at
> org.apache.cocoon.environment.AbstractEnvironment.toSAX(Abstra
> ctEnvironm
> ent.java:479)
> at
> org.apache.cocoon.generation.FileGenerator.generate(FileGenera
> tor.java:1
> 40)
> at
> org.apache.cocoon.components.pipeline.impl.AbstractCachingProc
> essingPipe
> line.processXMLPipeline(AbstractCachingProcessingPipeline.java:255)
> at
> org.apache.cocoon.components.pipeline.AbstractProcessingPipeli
> ne.process
> (AbstractProcessingPipeline.java:476)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.SerializeNo
> de.invoke(
> SerializeNode.java:146)
> at
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.
> invokeNodes(AbstractParentProcessingNode.java:83)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode
> .invoke(Ac
> tTypeNode.java:152)
> at
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.
> invokeNodes(AbstractParentProcessingNode.java:83)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.PreparableM
> atchNode.i
> nvoke(PreparableMatchNode.java:160)
> at
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.
> invokeNodes(AbstractParentProcessingNode.java:107)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNod
> e.invoke(P
> ipelineNode.java:157)
> at
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.
> invokeNodes(AbstractParentProcessingNode.java:107)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNo
> de.invoke(
> PipelinesNode.java:152)
> at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.proce
> ss(TreePro
> cessor.java:328)
> at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.proce
> ss(TreePro
> cessor.java:309)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.MountNode.i
> nvoke(Moun
> tNode.java:131)
> at
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.
> invokeNodes(AbstractParentProcessingNode.java:83)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.PreparableM
> atchNode.i
> nvoke(PreparableMatchNode.java:160)
> at
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.
> invokeNodes(AbstractParentProcessingNode.java:107)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNod
> e.invoke(P
> ipelineNode.java:157)
> at
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.
> invokeNodes(AbstractParentProcessingNode.java:107)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNo
> de.invoke(
> PipelinesNode.java:152)
> at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.proce
> ss(TreePro
> cessor.java:328)
> at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.proce
> ss(TreePro
> cessor.java:309)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.MountNode.i
> nvoke(Moun
> tNode.java:131)
> at
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.
> invokeNodes(AbstractParentProcessingNode.java:83)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.PreparableM
> atchNode.i
> nvoke(PreparableMatchNode.java:160)
> at
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.
> invokeNodes(AbstractParentProcessingNode.java:107)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNod
> e.invoke(P
> ipelineNode.java:157)
> at
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.
> invokeNodes(AbstractParentProcessingNode.java:107)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNo
> de.invoke(
> PipelinesNode.java:152)
> at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.proce
> ss(TreePro
> cessor.java:328)
> at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.proce
> ss(TreePro
> cessor.java:309)
> at org.apache.cocoon.Cocoon.process(Cocoon.java:585)
> at
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.
> java:997)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(Applica
> tionFilterChain.java:247)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilt
> erChain.java:193)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValv
> e.java:260)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.i
> nvokeNext(StandardPipeline.java:646)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:4
> 83)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValv
> e.java:191)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.i
> nvokeNext(StandardPipeline.java:646)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:4
> 83)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:234
> 9)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java
> :180)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.i
> nvokeNext(StandardPipeline.java:646)
> at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
> spatcherVa
> lve.java:170)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.i
> nvokeNext(StandardPipeline.java:644)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java
> :171)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.i
> nvokeNext(StandardPipeline.java:644)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:4
> 83)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.
> java:174)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.i
> nvokeNext(StandardPipeline.java:646)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:4
> 83)
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
> at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.
> java:223)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Process
> or.java:40
> 5)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
> r.processC
> onnection(Http11Protocol.java:376)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
> nt.java:50
> 8)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool
> .java:518)
> at java.lang.Thread.run(Thread.java:479)
>
> Here is the sitemap for the xmlform directory:
>
> <?xml version="1.0"?>
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>
>
> Thanks.
>
> Matthew
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>