When I call getrecords2 like this:
csw.getrecords2(
startposition=startposition,
maxrecords=pagesize,
outputschema=outputschema,
esn='full',
sortby=sortby
)
no value for outputschema, other than http://www.isotc211.org/2005/gmd works, which is no good, since we are using 19115-1 (http://standards.iso.org/iso/19115/-3/mdb/1.0).
POSTing raw request to the CSW server (via Python requests), outputscheme='owl' works to give me the server's own output scheme but the OWSLib's csw client csw = CatalogueServiceWeb(url) can't split the returned XML into ows.records to allow iterating be ows.records.items().
I guess that internally, the ows client needs to split XML based on namespsaces it knows, from ISO19115:2005, not anything else, like ISO19115-1:2014. Perhaps it can't find out the location of UUID in the record since that's changes in -1:2014.
A workaround is to use 'raw' XML splitting on ows.response like this:
root = etree.fromstring(csw.response)
records = root.findall('.//mdb:MD_Metadata', namespaces=namespaces)
- Can the csw client fill csw.records for other outputSchemes that I'm not using?
- Can the client be configured to know about the outputScheme, I just don;t know how?
When I call getrecords2 like this:
no value for
outputschema, other thanhttp://www.isotc211.org/2005/gmdworks, which is no good, since we are using 19115-1 (http://standards.iso.org/iso/19115/-3/mdb/1.0).POSTing raw request to the CSW server (via Python requests),
outputscheme='owl'works to give me the server's own output scheme but the OWSLib's csw clientcsw = CatalogueServiceWeb(url)can't split the returned XML into ows.records to allow iterating beows.records.items().I guess that internally, the ows client needs to split XML based on namespsaces it knows, from ISO19115:2005, not anything else, like ISO19115-1:2014. Perhaps it can't find out the location of UUID in the record since that's changes in -1:2014.
A workaround is to use 'raw' XML splitting on
ows.responselike this: