If you serialize it as xml just before the i18n transformation, do you
see a difference in the namespaces in your XML btween the working and
the non working pipeline? Typically the namespace prefix for i18n is
defined as xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
 

Jasha Joachimsthal 
 
[EMAIL PROTECTED] - [EMAIL PROTECTED]
 
www.onehippo.com <http://www.onehippo.com/> 
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-3329 +1 (707) 773-4646



________________________________

        From: Mark Lundquist [mailto:[EMAIL PROTECTED] 
        Sent: vrijdag 24 oktober 2008 1:53
        To: users@cocoon.apache.org
        Subject: Re: Apache i18n problem
        
        

        On Oct 23, 2008, at 8:22 AM, Justice Utete wrote:


                Hi,
                
                I'm having a problem with cocoon i18n. I have a
Generator which does some processing then generates XML. I also have
some xls files which are basically for translation and the html styles.
                Mt problem is: When i use the deafault file generator,
the pages are translated succesfully but when i use my Generator the
files are not translated at all...
                
                This is what my sitemap looks like
                
                        <map:match pattern="*.htm">
                                    <map:generate type="MyGenerator">
                                        <map:parameter name="user"
value="test"/>
                                    </map:generate>                    
                                    <map:transform type="cinclude">
                                        <map:parameter
name="support-caching" value="true"/>
                                        <map:parameter name="expires"
value="600"/>
                                        <map:parameter name="parallel"
value="true"/>
                                    </map:transform>
                                    <map:transform type="xalan"
src="{1}.xsl"/>
                                    <map:act type="locale">

                                     <map:transform type="i18n">
                                       <map:parameter name="locale"
value="{locale}"/>
                                     </map:transform>
                                     </map:act>
                                    <map:serialize type="html"/>
                                </map:match>
                This above does not work.
                
                But it works when i change to the following:
                            <map:match pattern="*.htm">
                            <map:generate src="{1}.xsl"/>     
                            <map:transform type="cinclude">
                                              <map:parameter
name="support-caching" value="true"/>
                                              <map:parameter
name="expires" value="600"/>
                                              <map:parameter
name="parallel" value="true"/>
                                            </map:transform>

                                                         
                                    <map:act type="locale">             
                                        <map:transform type="i18n">
                                            <map:parameter name="locale"
value="{locale}"/>                       
                                        </map:transform>
                                     </map:act>                     
                                     <map:serialize type="html"/>   
                
                I cant use the second method because I need the data
returned by MyGenerator.


        You've tried with one generator where i18n translation doesn't
work, but if you use a different generator, then it does work... right?

        So... you've looked at the output from the generator where it
works, and also from the generator where it doesn't work, and they are
different how? :-)


                Does anyone know how I can get this to work?
                


        Fix your generator? :-)

        But seriously... the i18n transformer transforms XML, and if it
"works" here and "doesn't work" there, then it's probably because the
XML "there" is no good, and you'll really need to have a look at the XML
to find out what's no good about it.  And when you do, in all likelihood
that will point you right toward what you need to fix.

        cheers,
        -ml-


Reply via email to