Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Problem with mod_python and 4Suite

Reply
Thread Tools

Problem with mod_python and 4Suite

 
 
Doug Farrell
Guest
Posts: n/a
 
      08-08-2003
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
 
Reply With Quote
 
 
 
 
Alexandre Fayolle
Guest
Posts: n/a
 
      08-08-2003
Doug Farrell a écrit :
> 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


This actually imports the broken xslt engine in pyxml, and not 4suite's.
This engine is known not to work.

You want to import Ft.Xml.Xslt to use 4suite xslt engine in the 1.0
branch. You will also have to adapt your code to the new apis introduced
since 4suite 0.12, please see the documentation.

Try asking on the 4Suite mailing list (links to the list available from
http://4suite.org/)


--
Alexandre Fayolle
LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
Développement logiciel avancé - Intelligence Artificielle - Formations
 
Reply With Quote
 
 
 
 
Doug Farrell
Guest
Posts: n/a
 
      08-12-2003
Alexandre Fayolle <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Doug Farrell a écrit :
> > 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

>
> This actually imports the broken xslt engine in pyxml, and not 4suite's.
> This engine is known not to work.
>
> You want to import Ft.Xml.Xslt to use 4suite xslt engine in the 1.0
> branch. You will also have to adapt your code to the new apis introduced
> since 4suite 0.12, please see the documentation.
>
> Try asking on the 4Suite mailing list (links to the list available from
> http://4suite.org/)


Alexandre,

Thanks for your help and suggestions, I will implement them and see
how that works for me. I'll also post back to this thread to let you
know of my success (or failure <g>).

Again, thanks for for your feedback,
Doug Farrell
Scholastic, Inc.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mod_python.so is garbled mod_python.so is garbled blbmdsmith Python 1 12-14-2006 12:15 AM
Berkeley DB XML vs 4suite for fast searching in XML DB? Sullivan WxPyQtKinter Python 1 04-02-2006 02:23 AM
Differences between RDFlib - 4RDF and Redfoot - 4Suite? =?iso-8859-1?q?Elmo_M=E4ntynen?= Python 2 07-19-2005 08:45 PM
4suite XSLT thread safe ? Ola Natvig Python 8 01-28-2005 03:40 AM
4Suite and XSLT problems Doug Farrell Python 1 08-12-2003 12:19 PM



Advertisments