Niels, This was a great suggestion, and it got me going in the right direction. For future reference, the problem was that i18n transformations were only working if they were the first step in my pipeline, but they wouldn't work if they were a later step, i.e. occuring after an xsl transformation. I finally narrowed the problem down, and the solution is this:


Every xsl transformation in your pipeline must output XML. HTML output, even if it adheres to the rules of well-formed XML, is not treated as XML in the SAX events, and i18n won't be able to parse it. You'll get all kinds of crazy results instead. You can serialize into html after i18n does its thing.

Also, there is some misleading documentation out there that wants you to put <i18n:translate> tags around any section of text that has a <i18n:text> tag in it. IMHO, this is misleading, and in some cases seems to confuse the issue and keep i18n from transforming correctly.

Thanks again to Niels and to Peter Binkley for their help!

Bess Sadler


On Mon, 14 Mar 2005, Niels van Kampenhout wrote:

Try putting the LogTransformer (org.apache.cocoon.transformation.LogTransformer) in between the first and second transformer in your pipeline, and see if the SAX events make sense. I have had similar problems, which were caused by an incorrect SAX stream (two startElement events and only one endElement event, or something like that). If this is the case with your problem, you may have something weird in your XSL. For example, I once have seen a simple <xsl:output> statement mess up the SAX stream.

Hope this helps.

Niels

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




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



Reply via email to