Fixes #1528, generic url prefix...this aught to do it

This commit is contained in:
Matt Burton 2009-08-11 01:09:30 +00:00
parent 161a21b180
commit 05a9932846

View file

@ -34,7 +34,9 @@ function doWeb(doc, url){
var hostRegexp = new RegExp("^(https?://[^/]+)/"); var hostRegexp = new RegExp("^(https?://[^/]+)/");
var hMatch = hostRegexp.exec(url); var hMatch = hostRegexp.exec(url);
var host = hMatch[1]; var host = hMatch[1];
var urlPrefix = url.indexOf("/uiu/") != -1 ? host + "/uiu/vwebv/exportRecord.do?bibId=" : host + "/vwebv/exportRecord.do?bibId=";
var urlPrefix = url.match("https?://[^/]*(/[^/]*/)?/?vwebv/")[1] ? host + url.match("https?://[^/]*(/[^/]*/)?/?vwebv/")[1] + "/vwebv/exportRecord.do?bibId=" : host + "/vwebv/exportRecord.do?bibId=";
var namespace = doc.documentElement.namespaceURI; var namespace = doc.documentElement.namespaceURI;
var nsResolver = namespace ? function(prefix) { var nsResolver = namespace ? function(prefix) {