You are here

function unixref_endElement in Bibliography Module 6

1 string reference to 'unixref_endElement'
biblio_crossref_xml_import in ./biblio.import.export.inc

File

./crossref_unixref_parser.inc, line 63

Code

function unixref_endElement($parser, $name) {
  global $node, $nids, $element, $attribute, $terms, $batch_proc, $session_id, $save_node, $auth_category, $contrib_count, $org_count;
  switch ($name) {
    case 'doi_record':
      array_walk_recursive($node, 'unixref_decode');
      $nid = biblio_save_node($node, $batch, $session_id, $save_node);
      if (isset($nid)) {
        $nids[] = $nid;
      }
      break;
    case 'person_name':
      $node['biblio_contributors'][$auth_category][$contrib_count]['auth_type'] = _biblio_get_auth_type($auth_category, $node['biblio_type']);
      $node['biblio_contributors'][$auth_category][$contrib_count]['name'] = $node['biblio_contributors'][$auth_category][$contrib_count]['lastname'];
      if (isset($node['biblio_contributors'][$auth_category][$contrib_count]['firstname'])) {
        $node['biblio_contributors'][$auth_category][$contrib_count]['name'] .= ', ' . $node['biblio_contributors'][$auth_category][$contrib_count]['firstname'];
      }
      $auth_category = '';
      $contrib_count++;
      break;
    case 'organization':
      $node['biblio_contributors'][5][$org_count]['auth_type'] = _biblio_get_auth_type(5, $node['biblio_type']);
      $org_count++;
      break;
    case 'pages':
      if (isset($node['biblio_first_page'])) {
        $node['biblio_pages'] = $node['biblio_first_page'];
      }
      if (isset($node['biblio_last_page'])) {
        $node['biblio_pages'] .= ' - ' . $node['biblio_last_page'];
      }
      break;
    case 'publication_date':
      break;
    case 'journal_issue':
      $node['biblio_date'] = (!empty($node['month']) ? $node['month'] . '/' : '') . $node['year'];
      break;
    case 'journal_article':
    case 'conference_paper':
    case 'content_item':
    case 'report-paper_metadata':
    case 'standard_metadata':
    case 'database_date':
    case 'component':
      $node['biblio_year'] = $node['year'];
      $node['biblio_doi'] = $node['doi'];
      break;
    case 'issn':
      if ($attribute == 'issn_print') {
        $node['biblio_issn'] = $node['issn'];
      }
      $node['issn'] = '';
      break;
    case 'isbn':
      if ($attribute == 'isbn_print') {
        $node['biblio_isbn'] = $node['isbn'];
      }
      $node['isbn'] = '';
      break;
    case 'i':

    // HTML font style tags
    case 'b':
    case 'u':
    case 'sub':
    case 'sup':
      unixref_characterData(NULL, '</' . $name . '> ');
      break;
    default:
  }
}