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);
32 FOR subfield IN node.childNodes;
33 NEXT UNLESS subfield.nodeName == "subfield";
34 code = subfield.getAttribute('code');
35 NEXT UNLESS code.match('[a-z]');
36 sf_raw = subfield.textContent;
37 sf = subfield.textContent | html;
38 term = term _ ' ' _ sf;
39 qterm = qterm _ ' ' _ sf_raw;
41 url = mkurl(ctx.opac_root _ '/results', {query => qterm, qtype => 'author'}, ['page', 'expand']);
42 author_type = label | html;
46 iprop = ' itemprop="accountablePerson"';
47 ELSIF type == 'added';
48 iprop = ' itemprop="contributor"';
50 '<a href="' _ url _ '"' _ iprop _ '>' _ term.replace('^\s+', '') _ '</a> (' _ author_type _ '). ';
55 <div class='rdetail_authors_div'>
56 [%- FOREACH author IN authors;
57 NEXT UNLESS author.xpath;
58 links = PROCESS build_author_links(
59 xpath=author.xpath, label=author.label, type=author.type
61 IF links.match('\S') %]
62 <span class='rdetail-author-div'>[% links %]</span>