def _extract_pub(l, _root):
    """
    Extract publication data from one or more publication entries.
    :param list l: Publication
    :return dict _root: Root data
    """
    logger_ts.info("enter _extract_pub")
    # For each publication entry
    for idx, pub in enumerate(l):
        logger_ts.info("processing publication #: {}".format(idx))
        # Get author data first, since that's the most ambiguously structured data.
        _root = _extract_authors(pub, idx, _root)
        # Go through data of this publication
        for k, v in pub.items():
            # Case 1: DOI ID. Don't need the rest of 'identifier' dict
            if k == 'identifier':
                try:
                    _root['pub' + str(idx + 1) + '_DOI'] = v[0]['id']
                except KeyError as e:
                    logger_ts.warn("_extract_pub: KeyError: no doi id: {}, {}".format(v, e))
            # Case 2: All other string entries
            else:
                if k != 'authors' and k != 'author':
                    _root['pub' + str(idx + 1) + '_' + k] = v
    return _root