Originally, titles in Tpac only showed based on tag 245 subfield a.
This sometimes led to difficulty identifying specific records from
each other if it was part of a set or had additional title information
in other subfields.
Modified default title function to include the following:
subfield b = remainder of title
subfield n = number of part/section of a work
subfield p = name of part/section of a work
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Scott <dan@coffeecode.net>
args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
+ # Include subfields 'abnp' to generate a more comprehensive title display in search results
+ titresults = xml.findnodes('//*[@tag="245"]/*[@code="a" or @code="b" or @code="n" or @code="p"]');
+ titresults_content = [];
+ FOR sub IN titresults; titresults_content.push(sub.textContent); END;
+ args.title = titresults_content.join(" ");
# Avoid ugly trailing syntax on brief titles
- args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
args.title = args.title | replace('[:;/]$', '');
# Provide correct spacing between the subfields