forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Re: CLI & I18N
Date Thu, 09 Oct 2003 09:13:38 GMT
On Wed, Oct 08, 2003 at 12:47:14PM +0100, Upayavira wrote:
> Jeff Turner wrote:
> >It's my usual confusion between the responsibilities of the sitemap
> >and the user agent.  I'm still not sure where their responsibilities
> >lie.  
> >
> We should think of the CLI as a User Agent in relation to Cocoon. 
> Therefore, it is the CLI's responsibility to present a locale to Cocoon, 
> and thus the xconf's responsibility to give a locale to the Bean.
> >Say we wanted to generate gzipped
> >output; would we implement a ZipSerializer, or hack the CLI to ask for
> >"Content-encoding: gzip"?
> > 
> >
> Why would you want to generate gzipped output? What is the usecase? You 
> could use the ZipSerializer, or you could make the bean do it. But the 
> question is why, before we can identify the correct place.

A thought experiment, not a use-case.  My thinking is: it's always
possible for the sitemap to 'hardcode' behaviour (language, encoding,
file extension etc), so we could get away with a really dumb CLI.  For
i18n, we could just have a 'index.html.{en,de,fr,..}' matcher.

However, the more realistically the CLI emulates a 'real' user agent (the
browser), we can take more advantage of Cocoon's features.  For i18n, we
can have an 'index.html' pipeline serving different content based on the
useragent's language.  Seems a nicer and more 'correct' way of doing


> >I guess a safe rule of thumb is that if a web browser can do it, the CLI
> >could also, so any CLI enhancements in this direction will surely be
> >useful.
> >
> Explain more, and I'm sure we can have it.
> Regards, Upayavira

View raw message