[XML-SIG] 4Suite problems

Anders Bruun Olsen anders@bruun-olsen.net
Fri, 13 Dec 2002 22:07:37 +0100


On Fri, Dec 13, 2002 at 01:50:41PM -0700, Uche Ogbuji wrote:
> Hmm.  Works for me.  Try this script and tell me what you get:
> TRANSFORM = """<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> <xsl:template match="@*|node()">
>   <xsl:copy>
>     <xsl:apply-templates select="@*|node()"/>
>   </xsl:copy>
> </xsl:template>
> </xsl:stylesheet>
> """
> SOURCE = """<spam id="eggs">I don't like spam</spam>"""
> processor = Processor.Processor()
> from Ft.Xml.Domlette import NonvalidatingReader
> #Create a DOM for the transform
> transform = NonvalidatingReader.parseString(TRANSFORM, 
> "http://spam.com/identity.xslt")
> #Create a DOM for the source document
> source = NonvalidatingReader.parseString(SOURCE, "http://spam.com/doc.xml")
> processor.appendStylesheetNode(transform, "http://spam.com/identity.xslt")
> result = processor.runNode(source, "http://spam.com/doc.xml")
> print result
> I get:
> $ python domxslt.py
> <?xml version='1.0' encoding='UTF-8'?>
> <spam id='eggs'>I don't like spam</spam>

I get:

Traceback (most recent call last):
  File "test.py", line 23, in ?
    processor.appendStylesheetNode(transform, "http://spam.com/identity.xslt")
AttributeError: Processor instance has no attribute 'appendStylesheetNode'

-- 
Anders
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
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------
PGPKey: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8BFECB41