From: <ho...@us...> - 2006-12-31 17:26:18
|
Revision: 8977 http://svn.sourceforge.net/bibdesk/?rev=8977&view=rev Author: hofman Date: 2006-12-31 09:26:13 -0800 (Sun, 31 Dec 2006) Log Message: ----------- Change regex for MARCXML so it recognizes what we get from z39.50 servers. Mostly allowing single records instead of full xml. Modified Paths: -------------- trunk/bibdesk/BDSKMARCParser.m Modified: trunk/bibdesk/BDSKMARCParser.m =================================================================== --- trunk/bibdesk/BDSKMARCParser.m 2006-12-31 17:07:34 UTC (rev 8976) +++ trunk/bibdesk/BDSKMARCParser.m 2006-12-31 17:26:13 UTC (rev 8977) @@ -387,7 +387,7 @@ } - (BOOL)isMARCXMLString{ - AGRegex *regex = [AGRegex regexWithPattern:@"^ *<collection[^>]*>\n *<record>\n *<leader>[ \\-0-9]{5}[a-z]{3}[ a]{2}22[ \\-0-9]{5}[ 1-8uz][ \\-a-z][ \\-r]4500</leader>\n<controlfield tag=\"00[0-9]\">"]; + AGRegex *regex = [AGRegex regexWithPattern:@"<record( xmlns=\"[^<>\"]*\")?>\n *<leader>[ 0-9]{5}[a-z]{3}[ a]{2}22[ 0-9]{5}[ 1-8uz][ a-z][ r]4500</leader>\n *<controlfield tag=\"00[0-9]\">"]; return nil != [regex findInString:[self stringByNormalizingSpacesAndLineBreaks]]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |