Revision 5649
Added by Duane Costa about 14 years ago
src/edu/ucsb/nceas/metacat/oaipmh/provider/server/crosswalk/Eml200.java | ||
---|---|---|
75 | 75 |
String emlDoc = xmlRec.trim(); |
76 | 76 |
|
77 | 77 |
/* |
78 |
* Remove the lead xml processing instruction because the document is going
|
|
78 |
* Remove leading XML processing instructions because the document is going
|
|
79 | 79 |
* to be placed inside an OAI <metadata> element. |
80 | 80 |
*/ |
81 |
if (emlDoc.startsWith("<?")) {
|
|
81 |
while (emlDoc.startsWith("<?")) {
|
|
82 | 82 |
int offset = emlDoc.indexOf("?>"); |
83 |
emlDoc = emlDoc.substring(offset + 2); |
|
83 |
emlDoc = emlDoc.substring(offset + 2).trim();
|
|
84 | 84 |
} |
85 | 85 |
|
86 | 86 |
return emlDoc; |
src/edu/ucsb/nceas/metacat/oaipmh/provider/server/crosswalk/Eml201.java | ||
---|---|---|
75 | 75 |
String emlDoc = xmlRec.trim(); |
76 | 76 |
|
77 | 77 |
/* |
78 |
* Remove the lead xml processing instruction because the document is going
|
|
78 |
* Remove leading XML processing instructions because the document is going
|
|
79 | 79 |
* to be placed inside an OAI <metadata> element. |
80 | 80 |
*/ |
81 |
if (emlDoc.startsWith("<?")) {
|
|
81 |
while (emlDoc.startsWith("<?")) {
|
|
82 | 82 |
int offset = emlDoc.indexOf("?>"); |
83 |
emlDoc = emlDoc.substring(offset + 2); |
|
83 |
emlDoc = emlDoc.substring(offset + 2).trim();
|
|
84 | 84 |
} |
85 | 85 |
|
86 | 86 |
return emlDoc; |
src/edu/ucsb/nceas/metacat/oaipmh/provider/server/crosswalk/Eml210.java | ||
---|---|---|
75 | 75 |
String emlDoc = xmlRec.trim(); |
76 | 76 |
|
77 | 77 |
/* |
78 |
* Remove the lead xml processing instruction because the document is going
|
|
78 |
* Remove leading XML processing instructions because the document is going
|
|
79 | 79 |
* to be placed inside an OAI <metadata> element. |
80 | 80 |
*/ |
81 |
if (emlDoc.startsWith("<?")) {
|
|
81 |
while (emlDoc.startsWith("<?")) {
|
|
82 | 82 |
int offset = emlDoc.indexOf("?>"); |
83 |
emlDoc = emlDoc.substring(offset + 2); |
|
83 |
emlDoc = emlDoc.substring(offset + 2).trim();
|
|
84 | 84 |
} |
85 | 85 |
|
86 | 86 |
return emlDoc; |
Also available in: Unified diff
Bug fix for #5241: OAI-PMH: ListRecords verb returns content containing XML processing instructions.