Fix CrossRef translator (CrossRef added a namespace)
This commit is contained in:
parent
d864bf834e
commit
385cb2f0b4
2 changed files with 7 additions and 3 deletions
|
@ -1 +1 @@
|
||||||
2009-08-04 04:40:00
|
2009-09-18 01:05:00
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"maxVersion":"",
|
"maxVersion":"",
|
||||||
"priority":90,
|
"priority":90,
|
||||||
"inRepository":true,
|
"inRepository":true,
|
||||||
"lastUpdated":"2009-07-16 09:20:00"
|
"lastUpdated":"2009-09-18 01:05:00"
|
||||||
}
|
}
|
||||||
|
|
||||||
function detectSearch(item) {
|
function detectSearch(item) {
|
||||||
|
@ -38,6 +38,10 @@ function processCrossRef(xmlOutput) {
|
||||||
return false;
|
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
|
// ensure status is valid
|
||||||
if(!xml.doi_record.length()) return false;
|
if(!xml.doi_record.length()) return false;
|
||||||
// ensure this isn't an error
|
// ensure this isn't an error
|
||||||
|
@ -140,7 +144,7 @@ function doSearch(item) {
|
||||||
var co = Zotero.Utilities.createContextObject(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);
|
processCrossRef(responseText);
|
||||||
Zotero.done();
|
Zotero.done();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue