public function EndNoteXMLParser::endnote8_characterData in Bibliography Module 7
Same name and namespace in other branches
- 6.2 modules/endnote/endnote_xml_parser.inc \EndNoteXMLParser::endnote8_characterData()
- 7.2 modules/endnote/endnote_xml_parser.inc \EndNoteXMLParser::endnote8_characterData()
2 calls to EndNoteXMLParser::endnote8_characterData()
- EndNoteXMLParser::endnote8_endElement in modules/
endnote/ endnote_xml_parser.inc - EndNoteXMLParser::endnote8_startElement in modules/
endnote/ endnote_xml_parser.inc
File
- modules/
endnote/ endnote_xml_parser.inc, line 296 - endnote_xml_parser.inc
Class
Code
public function endnote8_characterData($parser, $data) {
// First replace any carriage returns with html line breaks.
$data = str_ireplace("\r", "<br/>", $data);
if (trim(htmlspecialchars_decode($data))) {
switch ($this->element) {
// Author information.
case 'author':
$this->contributors[$this->contrib_count]['name'] .= $data;
break;
case 'keyword':
$this->node->biblio_keywords[$this->keyword_count] .= $data;
break;
case 'dates':
switch ($this->dates) {
case 'year':
if (!isset($this->node->biblio_year)) {
$this->node->biblio_year = '';
}
$this->node->biblio_year .= $data;
break;
}
break;
case 'date':
switch ($this->dates) {
case 'pub-dates':
if (!isset($this->node->biblio_date)) {
$this->node->biblio_date = '';
}
$this->node->biblio_date .= $data;
break;
case 'copyright-dates':
break;
}
break;
case 'urls':
case 'url':
switch ($this->urls) {
case 'web-urls':
if (!isset($this->node->biblio_url)) {
$this->node->biblio_url = '';
}
$this->node->biblio_url .= $data;
break;
case 'pdf-urls':
case 'text-urls':
case 'image-urls':
break;
case 'related-urls':
}
break;
case 'title':
if (!isset($this->node->title)) {
$this->node->title = '';
}
$this->node->title .= $data;
break;
default:
if ($field = $this
->field_map(trim($this->element))) {
if (!isset($this->node->{$field})) {
$this->node->{$field} = '';
}
$this->node->{$field} .= $data;
}
else {
if (!in_array($this->element, $this->unmapped)) {
$this->unmapped[] = $this->element;
}
}
}
}
}