5 xpath => '//*[@tag="655"]|//*[@tag="659"]'
7 label => l('Topic Heading: '),
8 xpath => '//*[@tag="690"]'
10 label => l('Geographic Setting: '),
11 xpath => '//*[@tag="691"]'
13 label => l('Biographical Subject: '),
14 xpath => '//*[@tag="692"]'
16 label => l('Character Attributes: '),
17 xpath => '//*[@tag="693"]'
19 label => l('Setting: '),
20 xpath => '//*[@tag="698"]'
22 label => l('Time Period: '),
23 xpath => '//*[@tag="699"]'
28 loc = CGI.param('loc') | uri;
29 xpath = xpath || '//*[starts-with(@tag,"6")]';
30 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 IF code.match('[vxyz]'); " — "; END;
37 # at this point, we actually have a partial term to use.
38 single_term = subfield.textContent | html;
39 all_terms.push(subfield.textContent);
40 total_term = all_terms.join(" ").replace('\s+$', '') | uri;
41 '<a href="' _ ctx.opac_root _ '/results?qtype=subject&query=' _ total_term _ '&loc=' _ loc _ '">' _ single_term _ '</a>';
43 IF all_terms.size; "<br/>"; END;
48 <div id='rdetail_subject_div'>
49 <table cellpadding="0" cellspacing="0" border="0">
51 FOREACH subj IN subjects;
52 content = PROCESS render_subject(xpath=subj.xpath);
53 IF content.match('\S');
56 <td width="1" style="padding:5px 7px 0px 0px;" valign="top">
57 <strong>[% subj.label %]</strong>
59 <td style="padding-top:5px;"><div>[% content %] </div></td>
63 [% IF any_subjects == 0 %]
64 <tr><td><i>[% l('No Subjects') %]</i></td></tr>