You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michael Schlotfeldt <mj...@gmail.com> on 2005/05/23 21:11:48 UTC

Cascading the cinclude transformer

Hello everyone,

I'm currently working on a project that being able to process cascaded 
cincludes would be helpful. They would then be processed from the 
deepest depth to the lowest.

Here is a generic example:

<?xml version="1.0"?>
<page xmlns:cinclude="http://apache.org/cocoon/include/1.0">
   <cinclude:includexml>
     <cinclude:src>cocoon:/firstOne.xml</cinclude:src>
     <cinclude:configuration>
       <cinclude:parameter>
         <cinclude:name>method</cinclude:name>
         <cinclude:value>POST</cinclude:value>
       </cinclude:parameter>
     </cinclude:configuration>
		
     <cinclude:parameters>			
       <cinclude:parameter>
         <cinclude:name>test</cinclude:name>
         <cinclude:value>

         <!-- ### A Nested cinclude #### -->
         <cinclude:includexml>
           <cinclude:src>cocoon:/secondOne.xml</cinclude:src>
           <cinclude:configuration>
             <cinclude:parameter>
               <cinclude:name>method</cinclude:name>
               <cinclude:value>POST</cinclude:value>
             </cinclude:parameter>
           </cinclude:configuration>
           <cinclude:parameters>
             <cinclude:parameter>
               <cinclude:name>test</cinclude:name>
               <cinclude:value>
                 <name>matti</name><age>36</age>
               </cinclude:value>
             </cinclude:parameter>
           </cinclude:parameters>
         </cinclude:includexml>
         <!-- ########################### -->

         </cinclude:value>
       </cinclude:parameter>
     </cinclude:parameters>

     </cinclude:includexml>
</page>


So in the nested cinclude should be processed and then parent one. This 
way the result from the first can be used as parameters for the parent.

Is there a way to do this already? If not, how would everybody suggest I 
proceed. My first thought was extending or modifying the current cinclude.

Regards,
Michael Schlotfeldt




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


Re: Cascading the cinclude transformer

Posted by Dan Durkin <dd...@scilearn.com>.
You can use the cinclude transformer multiple times in a pipeline.

Some simple stylesheets, that include additional cincludes may meet your 
needs.

The Tour block documentation works through the use of 2 cinclude 
transformer calls in the pipeline.

Dan

Michael Schlotfeldt wrote:
> Hello everyone,
> 
> I'm currently working on a project that being able to process cascaded 
> cincludes would be helpful. They would then be processed from the 
> deepest depth to the lowest.
> 
> Here is a generic example:
> 
> <?xml version="1.0"?>
> <page xmlns:cinclude="http://apache.org/cocoon/include/1.0">
>   <cinclude:includexml>
>     <cinclude:src>cocoon:/firstOne.xml</cinclude:src>
>     <cinclude:configuration>
>       <cinclude:parameter>
>         <cinclude:name>method</cinclude:name>
>         <cinclude:value>POST</cinclude:value>
>       </cinclude:parameter>
>     </cinclude:configuration>
>        
>     <cinclude:parameters>           
>       <cinclude:parameter>
>         <cinclude:name>test</cinclude:name>
>         <cinclude:value>
> 
>         <!-- ### A Nested cinclude #### -->
>         <cinclude:includexml>
>           <cinclude:src>cocoon:/secondOne.xml</cinclude:src>
>           <cinclude:configuration>
>             <cinclude:parameter>
>               <cinclude:name>method</cinclude:name>
>               <cinclude:value>POST</cinclude:value>
>             </cinclude:parameter>
>           </cinclude:configuration>
>           <cinclude:parameters>
>             <cinclude:parameter>
>               <cinclude:name>test</cinclude:name>
>               <cinclude:value>
>                 <name>matti</name><age>36</age>
>               </cinclude:value>
>             </cinclude:parameter>
>           </cinclude:parameters>
>         </cinclude:includexml>
>         <!-- ########################### -->
> 
>         </cinclude:value>
>       </cinclude:parameter>
>     </cinclude:parameters>
> 
>     </cinclude:includexml>
> </page>
> 
> 
> So in the nested cinclude should be processed and then parent one. This 
> way the result from the first can be used as parameters for the parent.
> 
> Is there a way to do this already? If not, how would everybody suggest I 
> proceed. My first thought was extending or modifying the current cinclude.
> 
> Regards,
> Michael Schlotfeldt


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