[GeoNetwork-devel] [GeoNetwork opensource Developer website] #756: Valid metadata fails to import if it has spurious namespace declaration

#756: Valid metadata fails to import if it has spurious namespace declaration
-----------------------------+----------------------------------------------
Reporter: heikki | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.7.0
Component: General | Version:
Keywords: import metadata |
-----------------------------+----------------------------------------------
The attached file, which is a valid ISO19139 metadata, cannot be imported
in GN trunk. You get the message "Root Element Not Set".

If you remove the csw namespace declaration from the root element, the
problem disappears.

GeoNetwork should be able to import all valid ISO19139 metadata.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/756&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#756: Valid metadata fails to import if it has spurious namespace declaration
----------------------+-----------------------------------------------------
  Reporter: heikki | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: major | Milestone: v2.7.0
Component: General | Version:
Resolution: fixed | Keywords: import metadata
----------------------+-----------------------------------------------------
Changes (by simonp):

  * status: new => closed
  * resolution: => fixed

Comment:

Change base iso19139 schema autodetect rule to use the root element
gmd:MD_Metadata
and thus trap this record as belonging to iso19139

Schema autodetect rules are evaluated in order of how specific they are:

- first are those rules that search for an element + value or attribute +
value
- then the root element rules are evaluated
- then a namespace match is attempted
- finally, if all of the above fails, the default schema config.xml value
is used

It's appropriate that base schemas like iso19139 use a root element rule
and profiles of iso19139 use either element/attribute search if they don't
change the root element or
their own separate root element rule if they do change the root element

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/756#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.