geonetwork / geonetwork/core-geonetwork
xml not having namespace name in schemalocation is allowed if gmd is default namespace?
- Dominant language
- Java
- Stars
- 521
- Forks
- 514
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 19
Description
This is a bit guessing here, because i'm not fully aware of the specs, I noticed the attached record invalidates in geonetwork because it seems due to improperly unsetting gmd as the default namespace
Record has this as a header (gmd is default namespace)
```xml
```
Some xml parsers seem to allow to omit the namespace hint in schemalocation if gmd is the default namespace.
At import GeoNetwork unsets gmd as the default namespace but neglects to add the namespace hint to the schemalocation, then gn throws an error at validation:
```
SchemaLocation: schemaLocation value = 'http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd' must have even number of URI's. (Element: gmd:MD_Metadata with parent element: Unknown)
```
[Geomagazijn.GEO.NAT_NNN_NATUURNETWERKNL.xml.zip](https://github.com/geonetwork/core-geonetwork/files/4063941/Geomagazijn.GEO.NAT_NNN_NATUURNETWERKNL.xml.zip)
Contributor guide
Assessment
This issue has not been assessed yet.