You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ed Nixon <ed...@LynnParkPlace.org> on 2001/10/15 22:19:04 UTC

Re: Stuck in i18n and JDom

Do you think it might have something to do with the fact that your system 
date is a year and a few days off? Note the time/date stamp on the next line...
At 10:07 PM 18/10/2000 +0200, you wrote:
>Hi All
>
>I'm trying to add i18n to elements added dynamically from a Dom Transformer.
>I'm using JDom to surround the elements with <i18n:text>
>here is the code I'm using
>
>org.jdom.Element CaptionEl = new org.jdom.Element(MenuParser.CAPTION);
>org.jdom.Element I18nEl = new org.jdom.Element("text", "i18n", ";
>I18nEl.setText(item.getCaption());
>CaptionEl.addContent(I18nEl);
>
>when I use the I18nTransformer after the above transformer, I got a 
>NullPointerException,
>Although when I used a LogTransformer to check the output XML, it was 
>perfectly right..
>
>Here's a sample output from the Log File used after the above code
>
>[startElement] uri=,local=caption,raw=caption
>[startElement] uri=http://apache.org/cocoon/i18n/2.0,local=text,raw=i18n:text
>[characters] About
>[endElement] uri=http://apache.org/cocoon/i18n/2.0,local=text,qname=i18n:text
>[endElement] uri=,local=caption,qname=caption
>
>So, the About should be used as a key and should be translated when the 
>i18n transformer used by locating
>the correct catalogue...
>
>when I remove the I18nTransformer from the sitemap, I get no errors
>and when I use just the I18nTransformer for static text alone, it gets 
>translated correctly
>and the <i18n:text> parts in the log file are exactly the same for both 
>elements coming from the static file
>or from the above code.
>
>and the error page is attached to this message...
>
>Thanks in advance
>
>Yours
>Ramy
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <co...@xml.apache.org>
>For additional commands, e-mail: <co...@xml.apache.org>




---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Stuck in i18n and JDom

Posted by Ramy Mamdouh <ra...@imkenberg.de>.
No... it's not the problem I guess :)

:)) How couldn't I see that my system date is one year old?:)

Thanks anyway

Ramy



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>