def check_duplicate(tag, elemental)
      if @current_parent[tag]
        gp = @current_parent.parent ? "#{@current_parent.parent.representation} => " : ''
        p = @current_parent.representation
        logger.warn("Duplicate #{elemental} (#{tag}) detected at level: #{gp}#{p}")
      end
    end
def check_duplicate(tag, elemental)
      if @current_parent[tag]
        gp = @current_parent.parent ? "#{@current_parent.parent.representation} => " : ''
        p = @current_parent.representation
        logger.warn("Duplicate #{elemental} (#{tag}) detected at level: #{gp}#{p}")
      end
    end
Checks whether the given tag is a duplicate of an existing tag with this parent.

 @param [String] tag the tag of the candidate duplicate elemental
 @param [String] elemental the duplicate elemental type (e.g. Sequence, Element)