documentation is also an array, and lang is optional thanks @ahocevar for the catch

This commit is contained in:
Bart van den Eijnden
2012-11-20 16:48:50 +01:00
parent cbd9a90477
commit 52d69ecfda
2 changed files with 6 additions and 4 deletions

View File

@@ -156,11 +156,13 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
},
"documentation": function(node, obj) {
if (!obj.documentation) {
obj.documentation = {};
obj.documentation = [];
}
var lang = node.getAttribute("xml:lang");
var value = this.getChildValue(node);
obj.documentation[lang] = value.replace(this.regExes.trimSpace, "");
obj.documentation.push({
lang: node.getAttribute("xml:lang"),
textContent: value.replace(this.regExes.trimSpace, "")
});
},
"simpleType": function(node, obj) {
this.readChildNodes(node, obj);