On 02.07.2007 14:32, Robin Rigby wrote:

How do I do this, please?  None of these work:
<catalogue>
        <message key="message1">Click the <a href="{0}">link</a></message>

</catalogue>

That's indeed not supported (yet): https://issues.apache.org/jira/browse/COCOON-2057.

The i18n:attr feature seems to solve a different problem.

Yes, it only points to an attribute that is to be translated. IIRC the content of this attribute is taken as message key.

The result I want, of course, is

        <p>Click the <a href="page.html">link</a></p>

The only work around that I have in mind at the moment is to do something like

<message key="message1">Click the <a><href>{0}</href>link</a></message>

and to postprocess this with a little XSLT.

<xsl:template match="a[href]">
  <xsl:copy>
    <xsl:attribute name="href">
      <xsl:value-of select="href"/>
    </xsl:attribute>
    <xsl:apply-templates/>
  </xsl:copy>
</xsl:template>

<xsl:template match="node()">
  <!-- generic match for copying all and everything -->
</xsl:template>

Regards
Jörg

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

Reply via email to