You are here

function EndNoteXMLParser::endnote7_startElement in Bibliography Module 7.2

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

File

modules/endnote/endnote_xml_parser.inc, line 305

Class

EndNoteXMLParser

Code

function endnote7_startElement($parser, $name, $attrs) {
  switch ($name) {
    case 'RECORD':
      $this->node = new stdClass();
      $this->node->biblio_contributors = array();
      $this->node->biblio_type = 102;

      // we set 102 here because the xml parser won't
      // process a value of 0 (ZERO) which is the
      // ref-type 102. if there is a non-zero value it will be overwritten
      $this->element = '';
      break;
    case 'AUTHORS':
    case 'SECONDARY_AUTHORS':
    case 'TERTIARY_AUTHORS':
    case 'SUBSIDIARY_AUTHORS':
      $this->contrib_count = 0;
      $this->contributors = array();
      break;
    case 'AUTHOR':
    case 'SECONDARY_AUTHOR':
    case 'TERTIARY_AUTHOR':
    case 'SUBSIDIARY_AUTHOR':
      $this->contributors[$this->contrib_count]['name'] = '';
      $this->element = $name;
      break;
    case 'KEYWORDS':
      $this->keyword_count = 0;
      break;
    case 'KEYWORD':
      $this->node->biblio_keywords[$this->keyword_count] = '';
      $this->element = $name;
      break;
    default:
      $this->element = $name;
  }
}