Re: XML Metadata Insert gives "Root element notset"

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

Re: XML Metadata Insert gives "Root element notset"

John.Hockaday
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: [hidden email]
> [mailto:[hidden email]] On
> Behalf Of Andrea Carboni
> Sent: Wednesday, 13 September 2006 9:52 PM
> To: [hidden email]
> 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
> > [hidden email]
>
> --------------------------------------------------------------
> -----------
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork


Reply | Threaded
Open this post in threaded view
|

Re: XML Metadata Insert gives "Root elementnotset"

Pierre LAGARDE
Hi John,

I agree with you for the use of MD_Metadata instead of the DS_Dataset (or in
complement of).

We're working on the development of an import / export module for GN. We use
XSL 19139 --> 19115 files (import) and XSL 19115 --> 19139 file (export)
[like the migration tool of the GN 2.1]. A quick study with french partners
using the 19139 XML files showed us:
        - the use of MD_Metadata root
        - the "no-use" of xlink solutions.

So, for the first version, we don't integrate the management of the xlink.

I sent an additional mail to your mail about the gap between GN19115 and
19139 (I also listed in the bug tracking of GN opensource). Do you agree
with these differences?

If you're interested, we could send you the transformation files to check as
soon as possible...

Cheers,

Pierre

-----Message d'origine-----
De : [hidden email]
[mailto:[hidden email]] De la part de
[hidden email]
Envoyé : vendredi 29 septembre 2006 08:49
À : [hidden email]
Objet : Re: [GeoNetwork-users] XML Metadata Insert gives "Root
elementnotset"

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: [hidden email]
> [mailto:[hidden email]] On
> Behalf Of Andrea Carboni
> Sent: Wednesday, 13 September 2006 9:52 PM
> To: [hidden email]
> 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
> > [hidden email]
>
> --------------------------------------------------------------
> -----------
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--
Ce message a ete verifie par MailScanner pour des virus ou des polluriels et
rien de suspect n'a ete trouve.

Les donnees et renseignements contenus dans ce message sont personnels,
confidentiels et prives. Toute publication, utilisation ou diffusion, meme
partielle, doit etre autorisee.

Any data and information contained in this electronic mail is personal,
confidential and secret. Any total or partial publication, use or
distribution must be authorized.


--
Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n'a ete trouve.

Les donnees et renseignements contenus dans ce message sont personnels, confidentiels et prives. Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee.

Any data and information contained in this electronic mail is personal, confidential and secret. Any total or partial publication, use or distribution must be authorized.



Reply | Threaded
Open this post in threaded view
|

Re: XML Metadata Insert gives "Rootelementnotset"

Tim Jacobs
Hi John and Pierre,

I've been working for about 3 weeks to define an example XML metadata file
for
my imagery, using ISO 19139. I just finished it yesterday.

I can fully agree with

> - the use of MD_Metadata root
> - the "no-use" of xlink solutions.

The first is explicitly detailed in a document from ISO's TC 211 (the people
who defined ISO 19139).
In this document, the "core metadata" must start with MD_Metadata.

Altough the XLink technique is useful to avoid redundancy in the metadata,
it is -as far as I know- not largely supported, for instance in browsers.
Since our image users won't have fancy XML tools, they can't really take
advantage of the XLinks and XPointers. So, for now "no go" on XLink is my
policy too.

Best regards,

Tim
Belgium