Hello Juan,
Thanks for your answer.
After many trial I think I finally found the problem.
It seems that when you try to edit a metadata file, the 'simple' view is created dynamically gathering information from several sources (I would guess the database and the data directory).
If you change the view to 'xml' too quickly, the geonetwork only has gathered a fraction of the information and part of it is loss (such as the topicCategory keywords).
Therefore the solution to avoid the loss of information is to work slowly...
Maybe in the future versions of geonetwork this problem could be addressed?! It's a bit dangerous as you can loose metadata information quite easily.
Best,
Nicolas
On 15/10/19 15:54, Juan Luis Rodríguez Ponce wrote:
On Tue, Oct 15, 2019 at 3:50 PM Juan Luis Rodríguez Ponce <juanluisrp@...444...<mailto:juanluisrp@…444…>> wrote:
On Tue, Oct 15, 2019 at 3:13 PM Nicolas De Ville de Goyet <ndeville@...1741...<mailto:ndeville@…1741…>> wrote:
Hello everyone,
We have been running into a problem since last year regarding the
mandatory ISO topicCategory keywords in our metadata.
As describe in this link, there is somewhere in geonetwork a function
that delete the topicCategory elements each time we try to edit a
metadata file.
http://osgeo-org.1560.x6.nabble.com/GeoNetwork-keywords-and-topicCategory-problem-td5394221.html
TopicCategory keywords are encoded like this:
<gmd:topicCategory>
<gmd:MD_TopicCategoryCode>biota</gmd:MD_TopicCategoryCode>
</gmd:topicCategory>
We tried to edit the file
/geonetwork/WEB-INF/data/config/schema_plugins/iso19139/present/metadata-edit.xsl
to solve the problem but we were unsuccessful so far.
You can check the file update-fixed-info.xsl [1] or the metadata schema to check if there is something removing those elements. This XSLT transformation is applied before saving the metadata in the database and index.
[1] https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl
This template removes any empty gmd:topicCategory element [1] but this doesn't seem to be your case.
<xsl:template
match="gmd:topicCategory[not(gmd:MD_TopicCategoryCode)]"
priority="10" />
[1] https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl#L249-L251
--
Vriendelijke groeten / Kind regards,
Juan Luis Rodríguez.
[https://www.geocat.net/wp-content/uploads/2015/07/GeoCat_small1.png\]<http://www.geocat.net/>
Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664<tel:+31318416664>
Please consider the environment before printing this email.
--
Nicolas de Ville
Belgian Marine Data Centre (BMDC)
OD-Nature, Royal Belgian Institute of Natural Sciences
02/627.42.79
www.bmdc.be<http://www.bmdc.be>
geonetwork.bmdc.be