You are here

public function EndNoteXMLParser::endnote8_startElement in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/endnote/endnote_xml_parser.inc \EndNoteXMLParser::endnote8_startElement()
  2. 7.2 modules/endnote/endnote_xml_parser.inc \EndNoteXMLParser::endnote8_startElement()

File

modules/endnote/endnote_xml_parser.inc, line 93
endnote_xml_parser.inc

Class

EndNoteXMLParser

Code

public 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_type = $name;
      $this->contributors = array();
      $this->contrib_count = 0;
      break;
    case 'author':
      $this->contributors[$this->contrib_count]['name'] = '';
      $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;
  }
}