4 label => l('Subject: '),
5 xpath => '//*[@tag="600" or @tag="610" or @tag="611" or @tag="630" or @tag="650" or @tag="651"]'
8 xpath => '//*[@tag="655"]|//*[@tag="659"]'
10 label => l('Topic Heading: '),
11 xpath => '//*[@tag="690"]'
13 label => l('Geographic Setting: '),
14 xpath => '//*[@tag="691"]'
16 label => l('Biographical Subject: '),
17 xpath => '//*[@tag="692"]'
19 label => l('Character Attributes: '),
20 xpath => '//*[@tag="693"]'
22 label => l('Setting: '),
23 xpath => '//*[@tag="698"]'
25 label => l('Time Period: '),
26 xpath => '//*[@tag="699"]'
31 loc = CGI.param('loc') | uri;
32 xpath = xpath || '//*[starts-with(@tag,"6")]';
33 FOR node IN ctx.marc_xml.findnodes(xpath);
35 FOR subfield IN node.childNodes;
36 NEXT UNLESS subfield.nodeName == "subfield";
37 code = subfield.getAttribute('code');
38 NEXT UNLESS code.match('[a-z]');
39 IF code.match('[vxyz]'); " > "; END;
40 # at this point, we actually have a partial term to use.
41 single_term = subfield.textContent | html;
42 all_terms.push(subfield.textContent);
43 total_term = all_terms.join(" ").replace('\s+$', '');
45 <a href="[% mkurl(ctx.opac_root _ '/results', {qtype=>'subject', query=>total_term}, stop_parms); %]">[% single_term %]</a>
47 IF all_terms.size; "<br/>"; END;
52 [% BLOCK render_all_subjects;
53 FOREACH subj IN subjects;
54 content = PROCESS render_subject(xpath=subj.xpath);
55 IF content.match('\S');
57 <table class='rdetail_subject'>
60 <td class='rdetail_subject_type'>[% subj.label %]</td>
61 <td class='rdetail_subject_value'>[% content %]</td>
69 [%- subject_html = PROCESS render_all_subjects;
70 IF subject_html.length > 0;
72 <h2 class='rdetail_related_subjects'>[% l('Search for related items by subject') %]</h2>