CSW 2.0.2/Filter 1.1.0 GetRecords Example
HTML
<script src="https://rawgit.com/highsource/jsonix/2.1.4/dist/Jsonix-all.js"></script>
<script src="https://rawgit.com/highsource/ogc-schemas/2.1.0/scripts/lib/CSW_2_0_2.js"></script>
<script src="https://rawgit.com/highsource/ogc-schemas/2.1.0/scripts/lib/DCT.js"></script>
<script src="https://rawgit.com/highsource/ogc-schemas/2.1.0/scripts/lib/DC_1_1.js"></script>
<script src="https://rawgit.com/highsource/ogc-schemas/2.1.0/scripts/lib/OWS_1_0_0.js"></script>
<script src="https://rawgit.com/highsource/ogc-schemas/2.1.0/scripts/lib/Filter_1_1_0.js"></script>
<script src="https://rawgit.com/highsource/ogc-schemas/2.1.0/scripts/lib/GML_3_1_1.js"></script>
<script src="https://rawgit.com/highsource/ogc-schemas/2.1.0/scripts/lib/SMIL_2_0_Language.js"></script>
<script src="https://rawgit.com/highsource/ogc-schemas/2.1.0/scripts/lib/SMIL_2_0.js"></script>
<script src="https://rawgit.com/highsource/w3c-schemas/1.0.4/scripts/lib/XLink_1_0.js"></script>
JavaScript
var mappings = [XLink_1_0, SMIL_2_0, SMIL_2_0_Language, GML_3_1_1, OWS_1_0_0, Filter_1_1_0, DC_1_1, DCT, CSW_2_0_2];
// Create a Jsonix context
var context = new Jsonix.Context(mappings, {
namespacePrefixes: {
'http://www.opengis.net/cat/csw/2.0.2': 'csw',
"http://www.opengis.net/ogc": 'ogc',
"http://www.opengis.net/gml": "gml"
},
mappingStyle : 'simplified'
});
var xml = '<csw:GetRecordsResponse xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dct="http://purl.org/dc/terms/" xmlns:ows="http://www.opengis.net/ows" xmlns:apiso="http://www.opengis.net/cat/csw/apiso/1.0" xmlns:gml="http://www.opengis.net/gml" xmlns:dif="http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:srv="http://www.isotc211.org/2005/srv" xmlns:ogc="http://www.opengis.net/ogc" xmlns:fgdc="http://www.opengis.net/cat/csw/csdgm" xmlns:inspire_ds="http://inspire.ec.europa.eu/schemas/inspire_ds/1.0" xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:os="http://a9.com/-/spec/opensearch/1.1/" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" version="2.0.2" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"><csw:SearchStatus timestamp="2015-03-30T10:39:31Z"/><csw:SearchResults nextRecord="11" numberOfRecordsMatched="13440" numberOfRecordsReturned="10" recordSchema="http://www.opengis.net/cat/csw/2.0.2" elementSet="full"><csw:Record><dc:identifier>gov.noaa.nodc:7400221</dc:identifier><dc:title>WATER DEPTH and Other Data from M. SHIELDS...