Opened 12 years ago

Last modified 12 years ago

#909 closed defect

Import / IllegalArgumentException when undeclared namespace is declared — at Initial Version

Reported by: fxp Owned by: geonetwork-devel@…
Priority: minor Milestone: v2.7.0
Component: General Version:
Keywords: Cc:

Description

Import a metadata with an unused namespace without prefix trigger:

IllegalArgumentException : Namespace with no prefix. Cannot find a namespace URI to set for element gmd:MD_Metadata - namespace URI http://www.geosource.fr/2006/rpc

Example:

<?xml version="1.0" encoding="UTF-8"?>
<gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd"
                 xmlns="http://undeclared/namespace/in/schema/ident"

The metadata is valid and should be imported.

Change History (1)

by fxp, 12 years ago

Attachment: 909.patch added

Raise a warning instead and load the metadata properly. Fix namespace URI in error message too.

Note: See TracTickets for help on using tickets.