# get_marc_attrs( { marc_xml => doc } )
BLOCK get_marc_attrs;
xml = args.marc_xml;
- args.isbn = xml.findnodes('//*[@tag="020"]/*[@code="a"]').shift.textContent;
+
+ args.isbns = [];
+ FOR isbn IN xml.findnodes('//*[@tag="020"]/*[@code="a"]');
+ args.isbns.push(isbn.textContent);
+ END;
+
args.upc = xml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
args.marc_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent;
# clean up the ISBN
- args.isbn_clean = args.isbn.replace('\ .*', '');
+ args.isbn_clean = args.isbns.0.replace('\ .*', '');
args.holdings = [];
FOR holding IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
<table border="0" cellpadding="0" width="100%">
<tr>
<td nowrap='nowrap' valign="top">
- [% IF attrs.isbn %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
+ [% IF attrs.isbns.0 %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
+ </td>
+ <td valign="top" id='rdetail_isbn'>
+ [% FOR isbn IN attrs.isbns %][% IF !loop.first; %]<br/>[% END; isbn; END %]
</td>
- <td valign="top" id='rdetail_isbn'>[% attrs.isbn %]</td>
<td nowrap='nowrap' valign="top">
[% IF attrs.phys_desc %]<strong id="rdetail_phys_lbl">[% l("Physical Description") %]</strong>[% END %]
</td>
</td>
<td>[% attrs.publisher; %]</td>
</tr>
- <tr name="results_isbn_tr" class="[% attrs.isbn ? '' : 'hide_me' %]">
+ <tr name="results_isbn_tr" class="[% attrs.isbns.0 ? '' : 'hide_me' %]">
<td valign="top">
<strong>[% l('ISBN:') %]</strong>
</td>
- <td>[% attrs.isbn %]</td>
+ <td>[% attrs.isbns.0 %]</td>
</tr>
<tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
<td valign="top">