Holger Joukl wrote:
Stefan Behnel firstname.lastname@example.org schrieb am 23.06.2006 12:54:26:
- def DefaultNamespace():
"""Retrieve the namespace object associated with the default
('*'). Creates a new default if it does not yet exist."""
I don't think DefaultNamespace is a good name, as this is not related to namespaces at all.
Right, that's probably similarly confusing as I found the heading "Implementing namespaces with the namespace class" in the lxml doc ;-) How about renaming this to "Associating custom element classes with namespaces"
True. I just changed that and adapted the doctests to the new API.
I think a better API would be an explicit module level function for
setting the default element class.
The nice thing about staying close to the existing solution is that it is still possible to have per-tagname-registered custom element classes, if you wish.
That's not a problem. Namespace specific classes obviously override the global default class, just as they already do for _Element.