cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Nixon <ed.ni...@LynnParkPlace.org>
Subject Re: Stuck in i18n and JDom
Date Mon, 15 Oct 2001 20:19:04 GMT
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: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message