def matches?(fragment)

      if fragment.respond_to? :source
        fragment = fragment.source.to_s
      elsif fragment.respond_to? :body
        fragment = fragment.body.to_s
      end

      fragment = apply_modifiers_to_fragment(fragment)

      if fragment.empty?
        @message = "Response was blank (maybe a missing integrate_views)"
        return false
      end

      query_params = { :fragment => fragment }
      if @fragment
        query_params[:prefill] = '1'
        query_params[:prefill_doctype] = 'xhtml10'
      end

      return validate(query_params)
    end
def matches?(fragment)

      if fragment.respond_to? :source
        fragment = fragment.source.to_s
      elsif fragment.respond_to? :body
        fragment = fragment.body.to_s
      end

      fragment = apply_modifiers_to_fragment(fragment)

      if fragment.empty?
        @message = "Response was blank (maybe a missing integrate_views)"
        return false
      end

      query_params = { :fragment => fragment }
      if @fragment
        query_params[:prefill] = '1'
        query_params[:prefill_doctype] = 'xhtml10'
      end

      return validate(query_params)
    end
Assert that markup (html/xhtml) is valid according the W3C validator web service.