cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Hoskens ...@schaubroeck.be>
Subject Re: Dynamic CInclude
Date Tue, 04 Jan 2005 08:34:23 GMT
Gaston Martini wrote:
> Hi,
> 
> We're using CInclude for caching purposes and we need to specify its
> "src" attribute dinamically, i.e. the value of src is not known in
> advance.
> 
> We tried some combinations with <xsp:expr>, with no luck. For example,
> trying to output the entire cinclude:
>     <xsp:expr>test</xsp:expr>
> with String test = "<cinclude:cached-include src=\"cocoon:/some_pipeline\"/>",
> results in '<' and '>' being translated to &lt; and &gt;:
>     &lt;cinclude:cached-include src=\"cocoon:/some_pipeline\"/&gt;
> 
> We also tried some other approaches, but nothing worked.
> 
> Any suggestions?
> 
> Thanks in advance,
> Gaston & Martin.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

I use jx to do the following in my sitemap resource (page parameter is 
given by map:parameter):

<cinclude:include src="cocoon:/${cocoon.parameters.page}" />

Before switching to flow-jxtemplate combination I used xsp:

<xsp:logic>
String dir = "mydir";
</xsp:logic>	
<cinclude:include>
	<xsp:attribute 
name="src">cocoon:/<xsp:expr>dir</xsp:expr>/file.xml</xsp:attribute>
</cinclude:include>

which worked fine.

Remember that the overall cocoon-way-of-thinking heads towards the 
flowscript(glue to your business-logic) and jxtemplate combination 
instead of xsp. (not that you have to do this of course ;-)


Kind Regards,
Jan


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


Mime
View raw message