You are here

public function BiblioCrossRefClient::unixref_startElement in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/crossref/biblio.crossref.client.php \BiblioCrossRefClient::unixref_startElement()
  2. 7.2 modules/crossref/biblio.crossref.client.php \BiblioCrossRefClient::unixref_startElement()

File

modules/crossref/biblio.crossref.client.php, line 141

Class

BiblioCrossRefClient

Code

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

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