XML Metadata Insert gives "Root element not set"

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

XML Metadata Insert gives "Root element not set"

Willem Nieuwenhuis
If I try to import metadata through "XML Metadata Insert" on the
following file, geonetwork reacts with an error message: "Root element
not set"

<?xml version="1.0" encoding="UTF-8"?>
<Metadata xmlns="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
</Metadata>

If I remove the namespace attributes the import works.

Any idea what causes this behaviour?

Willem Nieuwenhuis
[hidden email]
 


Reply | Threaded
Open this post in threaded view
|

Re: XML Metadata Insert gives "Root element not set"

Andrea Carboni-2
Hi Willem,

did you select the right schema? If you are trying to add a 19139 metadata
you have to provide the full iso 19139 structure. Example:

<DS_DataSet xmlns="http://www.isotc211.org/2005/gmd"
                                xmlns:gts="http://www.isotc211.org/2005/gts"
                                xmlns:gco="http://www.isotc211.org/2005/gco"
                                xmlns:gml="http://www.opengis.net/gml"
                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <has>
    <MD_Metadata>
                 ...
    </MD_Metadata>
  </has>
</DS_DataSet>

Cheers,
Andrea

> If I try to import metadata through "XML Metadata Insert" on the
> following file, geonetwork reacts with an error message: "Root element
> not set"
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Metadata xmlns="http://www.opengis.net/gml"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> </Metadata>
>
> If I remove the namespace attributes the import works.
>
> Any idea what causes this behaviour?
>
> Willem Nieuwenhuis
> [hidden email]