# File proofreader.rb, line 271
    def collection?
      if @xml_document
        validity = true
        missing = {}
        @proof.collections.each do |collection, locator_array|
          missing[collection] = locator_array.dup
          locator_array.each do |locator|
            namespace = locator[0]
            xpath = locator[1]
            REXML::XPath.each(@xml_document, xpath) do |element_or_attribute|
              missing[collection].delete([namespace, xpath]) if element_or_attribute.inherited_namespace == namespace
            end
          end
        end
        missing.each do |collection, locator_array|
          if not locator_array.empty?
            validity = false
            error = "COLLECTION #{collection}"
            @errors << [locator_array[0][0], locator_array[0][1], error]
          end
        end
        return validity
      else
        raise "no XML document provided to validate collections against"
      end
    end