You are here

function EndNoteXMLParser::endnote8_characterData in Bibliography Module 7.2

Same name and namespace in other branches
  1. 6.2 modules/endnote/endnote_xml_parser.inc \EndNoteXMLParser::endnote8_characterData()
  2. 7 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 249

Class

EndNoteXMLParser

Code

function endnote8_characterData($parser, $data) {

  //    global $this->node, $this->element, $this->contributors_type, $this->contrib_count, $this->dates, $this->urls, $this->keyword_count;
  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':
            $this->node->biblio_year .= $data;
            break;
        }
        break;
      case 'date':
        switch ($this->dates) {
          case 'pub-dates':
            $this->node->biblio_date .= $data;
            break;
          case 'copyright-dates':
            break;
        }
        break;
      case 'urls':
      case 'url':
        switch ($this->urls) {
          case 'web-urls':
            $this->node->biblio_url .= $data;
            break;
          case 'pdf-urls':
          case 'text-urls':
          case 'image-urls':
            break;
          case 'related-urls':
        }
        break;
      case 'title':
        $this->node->title .= $data;
        break;
      default:
        if ($field = $this
          ->field_map(trim($this->element))) {
          $this->node->{$field} .= $data;
        }
        else {
          if (!in_array($this->element, $this->unmapped)) {
            $this->unmapped[] = $this->element;
          }
        }
    }
  }
}