def match_reference(source, target, attribute)
      srcs = source.send(attribute).to_enum
      tgts = target.send(attribute).to_enum
      
      # the match targets
      mtchd_tgts = Set.new
      # capture the matched targets and the the unmatched sources
      unmtchd_srcs = srcs.reject do |src|
        # the prior match, if any
        tgt = match_for(src)
        mtchd_tgts << tgt if tgt
      end
      
      # the unmatched targets
      unmtchd_tgts = tgts.difference(mtchd_tgts)
      logger.debug { "#{qp} matching #{unmtchd_tgts.qp}..." } if @verbose and not unmtchd_tgts.empty?
      # match the residual targets and sources
      rsd_mtchs = @matcher.match(unmtchd_srcs, unmtchd_tgts, source, attribute)
      # add residual matches
      rsd_mtchs.each { |src, tgt| add_match(src, tgt) }
      logger.debug { "#{qp} matched #{rsd_mtchs.qp}..." } if @verbose and not rsd_mtchs.empty?
      # The source => target match hash.
      # If there is a copier, then copy each unmatched source.
      matches = srcs.to_compact_hash { |src| match_for(src) or copy_unmatched(src) }
      
      matches
    end
def match_reference(source, target, attribute)
      srcs = source.send(attribute).to_enum
      tgts = target.send(attribute).to_enum
      
      # the match targets
      mtchd_tgts = Set.new
      # capture the matched targets and the the unmatched sources
      unmtchd_srcs = srcs.reject do |src|
        # the prior match, if any
        tgt = match_for(src)
        mtchd_tgts << tgt if tgt
      end
      
      # the unmatched targets
      unmtchd_tgts = tgts.difference(mtchd_tgts)
      logger.debug { "#{qp} matching #{unmtchd_tgts.qp}..." } if @verbose and not unmtchd_tgts.empty?
      # match the residual targets and sources
      rsd_mtchs = @matcher.match(unmtchd_srcs, unmtchd_tgts, source, attribute)
      # add residual matches
      rsd_mtchs.each { |src, tgt| add_match(src, tgt) }
      logger.debug { "#{qp} matched #{rsd_mtchs.qp}..." } if @verbose and not rsd_mtchs.empty?
      # The source => target match hash.
      # If there is a copier, then copy each unmatched source.
      matches = srcs.to_compact_hash { |src| match_for(src) or copy_unmatched(src) }
      
      matches
    end
Matches the given source and target attribute references.
 The match is performed by this visitor's matcher.

 @param source (see #visit)
 @param target (see #visit)
 @param [Symbol] attribute the parent reference attribute
 @return [{Resource => Resource}] the referenced source => target matches