Revision: 29214 http://sourceforge.net/p/bibdesk/svn/29214 Author: hofman Date: 2025-04-27 15:18:49 +0000 (Sun, 27 Apr 2025) Log Message: ----------- Allow xml without newlines between element for MARC XML
Modified Paths: -------------- trunk/bibdesk/BDSKMARCParser.m Modified: trunk/bibdesk/BDSKMARCParser.m =================================================================== --- trunk/bibdesk/BDSKMARCParser.m 2025-04-27 14:21:39 UTC (rev 29213) +++ trunk/bibdesk/BDSKMARCParser.m 2025-04-27 15:18:49 UTC (rev 29214) @@ -449,7 +449,7 @@ } - (BOOL)isMARCXMLString{ - AGRegex *regex = [AGRegex regexWithPattern:@"<(marc:)?record( xmlns(:marc)?=\"[^<>\"]*\")?( (marc:)?(type|id)=\"[^<>\"]*\")*>\n *<(marc:)?leader>[ 0-9]{5}[a-z]{3}[ a]{2}22[ 0-9]{5}[ 1-8uz][ a-z][ r]45[ 0A-Z]0</(marc:)?leader>\n *<(marc:)?controlfield tag=\"00[0-9]\">"]; + AGRegex *regex = [AGRegex regexWithPattern:@"<(marc:)?record( xmlns(:marc)?=\"[^<>\"]*\")?( (marc:)?(type|id)=\"[^<>\"]*\")*>\n? *<(marc:)?leader>[ 0-9]{5}[a-z]{3}[ a]{2}22[ 0-9]{5}[ 1-8uz][ a-z][ r]45[ 0A-Z]0</(marc:)?leader>\n? *<(marc:)?controlfield tag=\"00[0-9]\">"]; NSUInteger maxLen = MIN([self length], (NSUInteger)300); return nil != [regex findInString:[[self substringToIndex:maxLen] stringByNormalizingSpacesAndLineBreaks]]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit