From 197244e185226034ee43a9e6c823cf9acadaa4e9 Mon Sep 17 00:00:00 2001 From: Ventero Date: Fri, 28 Sep 2012 19:35:02 +0200 Subject: [PATCH 1/3] 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. --- openseadragon.js | 19 +++++++++---------- src/dzitilesource.js | 19 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/openseadragon.js b/openseadragon.js index b002a24f..a492b3c7 100644 --- a/openseadragon.js +++ b/openseadragon.js @@ -5641,17 +5641,16 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, { * @param {String} optional - url */ supports: function( data, url ){ - return ( - data.Image && - "http://schemas.microsoft.com/deepzoom/2008" == data.Image.xmlns - ) || ( - data.documentElement && - "Image" == data.documentElement.tagName && - "http://schemas.microsoft.com/deepzoom/2008" == - data.documentElement.namespaceURI - ); - }, + var ns; + if ( data.Image ) { + ns = data.Image.xmlns; + } else if ( data.documentElement && "Image" == data.documentElement.tagName ) { + ns = data.documentElement.namespaceURI; + } + return ( "http://schemas.microsoft.com/deepzoom/2008" == ns || + "http://schemas.microsoft.com/deepzoom/2009" == ns ); + }, /** * diff --git a/src/dzitilesource.js b/src/dzitilesource.js index b6f8db63..db8c7046 100644 --- a/src/dzitilesource.js +++ b/src/dzitilesource.js @@ -69,17 +69,16 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, { * @param {String} optional - url */ supports: function( data, url ){ - return ( - data.Image && - "http://schemas.microsoft.com/deepzoom/2008" == data.Image.xmlns - ) || ( - data.documentElement && - "Image" == data.documentElement.tagName && - "http://schemas.microsoft.com/deepzoom/2008" == - data.documentElement.namespaceURI - ); - }, + var ns; + if ( data.Image ) { + ns = data.Image.xmlns; + } else if ( data.documentElement && "Image" == data.documentElement.tagName ) { + ns = data.documentElement.namespaceURI; + } + return ( "http://schemas.microsoft.com/deepzoom/2008" == ns || + "http://schemas.microsoft.com/deepzoom/2009" == ns ); + }, /** * From b64af4138fa19e5bae8b7dab54dcb4d0a92c56bf Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Thu, 17 Jan 2013 11:31:14 -0800 Subject: [PATCH 2/3] Changed Ant default to "build" --- build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 265f9fb6..a8679d57 100644 --- a/build.xml +++ b/build.xml @@ -1,7 +1,7 @@ + default="build"> From e52c9f8e0f22e663e338f8445828c51b4922c813 Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Thu, 17 Jan 2013 12:48:53 -0800 Subject: [PATCH 3/3] Removed bad "workspace-dzi" reference in www build target --- build.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/build.xml b/build.xml index a8679d57..9da5c968 100644 --- a/build.xml +++ b/build.xml @@ -71,8 +71,6 @@ - -