code: def map_tag_to_subfield(tag_type, line, cur_misc_txt, dest):
      
      closing_tag = '</cds.%s>' % tag_type
      # extract the institutional report-number from the line:
      idx_closing_tag = line.find(closing_tag)
      # Sanity check - did we find a closing tag?
      if idx_closing_tag == -1:
          # no closing </cds.TAG> tag found - strip the opening tag and move past this
          # recognised reportnumber as it is unreliable:
          identified_citation_element = None
          line = line[len('<cds.%s>' % tag_type):]
      else:
          tag_content = line[:idx_closing_tag]
          identified_citation_element = {'type': tag_type,
                                         'misc_txt': cur_misc_txt,
                                         dest: tag_content}
          ending_tag_pos = idx_closing_tag + len(closing_tag)
          line = line[ending_tag_pos:]
          cur_misc_txt = u""
  
      return identified_citation_element, line, cur_misc_txt
docs: Create a new reference element