4 label => l('Subject: '),
5 xpath => '//*[@tag="600" or @tag="610" or @tag="611" or @tag="630" or @tag="650" or @tag="651"]'
8 facet => 'identifier|genre',
10 xpath => '//*[@tag="655" or @tag="659"]',
11 subfields => '[abvxyz]'
13 label => l('Topic Heading: '),
14 xpath => '//*[@tag="690"]'
16 label => l('Geographic Setting: '),
17 xpath => '//*[@tag="691"]'
19 label => l('Biographical Subject: '),
20 xpath => '//*[@tag="692"]'
22 label => l('Character Attributes: '),
23 xpath => '//*[@tag="693"]'
25 label => l('Setting: '),
26 xpath => '//*[@tag="698"]'
28 label => l('Time Period: '),
29 xpath => '//*[@tag="699"]'
34 xpath = s.xpath || '//*[starts-with(@tag,"6")]';
35 FOR node IN ctx.marc_xml.findnodes(xpath);
36 '<span property="about">';
39 FOR subfield IN node.childNodes;
40 NEXT UNLESS subfield.nodeName == "subfield";
41 code = subfield.getAttribute('code');
43 linked_fields = [subfield.textContent()];
44 target_field = node.getAttribute('tag');
48 NEXT UNLESS code.match('[a-z]');
49 IF s.subfields; NEXT UNLESS code.match(s.subfields); END;
51 IF code.match('[vxyz]'); " > "; END;
53 # at this point, we actually have a partial term to use.
54 raw_term = subfield.textContent;
55 single_term = raw_term | html;
57 # facets should be used as-is
58 IF !s.facet; raw_term = raw_term.replace('\-', ' ').replace('[#"^$\+,\.:;&|\[\]()]', ''); END;
60 all_terms.push(raw_term);
63 total_term = s.facet _ '[' _ all_terms.join(s.joiner).replace('\s+$', '') _ ']';
65 total_term = all_terms.join(" ").replace('\s+$', '');
69 mkurl(ctx.opac_root _ '/results', {qtype=>'subject', query=>total_term}, stop_parms.merge(expert_search_parms, general_search_parms, browse_search_parms, facet_search_parms))
70 -%]" rel="nofollow" vocab="">[% single_term %]</a> [%-
73 IF all_terms.size; "<br/>"; END;
74 FOREACH link880 IN graphics;
75 '<div class="graphic880"' _ link880.dir _ '>';
84 [% BLOCK render_all_subjects;
85 FOREACH subj IN subjects;
86 content = PROCESS render_subject(s=subj);
87 IF content.match('\S');
89 <table class='rdetail_subject'>
92 <td class='rdetail_subject_type'>[% subj.label %]</td>
93 <td class='rdetail_subject_value'>[% content %]</td>
101 [%- subject_html = PROCESS render_all_subjects;
102 IF subject_html.length > 0;
104 <h2 class='rdetail_related_subjects'>[% l('Search for related items by subject') %]</h2>