do not store redundant data in the object created by WFS Capabilities format, r=tschaub (closes #2640)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10348 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2010-05-20 20:05:52 +00:00
parent e4085bbdc6
commit 5f96b1f914
2 changed files with 7 additions and 10 deletions

View File

@@ -88,11 +88,10 @@ OpenLayers.Format.WFSCapabilities.v1 = OpenLayers.Class(
read_cap_Name: function(obj, node) {
var name = this.getChildValue(node);
if(name) {
obj.name = name;
var prefix = name.split(":")[0];
if(prefix !== name) {
obj.featurePrefix = prefix;
obj.featureNS = this.lookupNamespaceURI(node, prefix);
var parts = name.split(":");
obj.name = parts.pop();
if(parts.length > 0) {
obj.featureNS = this.lookupNamespaceURI(node, parts[0]);
}
}
},