Advertisement
chrissharp123

Untitled

Sep 25th, 2019
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. <div>
  2. <style> li { padding: 8px; margin 5px; }</style>
  3. <ol>
  4. [% FOR cbreb IN target %]
  5. [% FOR item IN cbreb.items;
  6. bre_id = item.target_biblio_record_entry;
  7.  
  8. bibxml = helpers.unapi_bre(bre_id, {flesh => '{mra}'});
  9. title = '';
  10. FOR part IN bibxml.findnodes('//*[@tag="245"]/*[@code="a" or @code="b"]');
  11. title = title _ part.textContent;
  12. END;
  13.  
  14. author = bibxml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
  15. item_type = bibxml.findnodes('//*[local-name()="attributes"]/*[local-name()="field"][@name="item_type"]').getAttribute('coded-value');
  16. publisher = bibxml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
  17. pubdate = bibxml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
  18. isbn = bibxml.findnodes('//*[@tag="020"]/*[@code="a"]').textContent;
  19. %]
  20.  
  21. <li>
  22. Bib ID# [% bre_id %] ISBN: [% isbn %]<br />
  23. Title: [% title %]<br />
  24. Author: [% author %]<br />
  25. Publication Info: [% publisher %] [% pubdate %]<br/>
  26. Item Type: [% item_type %]
  27. </li>
  28. [% END %]
  29. [% END %]
  30. </ol>
  31. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement