We are using the pattern similar to below in many, many places in our application. I should also note that we no longer use XMLFileModule but a new XPathXMLFileModule that I will be checking in shortly. XPathXMLFileModule works similar to XMLFileModule but it caches correctly and has more consistent performance.

In cocoon.xconf:
<component-instance class="org.apache.cocoon.components.modules.input.XMLFileModule" logger="core.modules.xml" name="globalConfig">
 <file src="cocoon://mySite/getGlobalConfig"/>
</component>

In mySite's sitemap:

<map:match pattern="getGlobalConfig">
 <map:generate src="{system-property:global-config"} type="file"/>
 <map:serialize type="xml">
</map:match>

<map:match pattern="main">
 <map:act type="session-propagator">
<map:parameter name="myTest" value="{globalConfig:/global-variables/mode}"/>
 </map:act>
 <map:generate ...>
 <map:select type="session-attribute">
   <map:parameter name="attribute-name" value="myTest"/>
   <map:when test="true">
     <map:transform type="a"/>
   </map:when>
   <map:otherwise>
     <map:transform type="b"/>
   </map:otherwise>
 </map:select/>
 <map:serialize .../>
</map:match>

Sébastien Geindre wrote:
Bonjour,

is it impossible or my explanation are too 'messy' or my english too scrambled ??
just let me know...

thanks.

Seb


Sébastien Geindre a écrit :
Hello  everybody,

i need to make a conditional treatment in my sitemap :

generator --> transformer A -----(if condition on xml)-----> transformer B1 ----------|---> transformerC --> serializer (else) -----> transformer B2 ----------|
my schema is not very clear :

generator
transformer A
if condition on xml from transformerA --> transformer B1
else -----> transformer B2
transformer C
serializer

the condition is computed on xml data and global variables

How can i do that ??

thanks for your help.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to