public function BiblioStyleEndNoteXML8::characterData in Bibliography Module 7.3
@todo: Import keywords.
2 calls to BiblioStyleEndNoteXML8::characterData()
- BiblioStyleEndNoteXML8::endElement in plugins/
biblio_style/ endnote/ BiblioStyleEndNoteXML8.php - BiblioStyleEndNoteXML8::startElement in plugins/
biblio_style/ endnote/ BiblioStyleEndNoteXML8.php
File
- plugins/
biblio_style/ endnote/ BiblioStyleEndNoteXML8.php, line 140 - EndNote XML8 biblio style.
Class
- BiblioStyleEndNoteXML8
- @file EndNote XML8 biblio style.
Code
public function characterData($parser, $data) {
$map = $this
->getMapping();
$element = $this->element;
if (!empty($map['field'][$element]['import_method'])) {
// Prepare the data by striping any tags or white space.
$data = explode("\n", $data);
foreach ($data as $key => $value) {
$data[$key] = trim(htmlspecialchars_decode($value));
}
$data = implode('', $data);
if (!$data) {
// No data given, it might have been a carriage return that was striped.
return;
}
$method = $map['field'][$element]['import_method'];
// Key might be a Biblio field, or the role of a contributor.
$key = $element == 'author' ? $this->role : $map['field'][$element]['property'];
$this
->{$method}($this->wrapper, $key, $data);
}
}