[XML-SIG] Another Sax2 Enhancement: dataSource

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Fri, 27 Apr 2001 20:38:38 +0200


> Given that the info is only stored on the document node, I think it's a
> relatively small cost. It was certainly easier for me to patch the DOM
> implementation then to implement my own dictionary (although not that
> much easier). But now nobody else has to think about it.

Even easier would be to put the attribute into the Document object
without patching the DOM implementation:

root = FromXmlStream(foo)
root.dataSource = bar

This is Python; you can modify any instance's attributes (unless the
instance takes countermeasures).

IMO this is as clean, but simpler, than extending the DOM
implementation.

Regards,
Martin