Bug #5241
closedOAI-PMH: ListRecords verb returns content containing XML processing instructions
0%
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.
Updated by Duane Costa almost 14 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.