[XML-SIG] (no subject)

horst@freedict.de horst@freedict.de
Thu, 13 Dec 2001 15:39:05 +0100 (CET)


Hello,
since I did not receive a answer why my test program for accessing
attributes with DOM failed, I tried to research why.

I realised, that in PyXML 0.7.0 (from CVS) failed with an installed
Python 2.1.0 installed. ( I deleted all directories first to make sure,
that nothing from a previous install is around).

Any hints, what is going wrong? - Help would be much appreciated.

horst




> ./regrtest.py test_c14n
Warning: can't open ./output/test_c14n Doing 1, <?xml
version="1.0"?>\n\n<?xml-s... Created out1.xml Doing 2, <doc>\n
<clean>   </clean>\n  ... Created out2.xml Doing 3, <!DOCTYPE doc
[<!ATTLIST e9 at... Exception <exceptions.TypeError instance at
0x82845ec> Traceback (most recent call last):
  File "test_c14n.py", line 162, in builtin
    dom = r.fromString(eg)
  File "/usr/local/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/__init__.py", line 63, in fromString
    return self.fromStream(stream, ownerDoc)
  File "/usr/local/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/PyExpat.py", line 65, in fromStream
    success = self.parser.ParseFile(stream)
  File "/usr/local/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/PyExpat.py", line 153, in startElement
    local + ':' + prefix)
TypeError: cannot add type "None" to string
Doing 4, <!DOCTYPE doc [ <!ATTLIST norm... Created out4.xml
Doing 5, <!DOCTYPE doc [\n<!ATTLIST doc ... test test_c14n crashed -- exceptions.AttributeError : FunctionCall1 instance has no attribute 'filter'
test_dom
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE doc>
<doc>
  <title>This is a test</title>
  <h1>Don't panic</h1>
  <p>Maybe it will work.</p>
  <h2>We can handle it</h2>
  <h3>Yes we can</h3>
  <h3>Or maybe not</h3>
End of test.
</doc>
test test_dom failed -- Writing: '\n', expected: '<'
test_domu
test test_domu skipped -- an optional feature could not be imported
test_encodings
test_howto
test_htmlb
test test_htmlb crashed -- exceptions.NameError : global name 'tagname' is not defined
test_javadom
Warning: can't open ./output/test_javadom
test_marshal
test test_marshal skipped -- an optional feature could not be imported
test_minidom
test_pyexpat
test test_pyexpat failed -- Writing: "u'attr2': u'value2\\\\u1f40',", expected: "u'attr2': u'value2\\\\\\u1f40'"
test_sax
test_sax2
test_sax2_xmlproc
Warning: can't open ./output/test_sax2_xmlproc
test_sax_xmlproc
test_saxdrivers
test test_saxdrivers failed -- Writing: 'xml.sax.drivers2.drv_pyexpat', expected: 'xml.sax.drivers.drv_pyexpat '
test_utils
9 tests OK.
5 tests failed: test_c14n test_dom test_htmlb test_pyexpat test_saxdrivers
2 tests skipped: test_domu test_marshal

> ./regrtest.py
test_c14n
Warning: can't open ./output/test_c14n
Doing 1, <?xml version="1.0"?>\n\n<?xml-s... Created out1.xml
Doing 2, <doc>\n   <clean>   </clean>\n  ... Created out2.xml
Doing 3, <!DOCTYPE doc [<!ATTLIST e9 at...
Exception <exceptions.TypeError instance at 0x82845ec>
Traceback (most recent call last):
  File "test_c14n.py", line 162, in builtin
    dom = r.fromString(eg)
  File "/usr/local/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/__init__.py", line 63, in fromString
    return self.fromStream(stream, ownerDoc)
  File "/usr/local/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/PyExpat.py", line 65, in fromStream
    success = self.parser.ParseFile(stream)
  File "/usr/local/lib/python2.1/site-packages/_xmlplus/dom/ext/reader/PyExpat.py", line 153, in startElement
    local + ':' + prefix)
TypeError: cannot add type "None" to string
Doing 4, <!DOCTYPE doc [ <!ATTLIST norm... Created out4.xml
Doing 5, <!DOCTYPE doc [\n<!ATTLIST doc ... test test_c14n crashed -- exceptions.AttributeError : FunctionCall1 instance has no attribute 'filter'
test_dom
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE doc>
<doc>
  <title>This is a test</title>
  <h1>Don't panic</h1>
  <p>Maybe it will work.</p>
  <h2>We can handle it</h2>
  <h3>Yes we can</h3>
  <h3>Or maybe not</h3>
End of test.
</doc>
test test_dom failed -- Writing: '\n', expected: '<'
test_domu
test test_domu skipped -- an optional feature could not be imported
test_encodings
test_howto
test_htmlb
test test_htmlb crashed -- exceptions.NameError : global name 'tagname' is not defined
test_javadom
Warning: can't open ./output/test_javadom
test_marshal
test test_marshal skipped -- an optional feature could not be imported
test_minidom
test_pyexpat
test test_pyexpat failed -- Writing: "u'attr2': u'value2\\\\u1f40',", expected: "u'attr2': u'value2\\\\\\u1f40'"
test_sax
test_sax2
test_sax2_xmlproc
Warning: can't open ./output/test_sax2_xmlproc
test_sax_xmlproc
test_saxdrivers
test test_saxdrivers failed -- Writing: 'xml.sax.drivers2.drv_pyexpat', expected: 'xml.sax.drivers.drv_pyexpat '
test_utils
9 tests OK.
5 tests failed: test_c14n test_dom test_htmlb test_pyexpat test_saxdrivers
2 tests skipped: test_domu test_marshal





-- 
Horst@freedict.de
Horst Eyermann 
Germany

You need a dictionary? - visit http://www.freedict.de
for free (GPL) dictionaries (unix; windows work in progress)
For windows, visit http://www.freedict.de/wbuch

A article (in German) about dictionary efforts on the net
http://www.heise.de/tp/deutsch/inhalt/on/5927/1.html