7 xpath => '//*[@tag="100"]|//*[@tag="110"]|//*[@tag="111"]'
10 label => l('Added Author'),
11 xpath => '//*[@tag="700"]|//*[@tag="710"]|//*[@tag="711"]'
14 label => l('Credited'),
15 xpath => '//*[@tag="100"]|//*[@tag="110"]|//*[@tag="111"]'
19 xpath => '//*[@tag="508"]'
22 label => l('Author Notes: '),
23 xpath => '' # Comes from added content...
27 BLOCK build_author_links;
28 FOR node IN ctx.marc_xml.findnodes(xpath);
31 FOR subfield IN node.childNodes;
32 NEXT UNLESS subfield.nodeName == "subfield";
33 code = subfield.getAttribute('code');
34 NEXT UNLESS code.match('[a-z]');
35 sf_raw = subfield.textContent;
36 sf = subfield.textContent | html;
37 term = term _ ' ' _ sf;
38 qterm = qterm _ ' ' _ sf_raw;
40 url = mkurl(ctx.opac_root _ '/results', {query => qterm, qtype => 'author'}, ['page', 'expand']);
41 author_type = label | html;
42 '<a href="' _ url _ '">' _ term _ '</a> (' _ author_type _ '). ';
47 <div class='rdetail_authors_div'>
48 [%- FOREACH author IN authors;
49 NEXT UNLESS author.xpath;
50 links = PROCESS build_author_links(xpath=author.xpath, label=author.label);
51 IF links.match('\S') %]
52 <span class='rdetail-author-div'>[% links %]</span>