commit 385cb2f0b44a5b18ca3676b348ccff222819f37f
parent d864bf834eaeebb16c5039f3dd7229d7f25237be
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 18 Sep 2009 01:01:59 +0000
Fix CrossRef translator (CrossRef added a namespace)
Diffstat:
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/repotime.txt b/repotime.txt
@@ -1 +1 @@
-2009-08-04 04:40:00
+2009-09-18 01:05:00
diff --git a/translators/CrossRef.js b/translators/CrossRef.js
@@ -8,7 +8,7 @@
"maxVersion":"",
"priority":90,
"inRepository":true,
- "lastUpdated":"2009-07-16 09:20:00"
+ "lastUpdated":"2009-09-18 01:05:00"
}
function detectSearch(item) {
@@ -38,6 +38,10 @@ function processCrossRef(xmlOutput) {
return false;
}
+ // "with ({});" needed to fix default namespace scope issue
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=330572
+ default xml namespace = "http://www.crossref.org/xschema/1.0"; with ({});
+
// ensure status is valid
if(!xml.doi_record.length()) return false;
// ensure this isn't an error
@@ -140,7 +144,7 @@ function doSearch(item) {
var co = Zotero.Utilities.createContextObject(item);
}
- Zotero.Utilities.HTTP.doGet("http://www.crossref.org/openurl?pid=zter:zter321&"+co+"&noredirect=true&format=unixref", function(responseText) {
+ Zotero.Utilities.HTTP.doGet("http://www.crossref.org/openurl/?pid=zter:zter321&"+co+"&noredirect=true&format=unixref", function(responseText) {
processCrossRef(responseText);
Zotero.done();
});