From e0cc8e9f181dbf300dd04bcccbffd756482ebf09 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 4 Jul 2009 02:51:40 +0000 Subject: [PATCH] Closes #1472, Patch to allow MODS XML importer to combine multiple given names --- translators/MODS.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/translators/MODS.js b/translators/MODS.js index f9277a969e..770894c332 100644 --- a/translators/MODS.js +++ b/translators/MODS.js @@ -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") {