CSWGetRecords format additions for parsing GeoNetwork specific fields, p=fvanderbiest, r=bartvde,me (closes #2961)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11959 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -27,13 +27,14 @@ OpenLayers.Format.CSWGetRecords.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML,
|
||||
* {Object} Mapping of namespace aliases to namespace URIs.
|
||||
*/
|
||||
namespaces: {
|
||||
xlink: "http://www.w3.org/1999/xlink",
|
||||
xsi: "http://www.w3.org/2001/XMLSchema-instance",
|
||||
csw: "http://www.opengis.net/cat/csw/2.0.2",
|
||||
dc: "http://purl.org/dc/elements/1.1/",
|
||||
dct: "http://purl.org/dc/terms/",
|
||||
geonet: "http://www.fao.org/geonetwork",
|
||||
ogc: "http://www.opengis.net/ogc",
|
||||
ows: "http://www.opengis.net/ows",
|
||||
ogc: "http://www.opengis.net/ogc"
|
||||
xlink: "http://www.w3.org/1999/xlink",
|
||||
xsi: "http://www.w3.org/2001/XMLSchema-instance"
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -233,6 +234,17 @@ OpenLayers.Format.CSWGetRecords.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML,
|
||||
var record = {type: "Record"};
|
||||
this.readChildNodes(node, record);
|
||||
obj.records.push(record);
|
||||
},
|
||||
"*": function(node, obj) {
|
||||
var name = node.localName || node.nodeName.split(":").pop();
|
||||
obj[name] = this.getChildValue(node);
|
||||
}
|
||||
},
|
||||
"geonet": {
|
||||
"info": function(node, obj) {
|
||||
var gninfo = {};
|
||||
this.readChildNodes(node, gninfo);
|
||||
obj.gninfo = gninfo;
|
||||
}
|
||||
},
|
||||
"dc": {
|
||||
|
||||
Reference in New Issue
Block a user