function EndNoteXMLParser::endnote8_startElement in Bibliography Module 6.2
Same name and namespace in other branches
- 7 modules/endnote/endnote_xml_parser.inc \EndNoteXMLParser::endnote8_startElement()
- 7.2 modules/endnote/endnote_xml_parser.inc \EndNoteXMLParser::endnote8_startElement()
File
- modules/
endnote/ endnote_xml_parser.inc, line 81
Class
Code
function endnote8_startElement($parser, $name, $attrs) {
switch ($name) {
case 'record':
$this->node = new stdClass();
$this->node->biblio_contributors = array();
break;
case 'style':
$this->font_attr = explode(' ', $attrs['face']);
foreach ($this->font_attr as $fatt) {
switch ($fatt) {
case 'normal':
break;
case 'bold':
$this
->endnote8_characterData(NULL, '<b>');
break;
case 'italic':
$this
->endnote8_characterData(NULL, '<i>');
break;
case 'underline':
$this
->endnote8_characterData(NULL, '<u>');
break;
case 'superscript':
$this
->endnote8_characterData(NULL, '<sup>');
break;
case 'subscript':
$this
->endnote8_characterData(NULL, '<sub>');
break;
}
}
break;
case 'keywords':
$this->keyword_count = 0;
break;
case 'authors':
case 'secondary-authors':
case 'tertiary-authors':
case 'subsidiary-authors':
case 'translated-authors':
$this->contributors = $name;
if (!isset($this->contrib_count)) {
$this->contrib_count = 0;
}
break;
case 'author':
switch ($this->contributors) {
case 'authors':
if (!isset($this->node->biblio_contributors[1][$this->contrib_count]['name'])) {
$this->node->biblio_contributors[1][$this->contrib_count]['name'] = '';
}
break;
case 'secondary-authors':
$this->node->biblio_contributors[2][$this->contrib_count]['name'] = '';
break;
case 'tertiary-authors':
$this->node->biblio_contributors[3][$this->contrib_count]['name'] = '';
break;
case 'subsidiary-authors':
$this->node->biblio_contributors[4][$this->contrib_count]['name'] = '';
break;
case 'translated-authors':
$this->node->biblio_contributors[5][$this->contrib_count]['name'] = '';
break;
}
$this->element = $name;
break;
case 'year':
case 'pub-dates':
case 'copyright-dates':
$this->dates = $name;
break;
case 'web-urls':
case 'pdf-urls':
case 'text-urls':
case 'related-urls':
case 'image-urls':
$this->urls = $name;
break;
case 'keyword':
$this->node->biblio_keywords[$this->keyword_count] = '';
$this->element = $name;
break;
default:
$this->element = $name;
}
}