You are here

function en8_add_titles in Bibliography Module 7.2

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

File

modules/endnote/endnote8_export.inc, line 55

Code

function en8_add_titles(&$node) {
  $xml = '<titles>';
  $xml .= !empty($node->title) ? '<title><style face="normal" font="default" size="100%">' . htmlspecialchars($node->title) . "</style></title>" : '';
  $xml .= !empty($node->biblio_secondary_title) ? '<secondary-title><style face="normal" font="default" size="100%">' . htmlspecialchars($node->biblio_secondary_title) . "</style></secondary-title>" : '';
  $xml .= !empty($node->biblio_tertiary_title) ? '<tertiary-title><style face="normal" font="default" size="100%">' . htmlspecialchars($node->biblio_tertiary_title) . "</style></tertiary-title>" : '';
  $xml .= !empty($node->biblio_alternate_title) ? '<alt-title><style face="normal" font="default" size="100%">' . htmlspecialchars($node->biblio_alternate_title) . "</style></alt-title>" : '';
  $xml .= !empty($node->biblio_short_title) ? '<short-title><style face="normal" font="default" size="100%">' . htmlspecialchars($node->biblio_short_title) . "</style></short-title>" : '';
  $xml .= !empty($node->biblio_translated_title) ? '<translated-title><style face="normal" font="default" size="100%">' . htmlspecialchars($node->biblio_translated_title) . "</style></translated-title>" : '';
  $xml .= '</titles>';
  unset($node->title);
  unset($node->biblio_secondary_title);
  unset($node->biblio_tertiary_title);
  unset($node->biblio_alternate_title);
  unset($node->biblio_short_title);
  unset($node->biblio_translated_title);
  return $xml;
}