cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Schwarz" <saschw...@hotmail.com>
Subject SimpleFormTransformer - invalid XML generated?
Date Sat, 09 Aug 2003 16:50:52 GMT
Hi
I'm using SimpleFormTransformer to process the results of 
FormValidatorAction and I am getting invalid xml generated after applying 
the transformation. It looks like when <error> elements are removed from 
within surrounding <td> elements I end up with an empty element <td/> 
followed by a closing element </td>.

My input file:
...
form name="contact" method="post" enctype="multipart/form-data" 
action="contact-add">
<h2 align="center">Enter New Contact Information</h2>
<table align="center">
<tr><td title="Mr, Mrs, Miss, Mme">Honorific:</td><td><input type="text"

cols="32" name="contact.honorific"/></td><td><error name="honorific" 
when="error">An <strong>error</strong> occurred.</error></td></tr>
...

When I submit the form with valid input for the "contact.honorific" input 
the "raw" output taken after the simpleform transformation:
...
<form name="contact" method="post" enctype="multipart/form-data" 
action="contact-add">
<h2 align="center">Enter New Contact Information</h2>
<table align="center">
<tr><td title="Mr, Mrs, Miss, Mme">Honorific:</td><td><input type="text"

cols="32" name="contact.honorific"/></td><td/></td></tr>
...

If all the fields fail validation the form is generated correctly (?):
...
<form name="contact" method="post" enctype="multipart/form-data" 
action="contact-add">
<h2 align="center">Enter New Contact Information</h2>
<table align="center"><tr><td title="Mr, Mrs, Miss, 
Mme">Honorific:</td><td><input type="text" cols="32" 
name="contact.honorific"></td><td><error name="honorific" when-ge="error">An

<strong>error</strong> occurred.</error></td></tr>
...

I'm using 2.0.4 but I diffed the SimpleFormTransformer source against 2.1 
and didn't see any obvious differences related to this..(??) Do I need to 
specify some config/pipeline parameters to resolve this?

I also have a dumb question:
What is the difference between using: <error when-ge="error" ...> and <error 
when="error" ...> ?

Any help would be greatly appreciated!
Thanks
Steve

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message