You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mattom <ma...@gmx.at> on 2005/04/07 14:39:08 UTC

Re. Dynamic generation of CForms

Ok, so I do aggregate the form defintion and template to one xml !?

I tried this with the sample from the 
http://cocoon.apache.org/2.1/userdocs/forms/sample.html, aggregating the 
form definition with the template in an new <anyroottag> and then 
passing it through the xslt transformer mentioned in
http://cocoon.apache.org/2.1/userdocs/forms/xslt.html
Nothing dynamic here ok, but, one xml as definition, and one as template...

I do get some output, but actually the form template does not know about 
the form definition... is there any sample for the XSLT way of 
publishing CForms (nothing in the blocks/samples/forms) ?

Thank you,
tom

I know it's a brute attack, and I am trying further while waiting for 
answers

 >>Le 7 avr. 05, à 12:10, Mattom a écrit :
 >> ...   <!-- now i have a form def in the pipeline and would like to
 >> call something like the form1_template_action.xml, that does some
 >> grouping to my formdef
 >>         | in the example this is done by a generator, which won't work
 >> for me, because I have the generator ...
 >
 >Using map:aggregate should help, see
 >http://wiki.apache.org/cocoon/Aggregator
 >
 >-Bertrand


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


Re: Re. Dynamic generation of CForms

Posted by Bruno Dumon <br...@outerthought.org>.
On Thu, 2005-04-07 at 14:39 +0200, Mattom wrote:
> Ok, so I do aggregate the form defintion and template to one xml !?
> 
> I tried this with the sample from the 
> http://cocoon.apache.org/2.1/userdocs/forms/sample.html, aggregating the 
> form definition with the template in an new <anyroottag> and then 
> passing it through the xslt transformer mentioned in
> http://cocoon.apache.org/2.1/userdocs/forms/xslt.html
> Nothing dynamic here ok, but, one xml as definition, and one as template...
> 
> I do get some output, but actually the form template does not know about 
> the form definition... is there any sample for the XSLT way of 
> publishing CForms (nothing in the blocks/samples/forms) ?

You need to approach it differently, basically do everything as in the
normal CForms samples, but where you usually supply the filename of the
form definition, you need to put a "cocoon:" URL to fetch the form
definition from a pipeline.

Thus in flowscript that would give something like:

var form = new Form("cocoon:/my-form-definition-generation-pipe");

whereby you would then in the sitemap have a matcher that matches
"my-form-definition-generation-pipe" which contains a pipeline to
generate the form definition.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


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