0) {
item.publisher = attachName(doc, publishers).join('; ');
}
var keywords = ZU.xpathText(doc, '//ReferenceKeywords/OnetoN[starts-with(text(), "'+item.itemID+'")]');
if (keywords && keywords.length>0) {
item.tags = attachName(doc, keywords);
}
if (rememberTags[item.itemID]) {
for (var j=0; j' + title + "\n";
}
if (text) {
noteObject.note += "" + ZU.xpathText(citations[j], 'Text') + "
\n";
}
if (pages) {
noteObject.note += "" + pages + "";
}
if (rememberTags[noteObject.id]) {
noteObject.tags = rememberTags[noteObject.id];
}
if (noteObject.note != "") {
item.notes.push(noteObject);
}
}
//Locations will be saved as URIs in attachments, DOI, extra etc.
var locations = ZU.xpath(doc, '//Locations/Location[ReferenceID="'+item.itemID+'"]');
//If we only have partial information about the callnumber or
//library location, then we save this info in these two arrays
//which will then processed after the for loop if no other info
//was found.
var onlyLibraryInfo = [];
var onlyCallNumber = [];
for (var j=0; j0) {
item.callNumber = onlyCallNumber[0];
} else if (onlyLibraryInfo.length>0) {
item.libraryCatalog = onlyLibraryInfo[0];
}
}
//Only for journalArticle and conferencePaper the DOI field is
//currently established and therefore we need to add the info for
//all other itemTypes in the extra field.
if (item.DOI && item.itemType != "journalArticle" && item.itemType != "conferencePaper") {
addExtraLine(item, "DOI", item.DOI);
}
//The items of type contribution need more data from their container
//element and are therefore not yet finished. The other items can
//be completed here.
itemIdList[item.itemID] = item;
if (type == "Contribution") {
unfinishedReferences.push(item);
} else {
item.complete();
}
}
//For unfinished references we add additional data from the
//container item and save the relation between them as well.
for (var i=0; i< unfinishedReferences.length; i++) {
var item = unfinishedReferences[i];
var containerString = ZU.xpathText(doc, '//ReferenceReferences/OnetoN[contains(text(), "'+item.itemID+'")]');
if (containerString) {
var containerId = containerString.split(';')[0];
var containerItem = itemIdList[containerId];
if (containerItem.type == "ConferenceProceedings") {
item.itemType = "conferencePaper";
}
item.publicationTitle = containerItem.title;
item.place = containerItem.place;
item.publisher = containerItem.publisher;
item.ISBN = containerItem.ISBN;
item.volume = containerItem.volume;
item.edition = containerItem.edition;
item.series = containerItem.series;
for (var j=0; j";
} else {
item.note = "" + ZU.xpathText(tasks[i], './Name') + "
";
}
var noteText = ZU.xpathText(tasks[i], './Notes');
if (noteText) {
item.note += "\n" + noteText;
}
item.seeAlso.push(ZU.xpathText(tasks[i], './ReferenceID'));
item.tags.push("#todo");
item.complete();
}
}
function attachName(doc, ids) {
if (!ids || !ids.length || ids.length<=0) {
return ;
}
var valueList = [];
var idList = ids.split(';');
//skip the first element which is the id of reference
for (var j=1; j