def __prepare_namespaces(self):
        """create proper namespaces for our document
        """
        # create needed namespaces
        self.namespaces = dict(
            text="urn:text",
            draw="urn:draw",
            table="urn:table",
            office="urn:office",
            xlink="urn:xlink",
            svg="urn:svg",
            manifest="urn:manifest",
        )

        # copy namespaces from original docs
        for tree_root in self.tree_roots:
            self.namespaces.update(tree_root.nsmap)

        # remove any "root" namespace as lxml.xpath do not support them
        self.namespaces.pop(None, None)

        # declare the genshi namespace
        self.namespaces['py'] = GENSHI_URI
        # declare our own namespace
        self.namespaces['py3o'] = PY3O_URI
def __prepare_namespaces ( self ) : self . namespaces = dict ( text = "urn:text" , draw = "urn:draw" , table = "urn:table" , office = "urn:office" , xlink = "urn:xlink" , svg = "urn:svg" , manifest = "urn:manifest" , ) for tree_root in self . tree_roots : self . namespaces . update ( tree_root . nsmap ) self . namespaces . pop ( None , None ) self . namespaces [ 'py' ] = GENSHI_URI self . namespaces [ 'py3o' ] = PY3O_URI
create proper namespaces for our document