www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 4ab573e4e79cd10a59d7aefa4f3760e060b3d48d
parent 473e3a067a0ebca2ab472e574c9c356ebcd55622
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue,  7 Jul 2009 08:46:39 +0000

Quick hack that seems to fix CrossRef DOI lookup, though this should be fixed for real


Diffstat:
Mrepotime.txt | 2+-
Mtranslators/CrossRef.js | 6+++++-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/repotime.txt b/repotime.txt @@ -1 +1 @@ -2009-07-07 00:15:00 +2009-07-07 08:50:00 diff --git a/translators/CrossRef.js b/translators/CrossRef.js @@ -8,7 +8,7 @@ "maxVersion":"", "priority":90, "inRepository":true, - "lastUpdated":"2007-09-15 21:00:00" + "lastUpdated":"2009-07-07 08:50:00" } function detectSearch(item) { @@ -31,6 +31,10 @@ function processCrossRef(xmlOutput) { // parse XML with E4X try { var xml = new XML(xmlOutput); + if(!xml.doi_record.length()) { + default xml namespace = "http://www.crossref.org/xschema/1.0"; with({}); + var xml = new XML('<container xmlns="http://www.crossref.org/xschema/1.0">' + xmlOutput + '</container>'); + } } catch(e) { return false; }