'A namespace tag is closed.  Pop the stack, if there\'s anything left in
it, otherwise return to the document\'s namespace.'

def endElementNS(self, name, qname):

    self.stack.pop()
    if self.stack:
        self.current = self.stack[(-1)].children
    else:
        self.current = self.document
