[Zopexmlmethods-devel] Overriding parameters with REQUEST variables
Brought to you by:
arielpartners,
philikon
|
From: Brent M H. <br...@ec...> - 2003-04-08 18:57:56
|
As I mentioned in my previous email, I need the behavior of allowing
REQUEST variables to override stylesheet parameters. This allows
individual users to see customized behaviors based on session data,
cookies, or form data.
Primarily this involves editing getXSLParameters() to query the REQUEST
object for each parameter. However, this means that getXSLParameters()
needs to receive REQUEST, so I modified the .transform() method to pass
it along.
I've made the changes for LibXsltProcessor.py, and it should be trivial
to do it for the other processors as well[1]. It seems to work as
intended, although I can't claim to have do extensive testing. I can
post the patch if you are interested.
--Brent
[1] While looking at this, I noticed that the exact same
getXSLParameters() code is replicated in every processor implementation.
Would it perhaps be better to move this code into the XSLTMethod class
and then pass the parameters as a dictionary to processor.transform()?
-------------------------------------------------------------------------
"The programmer, like the poet, works only slightly removed from pure
thought-stuff. He builds his castles in the air, from air, creating
by exertion of the imagination. Few media of creation are so
flexible, so easy to polish and rework, so readily capable of
realizing grand conceptual structures."
-- Frederick Brooks, Jr., The Mythical Man Month
|