You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Torsten Curdt <tc...@dff.st> on 2001/05/07 14:47:08 UTC

language aware images

Sorry, if this is too OT but...
I was thinking about something like this:

 <map:match pattern="images/**.gif">
    <map:act type="lang-select">
     <map:read src="images/{lang}/{1}.gif" mime-type="image/jpg"/>
    </map:act>
 </map:match>

Unfortunately this is predestined to give strange
browser caching behavior when changing the language.

Any 2 cents for me ;)
--
Torsten


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: language aware images

Posted by Gerd Mueller <ge...@smb-tec.com>.
Am Monday 07 May 2001 02:47 pm schrieb Torsten Curdt:
> Sorry, if this is too OT but...
> I was thinking about something like this:
>
>  <map:match pattern="images/**.gif">
>     <map:act type="lang-select">
>      <map:read src="images/{lang}/{1}.gif" mime-type="image/jpg"/>
>     </map:act>
>  </map:match>
>
> Unfortunately this is predestined to give strange
> browser caching behavior when changing the language.

For language aware images I would suggest to use the I18NTransformer. It can
translate tag attributes. So, you could 'translate' an image href into the 
correct URL.

Best Regards,
Gerd
-- 
______________________________________________________________________
Gerd Mueller                                   mailto:gerd@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com

---------------------------------------------------------------------
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: language aware images

Posted by Donald Ball <ba...@webslingerZ.com>.
On Mon, 7 May 2001, giacomo wrote:

> On Mon, 7 May 2001, Torsten Curdt wrote:
>
> > Sorry, if this is too OT but...
> > I was thinking about something like this:
> >
> >  <map:match pattern="images/**.gif">
> >     <map:act type="lang-select">
> >      <map:read src="images/{lang}/{1}.gif" mime-type="image/jpg"/>
> >     </map:act>
> >  </map:match>
> >
> > Unfortunately this is predestined to give strange
> > browser caching behavior when changing the language.
>
> Wrong syntax. It should be:
>
>       <map:read src="images/{lang}/{../1}.gif" mime-type="image/jpg"/>
>
> Giacomo
>
> BTW: can you move these question to the cocoon-user list because they
> don't have anything to do with the development.

note your answer doesn't address his vary-on-language concerns, which may
well tie into dev discussions. as a general rule, though, you're on the
money.

- donald


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: language aware images

Posted by giacomo <gi...@apache.org>.

On Mon, 7 May 2001, Torsten Curdt wrote:

> Sorry, if this is too OT but...
> I was thinking about something like this:
>
>  <map:match pattern="images/**.gif">
>     <map:act type="lang-select">
>      <map:read src="images/{lang}/{1}.gif" mime-type="image/jpg"/>
>     </map:act>
>  </map:match>
>
> Unfortunately this is predestined to give strange
> browser caching behavior when changing the language.

Wrong syntax. It should be:

      <map:read src="images/{lang}/{../1}.gif" mime-type="image/jpg"/>

Giacomo

BTW: can you move these question to the cocoon-user list because they
don't have anything to do with the development.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org