LibreCat / Catmandu-SRU

Catmandu module for working with SRU data.
https://metacpan.org/release/Catmandu-SRU
5 stars 5 forks source link

Add support for namespace prefixes #22

Closed jorol closed 7 years ago

jorol commented 7 years ago

Catmandu::Importer::SRU::Parser::marcxml doesn't support MARC XML records where namespace prefixes are used. A problem is that the namespace could be declared at top of the SRU response and not in the single MARC XML records which are passed to Catmandu::Importer::SRU::Parser::marcxml. So I used a hack to implement this: check if a prefix is used and add the namespace to the \<record> element.

phochste commented 7 years ago

I changed the code a bit and replaced the regex search replace with copying all root level namespace declarations in the record elements already in the SRU parser. This way all the SRU formats can be supported.

jorol commented 7 years ago

Thanks!