4Suite Reliance on ENVIRONMENT & global variables

Mongryong Mongryong at sympatico.ca
Mon Jan 20 16:32:42 EST 2003


Hi,

I'm having trouble getting the latest 4Suite XML/XSLT tools to work the
way I want in mod_python and I know I'm not the first one to experience
"out-of-the-box" success.  

I've determined that it's an encoding issue.   Now, with a stand-alone
script or CGI script under Apache, 4XSLT works fine.  But under
mod_python (which doesn't have access to ENVIRONMENT variables), 4XSLT
library decodes the XML source file in a total different encoding.  XSL
templates (ie. <xsl:template name="blah">) are never executed because
the XML tag is never recognized by the XSL processor.  Hence, you get an
empty output.

I've check the default system encoding codec and it returns 'ascii' (ie.
sys.getdefaultencoding).  Now, it could be that the python library
relies on some ENVIRONMENT variable for its configuration.

Anybody have any ideas what 'parameters' might not be initialized
properly under a non-CGI or non-shell environment such as mod_python? 
Or, is there a parameter that one can set to change the XML input
decoding?  










More information about the Python-list mailing list