class Nokogiri::XML::DTD

def each &block

def each &block
  attributes.each { |key, value|
    block.call([key, value])
  }
end

def html5_dtd?

def html5_dtd?
  html_dtd? &&
    external_id.nil? &&
    (system_id.nil? || system_id == 'about:legacy-compat')
end

def html_dtd?

def html_dtd?
  name.casecmp('html').zero?
end

def keys

def keys
  attributes.keys
end