Hi List,
Using Geonetwork 3.0.5, I have found a problem when validating records
against our revised Gemini 2.2 schema (
https://github.com/AstunTechnology/iso19139.gemini22_GN3). I am seeing XSD
validation errors, which in the log files show up as:
<geonet:error>
<geonet:typeOfError>ERROR</geonet:typeOfError>
<geonet:errorNumber>1</geonet:errorNumber>
<geonet:message>cvc-complex-type.2.4.a: Invalid content was found
starting with element 'gmx:Anchor'. One of '{"
http://www.isotc211.org/2005/gco":CharacterString\}' is expected. (Element:
gmx:Anchor with parent element: gmd:code)</geonet:message>
<geonet:xpath>gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords[1]/gmd:MD_Keywords/gmd:thesaurusName/gmd:CI_Citation/gmd:identifier/gmd:MD_Identifier/gmd:code/gmx:Anchor</geonet:xpath>
</geonet:error>
I have noticed, by comparing records before and after validation that the
gmd:identifier element is being added to the record automatically by
geonetwork at some point. It is not present in the records initially. If
the element is removed, then the record validates successfully. However, it
is then re-added. I haven't quite figured out if it is re-added when you
switch from view to view (eg from INSPIRE to XML view) or whether it's
re-added when you save a record, or when you validate.
I have tried commenting out the sections referring to this in
config-editor.xml but that doesn't seem to help.
This seems to only happen to keywords from the inspire themes thesaurus,
and it happens whether the keyword existed in the record before it was
imported into geonetwork, or whether it's added during editing.
In Geonetwork 2.10 I would have modified update-fixed-info.xsl to fix this
problem but I can't figure out which file causes this element to be added.
I also don't know whether the best fix is to remove the identifier section
at all (which still seems to be valid for INSPIRE, as far as I can tell) or
fix the XSD error some other way,
I am also seeing the error reported here:
https://github.com/geonetwork/util-gemet/issues/1 but I don't know if
that's a related problem or something separate.
Can anyone help?
Thanks
Jo
--
*Jo Cook*
t:+44 7930 524 155/twitter:@archaeogeek
--
--
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 1372 744 009 w: astuntechnology.com twitter:@astuntech
<https://twitter.com/astuntech>
iShare - enterprise geographic intelligence platform
<https://astuntechnology.com/ishare/>
GeoServer, PostGIS and QGIS training
<https://astuntechnology.com/services/#training>
Helpdesk and customer portal
<http://support.astuntechnology.com/support/login>
Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.