Browse Source

added isbn to doi parsing also we should now get the correct author for book chapters when parsing dois

9.x-1.0
Paul Pound 8 years ago
parent
commit
8155f7009c
  1. 3
      includes/doi.inc

3
includes/doi.inc

@ -95,11 +95,12 @@ function upei_roblib_ill_populate_form_doi($crossref_xml, $form) {
upei_roblib_ill_get_xml_node($crossref_xml, 'last_page'); upei_roblib_ill_get_xml_node($crossref_xml, 'last_page');
$form['Volume']['#value'] = upei_roblib_ill_get_xml_node($crossref_xml, 'volume'); $form['Volume']['#value'] = upei_roblib_ill_get_xml_node($crossref_xml, 'volume');
$form['Issue']['#value'] = upei_roblib_ill_get_xml_node($crossref_xml, 'issue'); $form['Issue']['#value'] = upei_roblib_ill_get_xml_node($crossref_xml, 'issue');
$form['ISBN']['#value'] = upei_roblib_ill_get_xml_node($crossref_xml, 'isbn');
foreach ($crossref_xml->getElementsbyTagName('person_name') as $person) { foreach ($crossref_xml->getElementsbyTagName('person_name') as $person) {
if ($person->getAttribute('contributor_role') == 'author' && if ($person->getAttribute('contributor_role') == 'author' &&
$person->getAttribute('sequence') == 'first' $person->getAttribute('sequence') == 'first'
) { ) {
$author = upei_roblib_ill_get_xml_node($crossref_xml, 'surname') . ',' . upei_roblib_ill_get_xml_node($crossref_xml, 'given_name'); $author = upei_roblib_ill_get_xml_node($person, 'surname') . ',' . upei_roblib_ill_get_xml_node($person, 'given_name');
} }
} }
$form['ArticleAuthor']['#value'] = $author; $form['ArticleAuthor']['#value'] = $author;

Loading…
Cancel
Save