cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brun <Christophe.B...@sanofi-aventis.com >
Subject Re: parameter from jxtemplate generator and xinclude ?
Date Wed, 26 Jan 2005 13:27:56 GMT

Jeroen Reijn <j.reijn <at> hippo.nl> writes:

>  
> perhaps you need to try it with:
> 
>  
>    
> <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>
No, it's ${cocoon.parameters['prefix']} !

see : http://wiki.apache.org/cocoon/JXTemplateGenerator :
1.2.1. Accessing sitemap parameters
Cocoon sitemap parameters are accessed through the parameters object. 
For example, your sitemap might look like this: 
<map:generate src="jxtemplate.xml" type="jx"> 
  <map:parameter name="my-param" value="my-value"/>
</map:generate
To access the value of my-param in your jxtemplate.xml file 
(using JSTL in this case) your expression would look like this:
${cocoon.parameters['my-param']} 


But I don't understand this point 1.2 : where can I check that 
thoses objects (expecially parameters) are well defined ?

1.2. Accessing data from implicitly defined Cocoon objects
You have access to some implicitly defined objects 
(available through both JSTL and XPath): 
continuation - The current flow script continuation 
request - The Cocoon current request 
(org.apache.cocoon.environment.Request) 
session - The Cocoon session associated with the current request
(org.apache.cocoon.environment.Session) 
context - The Cocoon context associated with the current request
(org.apache.cocoon.environment.Context) 
parameters - A map of parameters passed to the generator in the 
pipeline (org.apache.avalon.framework.parameters.Parameters) 

Thanks
Chris
> 
>  
> Greetz,
> 
>  
> Jeroen
> 
>


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


Mime
View raw message