Thanks a lot Ard!

I am using the locale action at before any "map:match". I am passing the
locale as parameter but not using it in the XSL stylesheets.

exemple:
<map:act type = "locale">
  <map:match pattern = "index.html">
    <map:generate src = "index.xml"/>
    <map:transform src = "index.xsl"/>
    <map:transform type = "i18n">
      <map:parameter name = "locale" value = "{../locale}"/>
    </map:transform>
    <map:serialize type = "xhtml"/>
  </map:match>
</map:act>

In the XSL stylesheet i transform the keys as : 
<i18n:text>exemple.author.name</i18n:text>

In the xslt transformer configuration I specified the parameters
<use-request-parameters>true</use-request-parameters>

The localeAction for cocoon 2.x is an action which injects the locale
parameters from the session, the request or the cookie(according to the
action configuration) if I'm right...

The locale selection is managed through some javascript and everything is
working well when I'm not using a pipeline which type is "caching".

I am not sure I'm doing anything the wrong way. Thanks for your response.

Anybody there!
-----Original Message-----

> 
> > 
> > Hi everybody,
> > 
> >     We are writing a dynamic website with cocoon and with are 
> > confronted 
> > to some problems.
> > We would like all the pages to be cached at startup for all possible 
> > specified languages.  When the user change the locale, it should be 
> > reflected in all the application's pages.
> 
> Hmmm, you are caching every possible page at startup?? With a crawler
> or something? Or you mean only the homepages? Or all? How do you do
> all? And what if content changes? Do you have to re-cache everything?
> It looks like you are working like the "forrest" guys. Cocoon has many
> smart caching mechanism, like eventAware that make running live without
> warming up the caches is very well possbile
> 
> > 
> >     However the cache doesn't seem to be updated when the 
> > locale change. 
> > The same page is often returned and sometimes a page with the 
> > previous 
> > language settings.
> > 
> > 
> > Were are using Cocoon 2.1.9 and the localeAction with 3 languages 
> > (Spanish, English and trench). We were looking at the 
> > CacheEventAction 
> > but it doesn't seem to be the way to go.
> 
> I am not aware of waht the localeAction does. But I can imagine it is
> at the end of your pipeline, right? And the localeAction does not
> implement CacheableProcessingComponent interface. So, now, I have to
> quess what your problem is, but I have a clue:
> 
> You do some generation part, then some xsl transforms, and then a
> localeAction..(hope i got it right)
> 
> And probably, the generation part and the xsl part is locale dependent.
> But, you dont use the locale in there (as a parameter). So, this
> implies, your cache is built up until the first not cacheable
> component...(I suppose, but am not sure, and have to sort it out if it
> remains a problem, that this also holds for map:actions and
> map:selectors and stuff)
> 
> Anyway, so your cache is build with a generation part and some xsl
> transformer, where the locale is not in it. Now, changing your locale
> will return the very same cache...solution: do the xsl transformation
> with an extra map:parameter, with name="foo" and value equal to the
> locale. You dont have to use this parameter in your xsl. It only makes
> sure, your cache key contains the locale (look in StatusGenerator for
> generated keys: probably, you dont see the locale in it)
> 
> Hope this helps you out,
> 
> Regards Ard
> 
> > 
> >     If someone could help, it would be great. We are kind of 
> > stuck with 
> > Cocoon as it is considered as a show stopper for the project.
> > 
> > Thanks in advance
> > 
> > -- 


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

Reply via email to