Opened 12 years ago

Closed 12 years ago

#756 closed defect (fixed)

Valid metadata fails to import if it has spurious namespace declaration

Reported by: heikki Owned by: geonetwork-devel@…
Priority: major Milestone: v2.7.0
Component: General Version:
Keywords: import metadata Cc:

Description

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.

Attachments (1)

gemeentegelderlandiso19139.xml (28.2 KB ) - added by heikki 12 years ago.

Download all attachments as: .zip

Change History (2)

by heikki, 12 years ago

comment:1 by simonp, 12 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.