Lots of small bug fixes and DOM API conformance improvements:

Make Node inherit from xml.dom.Node to pick up the NodeType values
defined by the W3C recommendation.

When raising AttributeError, be sure to provide the name of the attribute
that does not exist.

Node.normalize():  Make sure we do not allow an empty text node to survive
                   as the first child; update the sibling links properly.

_getElementsByTagNameNSHelper():  Make recursive calls using the right
                                  number of parameters.

Attr.__setattr__():  Be sure to update name and nodeName at the same time
                     since they are synonyms for this node type.

AttributeList:  Renamed to NamedNodeMap (AttributeList maintained as an
                alias).  Compute the length attribute dynamically to allow
                the underlying structures to mutate.

AttributeList.item():  Call .keys() on the dictionary rather than using
                       self.keys() for performance.

AttributeList.setNamedItem(), .setNamedItemNS():
        Added methods.

Text.splitText():
        Added method.

DocumentType:
        Added implementation class.

DOMImplementation:
        Added implementation class.

Document.appendChild():  Do not allow a second document element to be added.

Document.documentElement:  Find this dynamically, so that one can be
        removed and another added.

Document.unlink():  Clear the doctype attribute.

_get_StringIO():  Only use the StringIO module; cStringIO does not support
                  Unicode.
1 file changed