You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by jantje <ja...@skynet.be> on 2008/08/22 14:18:24 UTC

generate form_definition

Hi there, I have variable data which I want to display in a form.

A form has a form_template and a form_definition. The form_template is
generated in the sitemap: there I am able to generate the content like I
need.

The form_definition is called from the flowscript:
     var form = new Form("cocoon://resources/internal/test_definition.xml");

Is it possible to not just call this file (test_definition.xml) but generate
it? 

Thanks..
-- 
View this message in context: http://www.nabble.com/generate-form_definition-tp19106103p19106103.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


RE: generate form_definition

Posted by Jasha Joachimsthal <j....@onehippo.com>.
If paramCLASS is the name of your var in your flowscript, it's:
var form = new Form("cocoon:/"+paramCLASS+".formDefinition.xml");

Jasha

-----Oorspronkelijk bericht-----
Van: jantje [mailto:janvanoppen@skynet.be]
Verzonden: vr 22-8-2008 17:12
Aan: users@cocoon.apache.org
Onderwerp: RE: generate form_definition
 

Thanks, that is true!

Now I did came to another problem: I can generate the form definition, but
from the flowscript I want to pass a parameter:


    var paramCLASS = cocoon.parameters.paramCLASS;
    var form = new Form("cocoon:/${paramCLASS}.formDefinition.xml");

      <map:match pattern="*.form*.xml">
        <map:generate src="xml/application.xml"/>
        <map:transform src="xsl/xmlToForm{2}.xsl" label="content">
          <map:parameter name="paramCLASS" value="{1}"/>
        </map:transform>
        <map:serialize type="xml"/>
      </map:match>

So I try to call *.form*.xml with:
  {1} = ${paramCLASS}
  {2} = Definition

This workt, but I literally receive this "${paramCLASS}" in .xsl
And NOT the value of "paramCLASS" (what I want)

Thanks for your replies.. greetings





Jasha Joachimsthal-2 wrote:
> 
> Or if you change the case of your XSLt files:
> 
>        <map:match pattern="form_*.xml">
>          <map:generate src="xml/application.xml"/>
>          <map:transform src="xsl/xmlToForm{1}.xsl" label="content">
>          </map:transform>
>          <map:serialize type="xml"/>
>        </map:match> 
> 
>> -----Original Message-----
>> From: jantje [mailto:janvanoppen@skynet.be] 
>> Sent: vrijdag 22 augustus 2008 15:52
>> To: users@cocoon.apache.org
>> Subject: RE: generate form_definition
>> 
>> 
>> Thanks, it works:
>>       <map:match pattern="form_template.xml">
>>         <map:generate src="xml/application.xml"/>
>>         <map:transform src="xsl/xmlToFormTemplate.xsl" 
>> label="content">
>>         </map:transform>
>>         <map:serialize type="xml"/>
>>       </map:match>
>> 
>>       <map:match pattern="form_definition.xml">
>>         <map:generate src="xml/application.xml"/>
>>         <map:transform src="xsl/xmlToFormDefinition.xsl" 
>> label="content">
>>         </map:transform>
>>         <map:serialize type="xml"/>
>>       </map:match>
>> 
>> 
>> 
>> 
>> 
>> 
>> Jasha Joachimsthal-2 wrote:
>> > 
>> >  
>> > 
>> >> -----Original Message-----
>> >> From: jantje [mailto:janvanoppen@skynet.be]
>> >> Sent: vrijdag 22 augustus 2008 14:18
>> >> To: users@cocoon.apache.org
>> >> Subject: generate form_definition
>> >> 
>> >> 
>> >> Hi there, I have variable data which I want to display in a form.
>> >> 
>> >> A form has a form_template and a form_definition. The 
>> form_template 
>> >> is generated in the sitemap: there I am able to generate 
>> the content 
>> >> like I need.
>> >> 
>> >> The form_definition is called from the flowscript:
>> >>      var form = new
>> >> Form("cocoon://resources/internal/test_definition.xml");
>> >> 
>> >> Is it possible to not just call this file
>> >> (test_definition.xml) but generate it? 
>> > 
>> > Yes you can, just handle the uri in a different way in your 
>> sitemap. 
>> > Not by a reader but generate-(transform-)serialize.
>> > 
>> > Jasha Joachimsthal
>> > 
>> > www.onehippo.com
>> > Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam 
>> +31(0)20-5224466 
>> > San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
>> > 94952-3329 +1 (707) 773-4646
>> > 
>> > 
>> > 
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> > For additional commands, e-mail: users-help@cocoon.apache.org
>> > 
>> > 
>> 
>> --
>> View this message in context: 
>> http://www.nabble.com/generate-form_definition-tp19106103p1910
>> 7631.html
>> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

-- 
View this message in context: http://www.nabble.com/generate-form_definition-tp19106103p19108785.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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



RE: generate form_definition

Posted by jantje <ja...@skynet.be>.
Thanks, that is true!

Now I did came to another problem: I can generate the form definition, but
from the flowscript I want to pass a parameter:


    var paramCLASS = cocoon.parameters.paramCLASS;
    var form = new Form("cocoon:/${paramCLASS}.formDefinition.xml");

      <map:match pattern="*.form*.xml">
        <map:generate src="xml/application.xml"/>
        <map:transform src="xsl/xmlToForm{2}.xsl" label="content">
          <map:parameter name="paramCLASS" value="{1}"/>
        </map:transform>
        <map:serialize type="xml"/>
      </map:match>

So I try to call *.form*.xml with:
  {1} = ${paramCLASS}
  {2} = Definition

This workt, but I literally receive this "${paramCLASS}" in .xsl
And NOT the value of "paramCLASS" (what I want)

Thanks for your replies.. greetings





Jasha Joachimsthal-2 wrote:
> 
> Or if you change the case of your XSLt files:
> 
>        <map:match pattern="form_*.xml">
>          <map:generate src="xml/application.xml"/>
>          <map:transform src="xsl/xmlToForm{1}.xsl" label="content">
>          </map:transform>
>          <map:serialize type="xml"/>
>        </map:match> 
> 
>> -----Original Message-----
>> From: jantje [mailto:janvanoppen@skynet.be] 
>> Sent: vrijdag 22 augustus 2008 15:52
>> To: users@cocoon.apache.org
>> Subject: RE: generate form_definition
>> 
>> 
>> Thanks, it works:
>>       <map:match pattern="form_template.xml">
>>         <map:generate src="xml/application.xml"/>
>>         <map:transform src="xsl/xmlToFormTemplate.xsl" 
>> label="content">
>>         </map:transform>
>>         <map:serialize type="xml"/>
>>       </map:match>
>> 
>>       <map:match pattern="form_definition.xml">
>>         <map:generate src="xml/application.xml"/>
>>         <map:transform src="xsl/xmlToFormDefinition.xsl" 
>> label="content">
>>         </map:transform>
>>         <map:serialize type="xml"/>
>>       </map:match>
>> 
>> 
>> 
>> 
>> 
>> 
>> Jasha Joachimsthal-2 wrote:
>> > 
>> >  
>> > 
>> >> -----Original Message-----
>> >> From: jantje [mailto:janvanoppen@skynet.be]
>> >> Sent: vrijdag 22 augustus 2008 14:18
>> >> To: users@cocoon.apache.org
>> >> Subject: generate form_definition
>> >> 
>> >> 
>> >> Hi there, I have variable data which I want to display in a form.
>> >> 
>> >> A form has a form_template and a form_definition. The 
>> form_template 
>> >> is generated in the sitemap: there I am able to generate 
>> the content 
>> >> like I need.
>> >> 
>> >> The form_definition is called from the flowscript:
>> >>      var form = new
>> >> Form("cocoon://resources/internal/test_definition.xml");
>> >> 
>> >> Is it possible to not just call this file
>> >> (test_definition.xml) but generate it? 
>> > 
>> > Yes you can, just handle the uri in a different way in your 
>> sitemap. 
>> > Not by a reader but generate-(transform-)serialize.
>> > 
>> > Jasha Joachimsthal
>> > 
>> > www.onehippo.com
>> > Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam 
>> +31(0)20-5224466 
>> > San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
>> > 94952-3329 +1 (707) 773-4646
>> > 
>> > 
>> > 
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> > For additional commands, e-mail: users-help@cocoon.apache.org
>> > 
>> > 
>> 
>> --
>> View this message in context: 
>> http://www.nabble.com/generate-form_definition-tp19106103p1910
>> 7631.html
>> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

-- 
View this message in context: http://www.nabble.com/generate-form_definition-tp19106103p19108785.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


RE: generate form_definition

Posted by Jasha Joachimsthal <j....@onehippo.com>.
Or if you change the case of your XSLt files:

       <map:match pattern="form_*.xml">
         <map:generate src="xml/application.xml"/>
         <map:transform src="xsl/xmlToForm{1}.xsl" label="content">
         </map:transform>
         <map:serialize type="xml"/>
       </map:match> 

> -----Original Message-----
> From: jantje [mailto:janvanoppen@skynet.be] 
> Sent: vrijdag 22 augustus 2008 15:52
> To: users@cocoon.apache.org
> Subject: RE: generate form_definition
> 
> 
> Thanks, it works:
>       <map:match pattern="form_template.xml">
>         <map:generate src="xml/application.xml"/>
>         <map:transform src="xsl/xmlToFormTemplate.xsl" 
> label="content">
>         </map:transform>
>         <map:serialize type="xml"/>
>       </map:match>
> 
>       <map:match pattern="form_definition.xml">
>         <map:generate src="xml/application.xml"/>
>         <map:transform src="xsl/xmlToFormDefinition.xsl" 
> label="content">
>         </map:transform>
>         <map:serialize type="xml"/>
>       </map:match>
> 
> 
> 
> 
> 
> 
> Jasha Joachimsthal-2 wrote:
> > 
> >  
> > 
> >> -----Original Message-----
> >> From: jantje [mailto:janvanoppen@skynet.be]
> >> Sent: vrijdag 22 augustus 2008 14:18
> >> To: users@cocoon.apache.org
> >> Subject: generate form_definition
> >> 
> >> 
> >> Hi there, I have variable data which I want to display in a form.
> >> 
> >> A form has a form_template and a form_definition. The 
> form_template 
> >> is generated in the sitemap: there I am able to generate 
> the content 
> >> like I need.
> >> 
> >> The form_definition is called from the flowscript:
> >>      var form = new
> >> Form("cocoon://resources/internal/test_definition.xml");
> >> 
> >> Is it possible to not just call this file
> >> (test_definition.xml) but generate it? 
> > 
> > Yes you can, just handle the uri in a different way in your 
> sitemap. 
> > Not by a reader but generate-(transform-)serialize.
> > 
> > Jasha Joachimsthal
> > 
> > www.onehippo.com
> > Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam 
> +31(0)20-5224466 
> > San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
> > 94952-3329 +1 (707) 773-4646
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> > 
> > 
> 
> --
> View this message in context: 
> http://www.nabble.com/generate-form_definition-tp19106103p1910
> 7631.html
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

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


RE: generate form_definition

Posted by jantje <ja...@skynet.be>.
Thanks, it works:
      <map:match pattern="form_template.xml">
        <map:generate src="xml/application.xml"/>
        <map:transform src="xsl/xmlToFormTemplate.xsl" label="content">
        </map:transform>
        <map:serialize type="xml"/>
      </map:match>

      <map:match pattern="form_definition.xml">
        <map:generate src="xml/application.xml"/>
        <map:transform src="xsl/xmlToFormDefinition.xsl" label="content">
        </map:transform>
        <map:serialize type="xml"/>
      </map:match>






Jasha Joachimsthal-2 wrote:
> 
>  
> 
>> -----Original Message-----
>> From: jantje [mailto:janvanoppen@skynet.be] 
>> Sent: vrijdag 22 augustus 2008 14:18
>> To: users@cocoon.apache.org
>> Subject: generate form_definition
>> 
>> 
>> Hi there, I have variable data which I want to display in a form.
>> 
>> A form has a form_template and a form_definition. The 
>> form_template is generated in the sitemap: there I am able to 
>> generate the content like I need.
>> 
>> The form_definition is called from the flowscript:
>>      var form = new 
>> Form("cocoon://resources/internal/test_definition.xml");
>> 
>> Is it possible to not just call this file 
>> (test_definition.xml) but generate it? 
> 
> Yes you can, just handle the uri in a different way in your sitemap. Not
> by a reader but generate-(transform-)serialize.
> 
> Jasha Joachimsthal 
> 
> www.onehippo.com
> Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 
> San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
> 94952-3329 +1 (707) 773-4646
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

-- 
View this message in context: http://www.nabble.com/generate-form_definition-tp19106103p19107631.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


RE: generate form_definition

Posted by Jasha Joachimsthal <j....@onehippo.com>.
 

> -----Original Message-----
> From: jantje [mailto:janvanoppen@skynet.be] 
> Sent: vrijdag 22 augustus 2008 14:18
> To: users@cocoon.apache.org
> Subject: generate form_definition
> 
> 
> Hi there, I have variable data which I want to display in a form.
> 
> A form has a form_template and a form_definition. The 
> form_template is generated in the sitemap: there I am able to 
> generate the content like I need.
> 
> The form_definition is called from the flowscript:
>      var form = new 
> Form("cocoon://resources/internal/test_definition.xml");
> 
> Is it possible to not just call this file 
> (test_definition.xml) but generate it? 

Yes you can, just handle the uri in a different way in your sitemap. Not
by a reader but generate-(transform-)serialize.

Jasha Joachimsthal 

www.onehippo.com
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-3329 +1 (707) 773-4646


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