public function BiblioCrossRefClient::unixref_characterData in Bibliography Module 7
Same name and namespace in other branches
- 6.2 modules/crossref/biblio.crossref.client.php \BiblioCrossRefClient::unixref_characterData()
- 7.2 modules/crossref/biblio.crossref.client.php \BiblioCrossRefClient::unixref_characterData()
2 calls to BiblioCrossRefClient::unixref_characterData()
- BiblioCrossRefClient::unixref_endElement in modules/
crossref/ biblio.crossref.client.php - BiblioCrossRefClient::unixref_startElement in modules/
crossref/ biblio.crossref.client.php
File
- modules/
crossref/ biblio.crossref.client.php, line 337
Class
Code
public function unixref_characterData($parser, $data) {
$data = htmlspecialchars_decode($data);
if (trim($data) && !$this->citation_list) {
switch ($this->element) {
case 'surname':
$this
->_set_contrib_data('lastname', $data);
break;
case 'given_name':
$this
->_set_contrib_data('firstname', $data);
break;
case 'suffix':
$this
->_set_contrib_data('suffix', $data);
break;
case 'affiliation':
$this
->_set_contrib_data('affiliation', $data);
break;
case 'organization':
$this
->_set_contrib_data('name', $data);
break;
case 'year':
case 'month':
case 'day':
$this->node[$this->element] = $data;
break;
case 'issn':
case 'isbn':
if ($this->attribute == 'print') {
if ($field = $this
->_unixref_field_map(trim($this->element))) {
$this
->_set_data($field, $data);
}
}
break;
case 'doi':
if ($this->doi_data) {
if ($field = $this
->_unixref_field_map(trim($this->element))) {
$this
->_set_data($field, $data);
}
}
break;
case 'resource':
if ($this->doi_data) {
$this
->_set_data('biblio_url', $data);
}
break;
default:
if ($field = $this
->_unixref_field_map(trim($this->element))) {
$this
->_set_data($field, $data);
}
}
}
}