def __init__(self, node, write, **kw):
self.write = write<EOL>self.subset = kw.get('<STR_LIT>')<EOL>self.comments = kw.get('<STR_LIT>', <NUM_LIT:0>)<EOL>self.unsuppressedPrefixes = kw.get('<STR_LIT>')<EOL>nsdict = kw.get('<STR_LIT>', { '<STR_LIT>': XMLNS.XML, '<STR_LIT>': XMLNS.BASE })<EOL>self.state = (nsdict, {'<STR_LIT>':'<STR_LIT>'}, {}, {}) <EOL>if node.nodeType == Node.DOCUMENT_NODE:<EOL><INDENT>self._do_document(node)<EOL><DEDENT>elif node.nodeType == Node.ELEMENT_NODE:<EOL><INDENT>self.documentOrder = _Element        <EOL>if not _inclusive(self):<EOL><INDENT>inherited,unused = _inclusiveNamespacePrefixes(node, self._inherit_context(node), <EOL>self.unsuppressedPrefixes)<EOL>self._do_element(node, inherited, unused=unused)<EOL><DEDENT>else:<EOL><INDENT>inherited = self._inherit_context(node)<EOL>self._do_element(node, inherited)<EOL><DEDENT><DEDENT>elif node.nodeType == Node.DOCUMENT_TYPE_NODE:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>raise TypeError(str(node))<EOL><DEDENT>
Create and run the implementation.