Project

General

Profile

Bug #5241

OAI-PMH: ListRecords verb returns content containing XML processing instructions

Added by Duane Costa almost 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
metacat
Target version:
Start date:
11/16/2010
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
5241

Description

When returning lists of EML records, the ListRecords verb may return content that contains XML processing instructions within the OAI-PMH <metadata> elements. The <metadata> elements should contain only XML elements, with all XML processing instructions stripped out of the metadata content.

There is a logical bug in the data provider crosswalk logic for EML 2.0.0, EML 2.0.1, and EML 2.1.0 documents. It strips off the first XML processing instruction before inserting the document into the <metadata> element. For example:

<!-- This gets stripped off -->

But if there is more than one processing instruction, only the first gets stripped off and the rest are placed inside the <metadata> element:

<!-- This gets stripped off -->
href="../../style/eml/eml-2.0.0.xsl"?>

The code should be modified to strip off all leading XML processing instructions.

History

#1 Updated by Duane Costa almost 9 years ago

Fixed with the following update:

Author: costa
Date: 2010-11-16 12:42:27 -0800 (Tue, 16 Nov 2010)
New Revision: 5649

Modified:
trunk/src/edu/ucsb/nceas/metacat/oaipmh/provider/server/crosswalk/Eml200.java
trunk/src/edu/ucsb/nceas/metacat/oaipmh/provider/server/crosswalk/Eml201.java
trunk/src/edu/ucsb/nceas/metacat/oaipmh/provider/server/crosswalk/Eml210.java
Log:
Bug fix for #5241: OAI-PMH: ListRecords verb returns content containing XML processing instructions.

#2 Updated by Redmine Admin over 6 years ago

Original Bugzilla ID was 5241

Also available in: Atom PDF