use namespace URI instead of prefix as suggested by @tschaub and discussed with @ahocevar

This commit is contained in:
Bart van den Eijnden
2013-02-13 20:58:48 +01:00
parent f16664cb87
commit 13d95b90a3
8 changed files with 22 additions and 35 deletions
+3 -7
View File
@@ -10,14 +10,10 @@ goog.require('ol.parser.XML');
* @extends {ol.parser.XML}
*/
ol.parser.ogc.WMSCapabilities_v1 = function() {
this.defaultPrefix = 'wms';
this.defaultNamespaceURI = 'http://www.opengis.net/wms';
this.errorProperty = 'service';
this.namespaces = {};
this.namespaces['wms'] = 'http://www.opengis.net/wms';
this.namespaces['xlink'] = 'http://www.w3.org/1999/xlink';
this.namespaces['xsi'] = 'http://www.w3.org/2001/XMLSchema-instance';
this.readers = {
'wms': {
'http://www.opengis.net/wms': {
'Service': function(node, obj) {
obj['service'] = {};
this.readChildNodes(node, obj['service']);
@@ -51,7 +47,7 @@ ol.parser.ogc.WMSCapabilities_v1 = function() {
return bbox;
},
'OnlineResource': function(node, obj) {
obj.href = this.getAttributeNS(node, this.namespaces['xlink'],
obj.href = this.getAttributeNS(node, 'http://www.w3.org/1999/xlink',
'href');
},
'ContactInformation': function(node, obj) {