Fix CrossRef translator (CrossRef added a namespace)

This commit is contained in:
Dan Stillman 2009-09-18 01:01:59 +00:00
parent d864bf834e
commit 385cb2f0b4
2 changed files with 7 additions and 3 deletions

View file

@ -1 +1 @@
2009-08-04 04:40:00
2009-09-18 01:05:00

View file

@ -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();
});