[XML-SIG] DOM: Tuesday evening's changes

A.M. Kuchling akuchlin@cnri.reston.va.us
Tue, 6 Oct 1998 22:13:56 -0400 (EDT)

Tuesday's results:

Changed some node type constants to the _NODE form.
Added Fred Drake's patch for adding a silent sanity check to builder.py

Tried to fix html_builder.py to work with the new DOM code.

Added support for a .readonly attribute.  Made DocumentType, Entity, and
    Notation nodes read-only.
Changed the DOMException class to print more helpfully.
Changed the ._parent attribute of Nodes to .parentNode.
Added ._checkChild, which raises a HierarchyRequestException if the
    child can't be added to the requested node.  (Happily, this seems 
    to only add about 2 seconds to the 7-second parsing time of PyExpat)
Use repr(node) in exception messages.
Override the functions which change the children list in the Document class,
    to check and reset the .documentElement attribute after adding or
    removing a child.  (Won't prevent you from adding two Element nodes until
    it's too late, though -- must fix that.)
Fixed bug in document.getElementsByTagName().
Set .childClasses attribute, which lists the classes which can legally be
    a child of a given node type.
Fixed some comments and docstrings.
Reindented the body of the Node class.
Renamed the .index method to _index

Only display the usage message when no arguments were provided.

Also checked in two files in xmlproc that were accidentally left out
of the CVS tree; sorry!

A.M. Kuchling			http://starship.skyport.net/crew/amk/
Sappho was a worshipper of the Aphrodite cult and on the island of Lesbos
there were many cliff-jumpers. They all jumped. Some may say they flew in
ecstasy. If only for nine seconds -- one second for each string of the lyre.
    -- Peter Greenaway, _Flying Out of This World_ (1994)