[XML-SIG] 4Suite problems
Anders Bruun Olsen
Fri, 13 Dec 2002 14:36:18 +0100
n Fri, Dec 13, 2002 at 01:57:53PM +1100, Michael Hall wrote:
> Warning: I am a relative newbie to Python, 4Suite and XSLT, I may
> easily have
> missed something obvious in your example, and you may be trying to do
> I'm not even aware of. That said, however ...
I looks like you have caught on to the idea :)
> Do you need to explicitly open the XML and XSL files? Normally, you
> simply supply filepaths to the processor:
Uhmm.. probably not, but take a look below..
> > def ProcessFile(input, output):
> stylesheet = "/path/to/somesheet.xsl"
> > xsltprocessor = Processor()
> > xsltprocessor.appendStylesheetUri(stylesheet)
> > result = xsltprocessor.runUri(input)
> > if result:
> > open(output, "w").write(result)
> This works for me creating dynamically generating HTML web pages with
> a Python
> CGI script, except that I do this with the result:
> if result:
> print "Content-type: text/html\n\n"
> print result
This results in the following error:
AttributeError: Processor instance has no attribute 'appendStylesheetUri'
I forgot to mention that I am using 4Suite 0.11.1
-----BEGIN GEEK CODE BLOCK-----
GCS/O d--@ s:+ a-- C++ $UL+++ P++ L+++ E- W+ N(+) o K? w O- M-- V
PS+ PE@ Y+ PGP+ t 5 X R+ tv+ b+ DI+++ D+ G e- h !r y?
------END GEEK CODE BLOCK------