You are here

function en8_add_keywords in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/endnote/endnote8_export.inc \en8_add_keywords()
  2. 6 endnote8_export.inc \en8_add_keywords()
  3. 7.2 modules/endnote/endnote8_export.inc \en8_add_keywords()
1 call to en8_add_keywords()
_endnote8_XML_export in modules/endnote/endnote8_export.inc

File

modules/endnote/endnote8_export.inc, line 137

Code

function en8_add_keywords(&$node) {
  $kw_array = array();
  $xml = '';
  if (!empty($node->biblio_keywords)) {
    foreach ($node->biblio_keywords as $term) {
      $kw_array[] = trim($term);
    }
  }
  if (!empty($kw_array)) {
    $kw_array = array_unique($kw_array);
    $xml .= '<keywords>';
    foreach ($kw_array as $word) {
      $xml .= '<keyword><style  face="normal" font="default" size="100%">' . htmlspecialchars(trim($word)) . "</style></keyword>";
    }
    $xml .= "</keywords>";
  }
  unset($node->biblio_keywords);
  return $xml;
}