I think there is not a more forgiving parser. The ISO2709 spec breaks when a record reaches 100000 octets. I don't see any way around that in the parser. The best solution I can come up with, if you want to hold to the spec, is to create a seperate ISO2709 blob with a logical link to the first when a record reaches 100000 octets. I don't know if that could be implemented in the parser though. I think that any other way will result in either a broken record or a broken parser. On Wed, May 9, 2012 at 1:23 AM, Julian Maurice <julian.maurice@biblibre.com>wrote:
Le 07/05/2012 17:30, Galen Charlton a écrit :
Hi,
Hi!
On May 4, 2012, at 10:38 AM, Julian Maurice wrote:
In order to close this discussion, I created a ticket on rt.cpan.org ( https://rt.cpan.org/Public/**Bug/Display.html?id=76990<https://rt.cpan.org/Public/Bug/Display.html?id=76990>) and attached a patch to force record length to not be greater than 99999 in the leader.
This would have the effect of having MARC::Record output invalid records that we *know* are invalid. There's no way around it -- an ISO2709 blob can be no longer than 99999 octets, and a strict parser (a couple of which do exist in the wild) would drop records where the Leader/05 does not match the length of the record as determined by the location of the record terminator character.
Actually, MARC::Record will always output invalid records if they're longer than 99999 bytes. But with the patch, at least the leader is well-formed (24 chars long).
I'm much more inclined to accept a patch to MARC::Record that introduces a more forgiving input parsing mode.
What do you mean by "a more **forgiving** input parsing mode" ?
-- Julian Maurice <julian.maurice@biblibre.com> BibLibre ______________________________**_________________ Koha-devel mailing list Koha-devel@lists.koha-**community.org<Koha-devel@lists.koha-community.org> http://lists.koha-community.**org/cgi-bin/mailman/listinfo/**koha-devel<http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.**org/ <http://bugs.koha-community.org/>