You are here

function unixref_characterData in Bibliography Module 6

2 calls to unixref_characterData()
unixref_endElement in ./crossref_unixref_parser.inc
unixref_startElement in ./crossref_unixref_parser.inc
1 string reference to 'unixref_characterData'
biblio_crossref_xml_import in ./biblio.import.export.inc

File

./crossref_unixref_parser.inc, line 128

Code

function unixref_characterData($parser, $data) {
  global $node, $element, $auth_category, $contrib_count, $org_count;
  $data = htmlspecialchars_decode($data);
  if (trim($data)) {
    switch ($element) {
      case 'surname':
        $node['biblio_contributors'][$auth_category][$contrib_count]['lastname'] .= $data;
        break;
      case 'given_name':
        $node['biblio_contributors'][$auth_category][$contrib_count]['firstname'] .= $data;
        break;
      case 'suffix':
        $node['biblio_contributors'][$auth_category][$contrib_count]['suffix'] .= $data;
        break;
      case 'affiliation':
        $node['biblio_contributors'][$auth_category][$contrib_count]['affiliation'] .= $data;
        break;
      case 'organization':
        $node['biblio_contributors'][5][$org_count]['name'] .= $data;
        break;
      case 'year':
        $node['year'] = $data;
        break;
      case 'month':
        $node['month'] = $data;
        break;
      case 'day':
        $node['day'] = $data;
        break;
      default:
        if ($field = _unixref_field_map(trim($element))) {
          $node[$field] .= $data;
        }
    }
  }
}