     DynamicSymbol.resetAll()
     doc = domImplementation.createDocument SVGNS, 'svg'
     svg = doc.documentElement
-    svg.setAttribute 'xmlns:xlink', XLINKNS unless Drawing.useHref
+    svg.setAttribute 'xmlns:xlink', XLINKNS unless @getSetting 'useHref'
     svg.setAttribute 'version', '1.1'
     #svg.appendChild defs = doc.createElementNS SVGNS, 'defs'
     ## <style> tags for CSS

  '.css': CSSStyle
  '.styl': StylusStyle

renderDOMDefaults =
  filename: 'drawing.asc'
  keepParent: false
  keepClass: false

renderDOM = (mappings, elts, options) ->
  mappings = Mappings.from mappings
  if typeof elts == 'string'
    elts = document.querySelectorAll elts
  else if elts instanceof HTMLElement
    elts = [elts]
  option = (key) ->
    elt.dataset[key] ? options?[key] ? renderDOMDefaults[key]
  boolOption = (key) ->
    switch value = option key
      #when 'true', 'on', 'yes'
      #  true
      when 'false', 'off', 'no'#, ''
        false
      else
        Boolean value
  oldUseHref = Drawing.useHref
  Drawing.useHref = true
  try
    for elt from elts
      elt.style.whiteSpace = 'pre'
      filename = option 'filename'
      drawing = Input.recognize filename, elt.innerText
      if drawing instanceof Drawing
        dom = drawing.renderSVGDOM(mappings).documentElement
        if boolOption 'keepParent'
          elt.innerHTML = ''
          elt.appendChild dom
        else
          elt.replaceWith dom
          if boolOption 'keepClass'
            dom.setAttribute 'class', elt.className
      else
        console.warn "Parsed element with filename '#{filename}' into #{drawing.constructor.name} instead of Drawing:", elt

      when '-h', '--help'
        help()
      when '-m', '--margin'
        settings.keepMargins = true
      when '--hidden'
        settings.keepHidden = true
      when '--tw', '--tile-width'
        skip = 1
        arg = parseFloat args[i+1]
        if arg
          settings.forceWidth = arg
        else
          console.warn "Invalid argument to --tile-width: #{args[i+1]}"
      when '--th', '--tile-height'
        skip = 1
        arg = parseFloat args[i+1]
        if arg
          settings.forceHeight = arg
        else
          console.warn "Invalid argument to --tile-height: #{args[i+1]}"
      when '-p', '--pdf'
