diff --git a/lib/OpenLayers/Format/Filter.js b/lib/OpenLayers/Format/Filter.js index 6dca428787..142ffb71e4 100644 --- a/lib/OpenLayers/Format/Filter.js +++ b/lib/OpenLayers/Format/Filter.js @@ -92,7 +92,6 @@ OpenLayers.Format.Filter = OpenLayers.Class(OpenLayers.Format.XML, { if(typeof data == "string") { data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); } - var root = data.nodeType == 9 ? data.documentElement : data; var version = this.version; if(!version) { version = this.defaultVersion; diff --git a/lib/OpenLayers/Format/Filter/v1.js b/lib/OpenLayers/Format/Filter/v1.js index 7fbff41895..d4f5080f5d 100644 --- a/lib/OpenLayers/Format/Filter/v1.js +++ b/lib/OpenLayers/Format/Filter/v1.js @@ -61,7 +61,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { */ read: function(data) { var obj = {}; - var filter = this.readers.ogc["Filter"].apply(this, [data, obj]); + this.readers.ogc["Filter"].apply(this, [data, obj]); return obj.filter; }, diff --git a/lib/OpenLayers/Format/XML.js b/lib/OpenLayers/Format/XML.js index 02bbde1c4c..95c3633e8f 100644 --- a/lib/OpenLayers/Format/XML.js +++ b/lib/OpenLayers/Format/XML.js @@ -475,7 +475,6 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { */ createElementNSPlus: function(name, options) { options = options || {}; - var loc = name.indexOf(":"); // order of prefix preference // 1. in the uri option // 2. in the prefix option @@ -483,7 +482,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { // 4. from the defaultPrefix var uri = options.uri || this.namespaces[options.prefix]; if(!uri) { - loc = name.indexOf(":"); + var loc = name.indexOf(":"); uri = this.namespaces[name.substring(0, loc)]; } if(!uri) { @@ -516,7 +515,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { * setAttributeNS will be used instead of setAttribute. */ setAttributes: function(node, obj) { - var value, loc, alias, uri; + var value, uri; for(var name in obj) { if(obj[name] != null && obj[name].toString) { value = obj[name].toString();