cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cyril Vidal" <>
Subject i18n + XSLT transformation
Date Sun, 26 Jan 2003 10:41:28 GMT

Just to go more deeply into Cocoon's comprehension, I've yesterday built a
little example with the load of two differents stylesheets
(participantsFR.xsl and participantsEN.xsl) depending of the value of a
parameter passed in HTTP Request, and with the help of this mailing-list,
I've achieved this.

Now, I would like to perform exactly the same task, but by another way: via
the use of i18n Transformer.

To translate a static xml file, I've no difficult, and the following except
of sitemap.xmap, (supposed I've created a catalogue directory named
translation with message_en.xml and message_fr.xml) works well:

<map:match pattern="try_it">

<map:generate src="documents/essai.xml"/>

<map:transform type="i18n">

<map:parameter name="use-request-parameters" value="true"/>


<map:serialize type="xml"/>


The following adresses
http://localhost:8080/cocoon/hellococoon/try_it?locale=fr and
http://localhost:8080/cocoon/hellococoon/try_it?locale=en display the
specified translation.

But now, I would like to mix a XSLT transformation with the i18n
Transformation. (I mean, the different

<i18n:text>text to be translated</i18n:text>  appear now in the XSLT file

To perform this task, I've tried the following code (overlapping the i18n
transformation inside the XSLT transformation...):

<map:match pattern="try_it1">

<map:parameter name="parameters" value="true"/>

<map:generate src="documents/participants.xml"/>

<map:transform src="stylesheets/participantsIN.xsl">

<map:transform type="i18n">

<map:parameter name="use-request-parameters" value="true"/>



<map:serialize type="html"/>


But when I try by example the following adress:


I receive no error message but nor is the i18n transformation done:

I the HTML result, I have all my <i18n:text>text to be
translated</i18n:text> elements, without any effective translation.

Waht I have to change in sitemap to fix the problem?

Thanks again for your help,


Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message