module Xhtml
  class Tag < Element
    def self.element_rules *args
      [self]
    end
  end
end

require 'rules/undefined'
module Rules
  class MissingXhtmlDiv < Undefined_element
    def end_element *args
      log :MissingXhtmlDiv
    end
  end
end

module Atom

  class XhtmlConstruct < Element
    def self.element_rules uri, localname, qname, attributes
      if localname == 'div' and Xmlns[uri] == :xhtml
        [Xhtml::Tag]
      else
        [Rules::MissingXhtmlDiv]
      end
    end
  end

  class Content < Element
    element :div
  end

end
