Closes #1472, Patch to allow MODS XML importer to combine multiple given names

This commit is contained in:
Dan Stillman 2009-07-04 02:51:40 +00:00
parent f8bbf32d85
commit e0cc8e9f18

View file

@ -444,10 +444,13 @@ function doImport() {
for each(var name in mods.m::name) {
// TODO: institutional authors
var creator = new Array();
var creator = {};
creator.firstName = "";
for each(var namePart in name.m::namePart) {
if(namePart.@type == "given") {
creator.firstName = namePart.text().toString();
if(creator.firstName != "")
creator.firstName = creator.firstName + " ";
creator.firstName = creator.firstName + namePart.text().toString();
} else if(namePart.@type == "family") {
creator.lastName = namePart.text().toString();
} else if(namePart.@type == "date" || namePart.@type == "termsOfAddress") {