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

Reply via email to