Hi All,
This is not the intended solution of ISO 19115 and ISO 19139. Yes the
DS_DataSet is the root element for an aggregation of datasets and metadata
but if one wishes to just provide metadata then MD_Metadata can be used as
the root element.
The header for the XML document would look like this:
<?xml version="1.0" encoding="UTF-8" ?>
<MD_Metadata xmlns="http://www.isotc211.org/2005/gmd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.isotc211.org/2005/gmd
http://www.isotc211.org/2005/gmd/metadataEntity.xsd">
<fileIdentifier>
...
</MD_Metadata>
Note that the root element is MD_Metadata and that the schemaLocation is
different to that of the DS_DataSet metadata record.
This is the wonderful flexibility of the ISO 19115 and ISO 19139 XML
implementation. I think that I sent an email around a while ago indicating
that the different entities of ISO 19115/139 can exist independently as XML
document instances. These entity document instances can be referenced from
within a DS_DataSet or MD_Metadata XML document instances using the XLINK
option and hence reuse of these entities is available. (A partial solution to
inheritance.) The problem is that the Tool presenting or accessing these XML
document instance must be able to implement XLINK if the reuse of these
entities is to be available.
In summary, an MD_Metadata root element for a metadata XML document is valid
as long as you use the correct schemaLocation and namespace. Willem's
example has the wrong root element "Metadata", and the schemaLocation is not
provided. Xerces-J will properly validate the XML document instance against
the ISO 19139 XSDs if the XML document instance uses MD_Metadata as the root
element, the correct nameSpace and schemaLocation are provided and a proper
OASIS catalogue file is used to look at local copies of the XSDs. (The latter
is not necessary if access to the internet is available without going through
a firewall.)
I certainly hope that GeoNetwork does *not* require the root element to be
DS_DataSet and that MD_Metadata can be used because there are many metadata
records that are not aggregates for a dataset. That is, there will be many
metadata instances that don't have direct relations to datasets.
I hope that this helps.
John
-----Original Message-----
From: geonetwork-users-bounces@lists.sourceforge.net
[mailto:geonetwork-users-bounces@lists.sourceforge.net] On
Behalf Of Andrea Carboni
Sent: Wednesday, 13 September 2006 9:52 PM
To: geonetwork-users@lists.sourceforge.net
Subject: Re: [GeoNetwork-users] XML Metadata Insert gives
"Root element notset"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
> nieuwenhuis@anonymised.com--------------------------------------------------------------
-----------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to make
your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&
dat=121642
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork