def start_svg(self):
SVG_NAMESPACE = '<STR_LIT>'<EOL>SVG = '<STR_LIT>' % SVG_NAMESPACE<EOL>NSMAP = {<EOL>None: SVG_NAMESPACE,<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>}<EOL>root_attrs = self._get_root_attributes()<EOL>self.root = etree.Element(SVG + "<STR_LIT>", attrib=root_attrs, nsmap=NSMAP)<EOL>if hasattr(self, '<STR_LIT>'):<EOL><INDENT>pi = etree.ProcessingInstruction(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>' % self.style_sheet_href<EOL>)<EOL>self.root.addprevious(pi)<EOL><DEDENT>comment_strings = (<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT:U+0020>' + '<STR_LIT:/>' * <NUM_LIT>,<EOL>)<EOL>list(map(self.root.append, map(etree.Comment, comment_strings)))<EOL>defs = etree.SubElement(self.root, '<STR_LIT>')<EOL>self.add_defs(defs)<EOL>if not hasattr(self, '<STR_LIT>') and not self.css_inline:<EOL><INDENT>self.root.append(etree.Comment(<EOL>'<STR_LIT>'))<EOL>style = etree.SubElement(defs, '<STR_LIT>', type='<STR_LIT>')<EOL>style.text = self.get_stylesheet().cssText<EOL><DEDENT>self.root.append(etree.Comment('<STR_LIT>'))<EOL>etree.SubElement(self.root, '<STR_LIT>', {<EOL>'<STR_LIT:width>': str(self.width),<EOL>'<STR_LIT>': str(self.height),<EOL>'<STR_LIT:x>': '<STR_LIT:0>',<EOL>'<STR_LIT:y>': '<STR_LIT:0>',<EOL>'<STR_LIT:class>': '<STR_LIT>'})<EOL>
Base SVG Document Creation