'Process the given xml `node`: collect `todo` and `done` items.'

def process(self, node):

    if (isinstance(node, SKIPPED_ELEMENT_TYPES) or (node.tag in SKIPPED_ELEMENTS) or (node.get('t-translation', '').strip() == 'off') or ((node.tag == 'attribute') and (node.get('name') not in TRANSLATED_ATTRS)) or ((node.getparent() is None) and node.text and ('<!DOCTYPE' in node.text))):
        (tail, node.tail) = (node.tail, None)
        self.done(etree.tostring(node, method=self.method))
        self.todo(escape((tail or '')))
        return
    child_trans = XMLTranslator(self.callback, self.method, parser=self.parser)
    if node.text:
        if avoid_pattern.match(node.text):
            child_trans.done(escape(node.text))
        else:
            child_trans.todo(escape(node.text))
    for child in node:
        child_trans.process(child)
    if (child_trans.all_todo() and (node.tag in TRANSLATED_ELEMENTS) and (not any((attr.startswith('t-') for attr in node.attrib)))):
        self.todo(self.serialize(node.tag, node.attrib, child_trans.get_todo()), child_trans.needs_trans)
    else:
        for attr in TRANSLATED_ATTRS:
            if node.get(attr):
                node.set(attr, self.process_attr(node.get(attr)))
        self.done(self.serialize(node.tag, node.attrib, child_trans.get_done()))
    self.todo(escape((node.tail or '')))
