Ticket #909 (closed defect: fixed)

Opened 12 months ago

Last modified 12 months ago

Import / IllegalArgumentException when undeclared namespace in schema is used as default namespace

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

Description (last modified by fxp) (diff)

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://undeclared/namespace/in/schema

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"

The metadata is valid and should be imported.

Attachments

909.patch Download (1.8 KB) - added by fxp 12 months ago.
Raise a warning instead and load the metadata properly. Fix namespace URI in error message too.

Change History

Changed 12 months ago by fxp

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

Changed 12 months ago by fxp

  • status changed from new to closed
  • resolution set to fixed
  • description modified (diff)
  • summary changed from Import / IllegalArgumentException when undeclared namespace is declared to Import / IllegalArgumentException when undeclared namespace in schema is used as default namespace

Committed revision 9133.

Changed 12 months ago by fxp

Committed revision 9134 (2.8.x).

Note: See TracTickets for help on using tickets.