Hi Melissa: 2008/10/22 Melissa Belvadi <[EMAIL PROTECTED]>: > Hello, all. > Right now in the system, or at least ours, if the 100 and 110 tags don't > exist, the system will insert the first 700 tag it finds into the "Author" > display. In many cases, this is an inappropriate name (eg. in one of our > books, it's the name of the illustrator) and will cause students to put > incorrect information into their citations in their term papers. > > We would like to just stop the use of any fields outside of 100 or 110 in > the Author field. Ideally we'd like to make this change for both the brief > results list and full bib record.
The full bib record (called a "mods_slim" record) is generated by a MARC -> MODS transform with selected elements pulled from the MODS records in the ModsParser.pm Perl module (http://svn.open-ils.org/trac/ILS/browser/trunk/Open-ILS/src/perlmods/OpenILS/Utils/ModsParser.pm) The $xpathset hash contains a set of XPath expressions for extracting fields of interest from MODS, including a set for the "author" field: author => { corporate => "//mods:mods/mods:[EMAIL PROTECTED]'corporate']/*[local-name()='namePart']". "[../mods:role/mods:text[text()='creator']". " or ../mods:role/mods:roleTerm[". " [EMAIL PROTECTED]'text'". " and [EMAIL PROTECTED]'marcrelator'". " and text()='creator']". "][1]", personal => "//mods:mods/mods:[EMAIL PROTECTED]'personal']/*[local-name()='namePart']". "[../mods:role/mods:text[text()='creator']". " or ../mods:role/mods:roleTerm[". " [EMAIL PROTECTED]'text'". " and [EMAIL PROTECTED]'marcrelator'". " and text()='creator']". "][1]", conference => "//mods:mods/mods:[EMAIL PROTECTED]'conference']/*[local-name()='namePart']". "[../mods:role/mods:text[text()='creator']". " or ../mods:role/mods:roleTerm[". " [EMAIL PROTECTED]'text'". " and [EMAIL PROTECTED]'marcrelator'". " and text()='creator']". "][1]", other => "//mods:mods/mods:[EMAIL PROTECTED]'personal']/*[local-name()='namePart']", any => "//mods:mods/mods:name/*[local-name()='namePart'][1]", }, Checking the MARC21slim2MODS32.xsl stylesheet, we can see that these categories of author correspond to: * corporate with a role of "creator" * personal with a role of "creator" * conference with a role of "creator" * other personal names * any other names Roles are assigned by MODS32 transform per the $e subfield designation x00, x10, and x11 MARC specs (http://www.loc.gov/marc/bibliographic/bdx00.html). So, from here we can jump into the definition of the mods_values_to_mods_slim() subroutine in ModsParser.pm, where the real meat lies: $tmp = $modsperl->{author}; if(!$tmp) { $author = ""; } else { ($author = $tmp->{personal}) || ($author = $tmp->{corporate}) || ($author = $tmp->{conference}) || ($author = $tmp->{other}) || ($author = $tmp->{any}); } This reads: "If there are no author entries, then return an empty string for the author; otherwise, use the personal, corporate, conference, other, or any author (the first one of them that satisfies our request, in that order)." To not return any authors that do not have a MARC relator category of "creator", then, I think you could change this section of code to something like the following: $tmp = $modsperl->{author}; if(!$tmp) { $author = ""; } else { ($author = $tmp->{personal}) || ($author = $tmp->{corporate}) || ($author = $tmp->{conference}) || ($author = ""); } You might find that this is a better approach than simply blocking anything other than 100 or 110 entries. The people responsible for defining MODS have put a massive amount of thought into how to define a usable metadata format, and how to get to that format from MARCXML, which is why Evergreen relies heavily on MODS for indexing and display purposes. Refining how Evergreen uses MODS requires a bit of an investment in learning MODS though. Also note that we updated the version of MODS in use with the Evergreen 1.4 branch to MODS3.2 from MODS3 in 1.2; we needed that to provide the refined URL display with link text and public notes, but there were a number of other areas where the conversion from MARC to MODS was improved. -- Dan Scott Laurentian University
