Genshi is very powerful if it can render complete Wiki text without
pre-rendering in the code. I tried something similar (color-coding
overlapping portions of text in my own app) and decided not to do it
in template because frankly I wasn't sure how to begin. So you rule
guys :-)! But why not ask a macro if it needs to add a stylesheet to
the page? Maybe the all-or-nothing approach (render in code vs render
in template) is not the best in this case? In more complex cases, a
macro or a processor may want to change MIME format or introduce an
http-equiv="Refresh" meta keyword (in Bitten). Or this not part of the
design for macros or processors?
Consider also that JavaScript is not good when it comes to unit
testing Web page generation. It's far easier to just test if there's a
reference to a stylesheet than to test that there's a javascript that
hopefully will insert this reference later.

Sergey.

On 10/20/06, Christopher Lenz <[EMAIL PROTECTED]> wrote:
> Christian has attempted to do the same for Trac when Genshi was still
> on a branch[1], but we found one problem: macros and processors in
> wiki text are executed relatively late in the process, i.e. when the
> page is already being generated. At that point, it is too late to add
> things like style sheets to the <head> of the page, so that for
> example the PatchRenderer wasn't able to tell Trac that it needed the
> "diff.css" stylesheet to be rendered properly. At that point Trac
> would already have rendered the <head> element, so obviously we can't
> add anything to it.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/trac-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to