D
Doug Farrell
Hi all,
I'm trying to build a demonstration website using mod_python and
4Suite to show how we could transform XML documents into HTML with
XSLT. Here is a piece of code that causes it to blow up:
# import the xml/xslt stuff here
from xml.xslt.Processor import Processor
# create a xslt processor
xsltProc = Processor()
# transform the xml text into html
xsltProc.appendStylesheetUri(filepath)
html = xsltProc.runString(xmltext)
Here is the trace I get in the browser when I run this code:
Mod_python error: "PythonHandler mod_python.publisher"
Traceback (most recent call last):
File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line
285, in HandlerDispatch
result = object(req)
File "/usr/lib/python2.2/site-packages/mod_python/publisher.py",
line 175, in handler
result = apply(object, (), args)
File "/data/cs/handlers/gme.py", line 61, in search
return _transform(xmldata, filepath)
File "/data/cs/handlers/gme.py", line 105, in _transform
from xml.xslt.Processor import Processor
File "/usr/lib/python2.2/site-packages/_xmlplus/xslt/__init__.py",
line 19, in ?
pyxml_required = version.StrictVersion(Ft.__pyxml_version__)
AttributeError: 'module' object has no attribute '__pyxml_version__'
Does anyone have any suggestions, or just even general advice on using
4Suite with mod_python? I'd be very interested to hear them.
I'm running this on a Dell 2550 server with RedHat linux 8.0, Python
2.2.1, PyXML 0.8.3 and 4Suite 1.0.a*
Thanks in advance for your help.
Doug Farrell
I'm trying to build a demonstration website using mod_python and
4Suite to show how we could transform XML documents into HTML with
XSLT. Here is a piece of code that causes it to blow up:
# import the xml/xslt stuff here
from xml.xslt.Processor import Processor
# create a xslt processor
xsltProc = Processor()
# transform the xml text into html
xsltProc.appendStylesheetUri(filepath)
html = xsltProc.runString(xmltext)
Here is the trace I get in the browser when I run this code:
Mod_python error: "PythonHandler mod_python.publisher"
Traceback (most recent call last):
File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line
285, in HandlerDispatch
result = object(req)
File "/usr/lib/python2.2/site-packages/mod_python/publisher.py",
line 175, in handler
result = apply(object, (), args)
File "/data/cs/handlers/gme.py", line 61, in search
return _transform(xmldata, filepath)
File "/data/cs/handlers/gme.py", line 105, in _transform
from xml.xslt.Processor import Processor
File "/usr/lib/python2.2/site-packages/_xmlplus/xslt/__init__.py",
line 19, in ?
pyxml_required = version.StrictVersion(Ft.__pyxml_version__)
AttributeError: 'module' object has no attribute '__pyxml_version__'
Does anyone have any suggestions, or just even general advice on using
4Suite with mod_python? I'd be very interested to hear them.
I'm running this on a Dell 2550 server with RedHat linux 8.0, Python
2.2.1, PyXML 0.8.3 and 4Suite 1.0.a*
Thanks in advance for your help.
Doug Farrell