     doc = domImplementation.createDocument SVGNS, 'svg'
     svg = doc.documentElement
     svg.setAttribute 'xmlns:xlink', XLINKNS unless Drawing.useHref
-    href = if Drawing.useHref then 'href' else 'xlink:href'
     svg.setAttribute 'version', '1.1'
     #svg.appendChild defs = doc.createElementNS SVGNS, 'defs'
     ## <style> tags for CSS


class Drawing extends Input
  @inlineImages: not window?
  load: (data) ->
    ## Turn strings into arrays
    data = for row in data

              when '.png', '.jpg', '.jpeg', '.gif'
                dirname: dirname
                svg: """
                  <image #{Drawing.hrefAttr()}="#{encodeURI data}"/>
                """
              when '.svg'
                dirname: path.dirname filename
