cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: [CForms] <form enctype>
Date Thu, 05 Aug 2004 08:53:52 GMT
Bruno Dumon wrote:

>On Wed, 2004-08-04 at 19:04, Mark Lundquist wrote:
>  
>
>>Dear Coonsters...
>>
>>I added this to my forms-field-styling.xsl in the template for 
>><fi:form-template>:
>>
>>	      <xsl:if test="descendant::node()/fi:upload">
>>         		<xsl:attribute 
>>name="enctype">multipart/form-data</xsl:attribute>
>>       	      </xsl:if>
>>
>>Good idea, or bad?
>>    
>>
>
>I'm not very fond of it, since this needs to scan the whole tree below
>the form-template, which might be large (if it contains lots of widgets
>or large selection lists), combined with the fact that most forms don't
>use uploads anyway. Just IMHO of course.
>  
>

Same thoughts here.

A possible solution could be to handle this in the form model. Whenever 
an upload widget is added to a form, it informs the form that it 
contains upload widgets. The form can then report this in the produced 
wi:form-template so that the proper enctype is used.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message