cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier Lange" <>
Subject i18n trouble with nested elements in catalog messages
Date Tue, 09 Sep 2003 00:13:18 GMT
Hello all,

Does anybody know if the i18n transformer supports nested elements within
the catalog messages? I examined the tranformer's source code (Cocoon 2.1),
but it is not obvious to me.

If not, would it be possible and make sense to enable support for nested
elements with attributes and namespaces? Or would it not be desirable?

I would like to have short structured text messages (XML fragments) within
the catalog, rather that just plain text messages (character strings).

Let me give an example. I'd like to translate the following <i18n:text>



with the following message:


  <catalogue xml:lang="en"

    <message key="21">
      <d:p> ...<d:email href=""/>... </d:p>

I tried with the following sitemap:


    <map:match pattern="*/events/index.html"
      <map:generate src="cocoon:/events/index.xml">
      <map:transform type="i18n">
          <map:parameter name="locale" value="{1}"/>
      <map:serialize type="xhtml"/>

and almost succeeded. When I serialized immediately after the i18n
transformation, it worked well, seemingly at least*: the output contained
the <d:p> ...<d:email href=""/>... </d:p> <d:p>...</d:p>
structured text.

But when I added some XSLT transformation or any other transformation, I ran
into trouble. The following generates a NPE (Cocoon 2.1/Tomcat 4.1.27/JDK


      <map:transform type="i18n">
          <map:parameter name="locale" value="{1}"/>
      <map:transform type="xslt" src="docmini-to-xhtml.xsl"/>
      <map:serialize type="xhtml"/>

(The docmini-to-xhtml transformation runs fine on the Xalan command-line
with the serialised output of the previous pipeline).

This happens with any transformer (xsl, linkrewriter, log, ...).

Is this happening because the i18n transformer is not intended to support
nested elements?

* A closer inspection with the Log transformer gave me the feeling that the
SAX flow was compromised


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

View raw message