APISO unused issue¶
Problem
We have a Geonetwork 2.10.4 with only one dataset (we made it invalid):
http://c.testbed.gdi-de.org/gn210/srv/eng/csw?request=GetCapabilities&service=CSW&version=2.0.2
While harvesting c.testbed from a Geonetwork 3.1.x-develop instance, we run inotifywait -rm /var/lib/tomcat8/webapps/gdi-de > ~/delete.txt to check which files are read. (You can also do this with Geonetwork 2.10.4 and tomcat7.)
Result: No apiso.xsd is read. Instead it uses srv.xsd directly.
... /var/lib/tomcat8/webapps/gdi-de/WEB-INF/data/config/schema_plugins/iso19139/schema/srv/ OPEN srv.xsd /var/lib/tomcat8/webapps/gdi-de/WEB-INF/data/config/schema_plugins/iso19139/schema/srv/ ACCESS srv.xsd /var/lib/tomcat8/webapps/gdi-de/WEB-INF/data/config/schema_plugins/iso19139/schema/srv/ CLOSE_NOWRITE,CLOSE srv.xsd ...
For a full log see line 229 in
https://gist.github.com/bor8/26633209b0b562330f54468269f193fa
we thought a dataset has to be validated with apiso.xsd/gmd.xsd and not with srv.xsd?
Lösung
The solution for us is to add the following mapping to the file oasis-catalog.xml
<system systemId="http://schemas.opengis.net/csw/2.0.2/profiles/apiso/1.0.0/apiso.xsd" uri="/var/lib/tomcat8/webapps/gdi-de/xml/validation/csw202_apiso100/csw/2.0.2/profiles/apiso/1.0.0/apiso.xsd"/>
Now the local file apiso.xsd is read. So we can edit it and add:
<xs:import namespace="http://www.isotc211.org/2005/gmx" schemaLocation="../../../../../iso/19139/20060504/gmx/gmx.xsd"/>