Make XMLMasks match properly for components.

This commit is contained in:
Lance Stout
2013-04-01 20:57:16 -07:00
parent 0a2737dc77
commit 7ac75de19d
2 changed files with 8 additions and 4 deletions

View File

@@ -1017,8 +1017,12 @@ class XMLStream(object):
if name is None:
name = 'add_handler_%s' % self.new_id()
self.register_handler(XMLCallback(name, MatchXMLMask(mask), pointer,
once=disposable, instream=instream))
self.register_handler(
XMLCallback(name,
MatchXMLMask(mask, self.default_ns),
pointer,
once=disposable,
instream=instream))
def register_handler(self, handler, before=None, after=None):
"""Add a stream event handler that will be executed when a matching