[XML-SIG] DOM Extension Proposal
Paul Prescod
paul@prescod.net
Wed, 21 Jun 2000 06:03:23 -0500
Insofar as the DOM does not address Python's syntax overloading, it does
not say what we must do in our overloading.
I propose that we extend the DOM with a new type AttributeList that is a
subclass of NamedNodeMap:
It would override __getitem__ to return the *value* of the reference
attribute node instead of a (often useless and annoying) attribute node
object.
The behvaior of all DOM-defined methods (item, namedItem, namedItemNS)
would be unchanged. The practical implication is that Python users could
write code like this:
url=img[src]
rather than:
url=img[src].value
--
Paul Prescod - ISOGEN Consulting Engineer speaking for himself
"Music is the stuff between the notes." - Claude Debussy