cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Timberlake <>
Subject Re: How to embed Cform in larger web site layout
Date Sat, 28 Jan 2006 17:31:34 GMT wrote:
> Hello,
> I alread posted this question in the user list and got no reply. So maybe
> it's better to post the question here.
> I modeled a  cocoon form (based on the registration example in the docs)
> which I would like to incoperate into a classic web site layout (header,
> footer etc).
> When I have done all the cform transformations the form is already in html.
> <map:generate type="jx" src="registration_template.xml"/>
>                 <map:transform type="browser-update"/>
>                 <map:transform type="i18n"/>
> <map:transform src="forms-samples-styling.xsl"/>
> <map:serialize type="html"/>
> So it does already contain the <body> and <head> tags. Now I would like to
> include the cform in a larger HTML document. But the problem is the cform is
> already html so would have to write an XSLT Transformation which transforms
> the HTML to another HTML document. This is clearly not a clean solution.  I
> can't possible put the website layout into the cform template file this
> would contradict the whole seperation on concerns concept.
> So what is the right approach in this case?
> Cheers,
> Pete
Why not split the form generation into just generating an HTML fragment, 
add a transformer to wrap it in it's current HTML and then you have the 
fragment to insert into the other document


View raw message