cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Christophe.B...@sanofi-aventis.com>
Subject parameter from jxtemplate generator and xinclude ?
Date Tue, 25 Jan 2005 14:37:14 GMT
Hi,
using cocoon2.1.3, my problem is about how to get one parameter from jxtemplate generator
and xinclude

my sitemap.xmap look like this
xml version="1.0" encoding="UTF-8" ?> 
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:components>
 <map:generators default="file">
  <map:generator name="linkstatus" src="org.apache.cocoon.generation.LinkStatusGenerator"
/> 
  <map:generator label="content,data" logger="sitemap.generator.jx" name="jx" src="org.apache.cocoon.generation.JXTemplateGenerator"
/> 
  </map:generators>

 <map:transformers default="xslt">
  <map:transformer name="xinclude" src="org.apache.cocoon.transformation.XIncludeTransformer"
/> 
  </map:transformers>
  <map:readers default="resource" /> 
 <map:serializers default="html">
  <map:serializer name="xls" src="org.apache.cocoon.serialization.HSSFSerializer" locale="us"
/> 
  </map:serializers>
 <map:matchers default="wildcard">
 <map:matcher logger="sitemap.matcher.header" name="filename" src="org.apache.cocoon.matching.modular.CachingRegexpMatcher">
 <input-module name="request-param">
  <parameter>filename</parameter> 
  </input-module>
  </map:matcher>
  </map:matchers>
  <map:selectors default="browser" /> 
</map:components>

<!--  =========================== Views =================================== 
  --> 
 <map:views>
 <map:view from-label="content" name="content">
  <map:serialize type="xml" /> 
  </map:view>
 <map:view from-label="content" name="pretty-content">
  <map:transform src="context://stylesheets/system/xml2html.xslt" /> 
  <map:serialize type="html" /> 
  </map:view>
 <map:view from-position="last" name="links">
  <map:serialize type="links" /> 
  </map:view>
  </map:views>
 <!--  =========================== Pipelines ================================= 
  --> 
<map:pipelines>
</map:pipeline>

<map:match pattern="TEST">
 <map:generate type="jx" src="include-description.xml">
  <map:parameter name="prefix" value="FILE1" /> 
  </map:generate>
  <map:transform type="xinclude"/>
  <map:serialize type="xml" /> 
</map:match>

</map:pipeline>
</map:pipelines>
</map:sitemap>


and then include-description.xml :
 
   <TOTAL xmlns:xi="http://www.w3.org/2001/XInclude">
     <xi:include href="prem.xml"/>
        <xi:fallback/>
     </xi:include>
    <xi:include href="${cocoon.parameters['prefix']}.xml"/>
   </TOTAL>

this parameter 'prefix' is still blank. Where is the problem ? 
Everything is ok if I replace ${cocoon.parameters['prefix']} with 'FILE1'.

I need some help !
Thanks
Chris


Mime
View raw message