You are here

function unixref_startElement in Bibliography Module 6

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

File

./crossref_unixref_parser.inc, line 2

Code

function unixref_startElement($parser, $name, $attrs) {
  global $node, $element, $attribute, $auth_category, $contrib_count, $org_count;
  switch ($name) {
    case 'doi_record':
      $node = array();
      $element = $name;
      break;
    case 'book':
    case 'journal':
    case 'standard':
    case 'conference':
    case 'report-paper':
    case 'dissertation':
    case 'database':
    case 'sa_component':
      $node['biblio_type'] = _unixref_type_map($name);
      $element = $name;
      break;
    case 'journal_article':
    case 'conference_paper':
    case 'content_item':
    case 'report-paper_metadata':
    case 'standard_metadata':
    case 'database_date':
    case 'component':
      $node['year'] = '';
      $node['doi'] = '';
      $element = $name;
      break;
    case 'person_name':
      $auth_category = _unixref_get_contributor_category($attrs['contributor_role']);
      if (!isset($contrib_count)) {
        $contrib_count = 0;
      }
      $element = $name;
      break;
    case 'organization':
      if (!isset($org_count)) {
        $org_count = 0;
      }
      $element = $name;
      break;
    case 'issn':
      if ($attrs['media_type'] == 'print') {
        $attribute = 'issn_print';
      }
      $element = $name;
      break;
    case 'isbn':
      if ($attrs['media_type'] == 'print') {
        $attribute = 'isbn_print';
      }
      $element = $name;
      break;
    case 'i':

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