def render(self, name, value, attrs=None, choices=()):
    svg = minidom.parse(self.svg)
    if (value is None):
        value = []
    final_attrs = self.build_attrs(attrs, name=name)
    output = [format_html('<select multiple="multiple"{}>', flatatt(final_attrs))]
    options = self.render_options(choices, value)
    if options:
        output.append(options)
    output.append('</select>')
    output.append(("<div id='%s-svg'>" % final_attrs['id']))
    output.append(svg.toxml())
    output.append('</div>')
    output.append(("<script language='javascript'>document.getElementById('%s').convertToSvg('%s-svg');</script>" % (final_attrs['id'], final_attrs['id'])))
    return mark_safe('\n'.join(output))
def render(self, name, value, attrs=None, choices=()):
    svg = minidom.parse(self.svg)
    if (value is None):
        value = []
    final_attrs = self.build_attrs(attrs, name=name)
    output = [format_html('<select multiple="multiple"{}>', flatatt(final_attrs))]
    options = self.render_options(choices, value)
    if options:
        output.append(options)
    output.append('</select>')
    output.append(("<div id='%s-svg'>" % final_attrs['id']))
    output.append(svg.toxml())
    output.append('</div>')
    output.append(("<script language='javascript'>document.getElementById('%s').convertToSvg('%s-svg');</script>" % (final_attrs['id'], final_attrs['id'])))
    return mark_safe('\n'.join(output))