On Jul 13, 2007, at 5:40 AM, Lennart Regebro wrote:

Hi all!

On 4/16/07, Gary Poster <[EMAIL PROTECTED]> wrote:
The work that Jim Washington and David Pratt have started recently to
make lxml an XHTML generator/ZPT replacement [#1]_ has really excited
me.  It would be *great* with in-Zope pipelines [#2]_.

I'm here at the grok-sprint at EuroPython and we are looking into
getting a pipeline hooked in to add theming to HTML output. [The idea
of this is to add the theming, that is design, viewlets and so on, by
imposing it on the HTML output, instead of including it from the
template. This would open up for template independency, or even
skipping templates completely for simple HTML and instead just
outputting it.]

We are looking for recommendations and visions on how to do this
pipelining with IResults, because it's not entirely clear to us at the
moment. Main worries are the questions of how to differ between
results that need to be themed and those who don't,

I thought you'd return different objects, and rely on adapters. I'm a bit surprised at the question, actually--what have I missed?

and also IResult
seems to have to handle the encoding itself, which means we need to
duplicate the encoding that is already going on in setResults.

I think the responsibility is appropriate: IResult should be responsible for encoding, because who knows what it wants to return.

Perhaps the factoring could be improved in the future, so that the encoding code could be a function that setResults uses, and your custom IResult adapter can too. For now, it hardly seems like a show- stopper.

I have earlier (before IResult being made public) made a quick hack
that inserts theming earlier in the process by replacing the
BrowserPublication, maybe that's a better way to put theming?

Doesn't appeal to me--feels like the hack that we did for zc.resourcelibrary, in which the change to the system is much, much too heavyweight (someday we'll convert it to using IResult, I suspect)--but you're doing it. :-)

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to