[lxml-dev] Error with thread
Frédéric Mantegazza
mantegazza at ill.fr
Tue Oct 30 09:47:39 CET 2007
Le mardi 30 octobre 2007 09:35, Stefan Behnel a écrit :
> > I have to find another solution, by adding some new methods and
> > propagate the new params, without creating a new stylesheet.
>
> I think that's the best and most efficient way to do it. Generalise your
> stylesheets to make them configurable through parameters so that you can
> instantiate them once and then pass parameters that tell the stylesheet
> how to behave in this specific thread for the task at hand. With a bit of
> thinking, you should end up with a small set of different stylesheets
> (5-6 sounds reasonable to me) and some parameters for them that make them
> work in all use cases.
>
> If you want to specialise the stylesheets even further, consider creating
> them (partially) programmatically by adapting the XSL tree to your needs
> (adding xsl:include tags or templates as you see fit), then create the
> XSLT instances and store them in a read-only dictionary, maybe addressed
> by a tuple of parameters or whatever you find appropriate.
Ok, thanks for the advice. I'll look in this way.
--
Frédéric
More information about the lxml-dev
mailing list