NatLibFi / RecordManager

A metadata record management system written in PHP, intended to be used in conjunction with VuFind or another Solr-based discovery interface. Provides import, export, harvesting (OAI-PMH), normalization, deduplication and Solr index update functionality with support for multiple metadata formats. Also includes an OAI-PMH provider that can be used to access the data stored in RecordManager database. Functionality driven by simple command line programs for easy automation.
GNU General Public License v2.0
47 stars 31 forks source link

Added support for guessing the namespace of metadata which fails to process #2

Closed EeroHeikkinen closed 12 years ago

EeroHeikkinen commented 12 years ago

The XML library SimpleXML used by RecordManager can't process XML data which uses namespaces unless it's explicitly supplied with the correct namespace. Currently trying to harvest such data results in the message "No metadata found for record".

This update tries to guess the right namespace by calling SimpleXMLElement::getNamespaces and retrying processing on any records which seem to be empty.

If however strict enforcing of namespaces is desired, then a more fine-grained solution would be needed.