[4suite] 4Suite Reliance on ENVIRONMENT & global variables
Mike.Olson at fourthought.com
Tue Jan 21 06:23:13 CET 2003
> The strange thing is that if I directly output the XML source without
> doing any XSLT processing, the XML source appears correctly. Somewhere
> along the line where the strings are being passed from the python
> libraries to the 4Suite libraries (by Py_ParseArgs..???), the strings
> are being 'miscommunicated'.
By "output the XML source" do you mean just print it out (or fetch it
from the file system) ro do you mean parse it into DOM, and print it
If not the later, can you try that instead of XSLT to see if this works.
> Now, it might be a Python2.2.2 issue since libxml2/libxslt from the
> gnome project are having similar problems as well.
> In 4Suite, do the apps embedd the python interpretor or do the apps
> start purely from a python environment?
> It might be good to check to see whether this problem still occurs
> 'python embedded' application (ie. uses Py_NewInterpretor from C). I
> forget, does the command-line version of python dynamically link to the
> python libraries? If so, I wonder if the command-line version of
> is doing anything special or different when it links up and initializes
> the python libraries.
> I'm reposting this message on to the Python mailing list to see if
> anybody there can help give us a clue.
> P.S Has there been any changes in Python2.2.3+ that might possibly fix
> this problem?
> On Mon, 2003-01-20 at 22:28, Uche Ogbuji wrote:
>> On Mon, 2003-01-20 at 14:52, Mongryong wrote:
>>> I'm having trouble getting the latest 4Suite XML/XSLT tools to work
>>> way I want in mod_python and I know I'm not the first one to
>>> "out-of-the-box" success.
>>> I've determined that it's an encoding issue. Now, with a
>>> script or CGI script under Apache, 4XSLT works fine. But under
>>> mod_python (which doesn't have access to ENVIRONMENT variables),
>>> library decodes the XML source file in a total different encoding.
>>> 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'
>>> 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
>> I don't think there is any environment variable that could affect
>> However, there have been a lot of fixes recently, including to some
>> endianness bugs. Do you mind trying again with latest 4Suite CVS and
>> telling us if it helps? Either wait till tomorrow's snapshot, or
>> out current CVS HEAD directly
>> If it doesn't help, I hope you'll be able to help us work with you to
>> find a solution for mod_python users.
>> Uche Ogbuji Fourthought, Inc.
>> http://uche.ogbuji.net http://4Suite.org http://fourthought.com
>> Python Generators + DOM -
>> 4Suite Repository Features -
>> XML class warfare - http://www.adtmag.com/article.asp?id=6965
>> MusicBrainz metadata -
Mike Olson Principal Consultant
mike.olson at fourthought.com +1 303 583 9900 x 102
Fourthought, Inc. http://Fourthought.com
PO Box 270590, http://4Suite.org
Louisville, CO 80027-5009, USA
XML strategy, XML tools, knowledge management
More information about the Python-list