Revision: 18515
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18515&view=rev
Author:   hofman
Date:     2012-02-22 15:49:55 +0000 (Wed, 22 Feb 2012)
Log Message:
-----------
modify MARC XML regex to allow for some extra attributes

Modified Paths:
--------------
    trunk/bibdesk/BDSKMARCParser.m

Modified: trunk/bibdesk/BDSKMARCParser.m
===================================================================
--- trunk/bibdesk/BDSKMARCParser.m      2012-02-20 21:47:58 UTC (rev 18514)
+++ trunk/bibdesk/BDSKMARCParser.m      2012-02-22 15:49:55 UTC (rev 18515)
@@ -465,7 +465,7 @@
 }
 
 - (BOOL)isMARCXMLString{
-    AGRegex *regex = [AGRegex regexWithPattern:@"<(marc:)?record( 
xmlns(:marc)?=\"[^<>\"]*\")?>\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|type|id)(:marc)?=\"[^<>\"]*\")*>\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)200);
     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.


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to