def _inherit_context(self, node):
<EOL>xmlattrs = list(filter(_IN_XML_NS, _attrs(node)))<EOL>inherited, parent = [], node.parentNode<EOL>while parent and parent.nodeType == Node.ELEMENT_NODE:<EOL><INDENT>for a in filter(_IN_XML_NS, _attrs(parent)):<EOL><INDENT>n = a.localName<EOL>if n not in xmlattrs:<EOL><INDENT>xmlattrs.append(n)<EOL>inherited.append(a)<EOL><DEDENT><DEDENT>parent = parent.parentNode<EOL><DEDENT>return inherited<EOL>
_inherit_context(self, node) -> list
        Scan ancestors of attribute and namespace context.  Used only
        for single element node canonicalization, not for subset
        canonicalization.