[XML-SIG] CGI Problem

Michael Hall olc@ninti.com
Sun, 25 Aug 2002 14:01:14 +0930 (CST)


I'm relatively new to XML and Python, but have written several basic 
Python CGI scripts using MySQL-python for example. I'm competent with most 
aspects of PHP, and can get by in Perl. After trying to get a basic 
XML/XSLT processing environment set up in PHP, then Perl, and now Python, 
I have to say that the Python experience has definitely been the easiest.

Anyway, my current problem is this:

I have a Python CGI script that converts XML to HTML using XSLT (PyXML).
The script produces beautiful output to standard out if called from the 
command line, but will not work if called via http. Other simpler 
Python CGI scripts in the same directory that simply print "Hello World" 
work fine.

This is the output I get from the xml2html.py script:
Traceback (most recent call last): File "/home/olc/cgi-bin/xml2html.py", line 21, in ? xsltproc.appendStylesheetUri(stylesheet) 
File "/usr/lib/python2.2/site-packages/_xmlplus/xslt/Processor.py", line 95, in appendStylesheetUri sty = 
self._styReader.fromUri(styleSheetUri, baseUri) File "/usr/lib/python2.2/site-packages/_xmlplus/xslt/StylesheetReader.py", line 
298, in fromUri ownerDoc, stripElements) File "/usr/lib/python2.2/site-packages/_xmlplus/xslt/minisupport.py", line 58, in 
fromUri return self.fromStream(stream, baseUri, ownerDoc, stripElements) File 
"/usr/lib/python2.2/site-packages/_xmlplus/xslt/StylesheetReader.py", line 305, in fromStream self.initParser() File 
"/usr/lib/python2.2/site-packages/_xmlplus/xslt/StylesheetReader.py", line 355, in initParser 
self.parser.ExternalEntityRefHandler = self.handler.entityRef AttributeError: StylesheetReader instance has no attribute 
'entityRef'
 
Where should I be looking for the problem? .xml file? .xsl file? .py CGI 
script? server environment? Is there something obvious I don't know about 
going on here? I've been following Jones & Drake's 'Python & XML' to the 
letter.

TIA

Mick