One way of doing this would be using jx:set and jx:if in your template:

<jx:set var="lang" value="${cocoon.parameters.lang}"/>

Then at the point where you need the special tags:

<jx:if test="${lang == 'en'}">
 <h:title-en/>
</jx:if

and so on for the other custom tags. Using jx:choose and jx:when would
of course work too.

I imagine there must be a more elegant way of solving the problem...

Hope that helps,

John

Sanket Pattekar wrote:
> I am using jx template generator.
> 
> I am passing a parameter called language from cocoon sitemap. The
> values to this could be en, nl or some thing different.
> 
> <map:generate type="jx" src="test/test.xml">                   
> <map:parameter
> name="lang" value="en"/>
> </map:generate>
> 
> Based on the lang value I need to create a tag, for example if value
> is en, then I need to create a xml element called
> 
> <h:title-en/>
> 
> and if the lang value is nl, then I need to create a xml element called
> 
> <h:title-nl/>
> 

-- 
---------------------------------------------------------
 Jentro Technologies GmbH
 John L. Webber, Software Development
---------------------------------------------------------
 Rosenheimer Str. 145e      81671 München
 Tel. +49 89 189 169 80     mailto:[EMAIL PROTECTED]
 Fax  +49 89 189 169 99     http://www.jentro.com
---------------------------------------------------------
NOTICE: The information contained in this e-mail is confidential or may
otherwise be legally privileged. It is intended for the named recipient
only. If you have received it in error, please notify us immediately by
reply or by calling the telephone number above and delete this message
and all its attachments without any use or further distribution of its
contents. Please note that any unauthorised review, copying, disclosing
or otherwise making use of the information is strictly prohibited. Thank
you.
---------------------------------------------------------

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

Reply via email to