mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-26 07:06:10 +03:00
Allow different Deep Zoom XML namespaces.
While the official XML namespace according to the xsd is http://schemas.microsoft.com/deepzoom/2008, DZIs generated with the Deep Zoom Composer use http://schemas.microsoft.com/deepzoom/2009, so this should be supported as well.
This commit is contained in:
parent
bebc7a64ff
commit
197244e185
@ -5641,17 +5641,16 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, {
|
|||||||
* @param {String} optional - url
|
* @param {String} optional - url
|
||||||
*/
|
*/
|
||||||
supports: function( data, url ){
|
supports: function( data, url ){
|
||||||
return (
|
var ns;
|
||||||
data.Image &&
|
if ( data.Image ) {
|
||||||
"http://schemas.microsoft.com/deepzoom/2008" == data.Image.xmlns
|
ns = data.Image.xmlns;
|
||||||
) || (
|
} else if ( data.documentElement && "Image" == data.documentElement.tagName ) {
|
||||||
data.documentElement &&
|
ns = data.documentElement.namespaceURI;
|
||||||
"Image" == data.documentElement.tagName &&
|
}
|
||||||
"http://schemas.microsoft.com/deepzoom/2008" ==
|
|
||||||
data.documentElement.namespaceURI
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
|
return ( "http://schemas.microsoft.com/deepzoom/2008" == ns ||
|
||||||
|
"http://schemas.microsoft.com/deepzoom/2009" == ns );
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -69,17 +69,16 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, {
|
|||||||
* @param {String} optional - url
|
* @param {String} optional - url
|
||||||
*/
|
*/
|
||||||
supports: function( data, url ){
|
supports: function( data, url ){
|
||||||
return (
|
var ns;
|
||||||
data.Image &&
|
if ( data.Image ) {
|
||||||
"http://schemas.microsoft.com/deepzoom/2008" == data.Image.xmlns
|
ns = data.Image.xmlns;
|
||||||
) || (
|
} else if ( data.documentElement && "Image" == data.documentElement.tagName ) {
|
||||||
data.documentElement &&
|
ns = data.documentElement.namespaceURI;
|
||||||
"Image" == data.documentElement.tagName &&
|
}
|
||||||
"http://schemas.microsoft.com/deepzoom/2008" ==
|
|
||||||
data.documentElement.namespaceURI
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
|
return ( "http://schemas.microsoft.com/deepzoom/2008" == ns ||
|
||||||
|
"http://schemas.microsoft.com/deepzoom/2009" == ns );
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user