Closed josegar74 closed 7 months ago
The problem seem when serializing the snippet to send in https://github.com/geonetwork/core-geonetwork/blob/develop/web/src/main/webapp/xslt/ui-metadata/form-builder.xsl#L599-L600, it gets added the extra namespaces.
Adding elements defined as snippets in the metadata editor (for example in the INSPIRE view), the elements get some extra namespaces that are not used in the element. For example:
gmx
andsrv
can be avoided if the template would contain them in the header. But not really sure why are added, should be better not to add them at all as not really used inside the metadata (at least for the default dataset template)gn
is a bit more tricky as it's a defined asxmlns:gn="http://www.fao.org/geonetwork'
, but that url is used in other places forgeonet
namespace. I guess at least that should be unified.I suspect the issue is related to the namespaces defined in https://github.com/geonetwork/core-geonetwork/blob/develop/web/src/main/webapp/xslt/ui-metadata/edit/edit.xsl#L25-L33, but I would expect that
exclude-result-prefixes="#all"
would manage this nicely.Another issue related to
geonet
namespace is that when saving the metadata the xml header gets the definition of this "internal" namespace, what is not good.