[sword-svn] r264 - trunk/modules/geneve

refdoc at crosswire.org refdoc at crosswire.org
Thu Dec 31 02:35:52 MST 2009


Author: refdoc
Date: 2009-12-31 02:35:52 -0700 (Thu, 31 Dec 2009)
New Revision: 264

Modified:
   trunk/modules/geneve/wb.pl
Log:
getting closer


Modified: trunk/modules/geneve/wb.pl
===================================================================
--- trunk/modules/geneve/wb.pl	2009-12-31 02:21:41 UTC (rev 263)
+++ trunk/modules/geneve/wb.pl	2009-12-31 09:35:52 UTC (rev 264)
@@ -3,12 +3,17 @@
 sub vs2osisref {
        
         my $context = $_[0];
-        $context =~ s/([12345]?[A-Z][a-z]+).*/$1/;
+        $context =~ s/([12345]?[A-Z][a-z]+)\ .*/$1/;
 
         my $ref = $_[0];
-        $ref =~ s/([12345]?[A-Z][a-z]+)\ (.*)/$1:$2/;        
-        `vs2osisref $ref $context de`;
-        chomp;
+        
+        
+        $ref =~ s/,/:/;
+        
+#        print ("I received", $_[0]," split into ref:", $ref, " and context :",$context."\n");
+              
+        my $return = `vs2osisref "$ref" $context de`;
+        chop($return)
         }
 
 
@@ -37,18 +42,20 @@
                 s/<c\ style=\"Kursiv ZF\"\ >(.*?)<\/c>/<hi rend=\"italic\">$1<\/hi>/g;
 
                 # references
-                s/(([12345]?[A-Z][a-z]+)(;?\ [0-9]+(,[0-9]+(\-[0-9]+)?)?)+)(\ |\)|;)/<r>$1<\/r>$^N/g;
+                s/(([12345]?[A-Z][a-z]+)(;?\ [0-9]+(,[0-9]+(\-[0-9]+)?)?)+)(\ |\)|;)/ &vs2osisref("$1").$^N/eg;
                 
-#                s/<r>(.*?)<\/r>/&vs2osisref($1)/eg;
+ #               s/<r>(.*?)<\/r>/&vs2osisref($1)/eg;
                 
                 # clean up
                 s/<c.*?>//g;
                 s/<\/c\s*>//g;
                 			              
 	}
-        print (USFM "<?xml\ version=\"1.0\"\ encoding=\"utf-8\"?>\n<TEI\ xmlns=\"http://www.crosswire.org/2008/TEIOSIS/namespace\"\nxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
- xsi:schemaLocation=\"http://www.crosswire.org/2008/TEIOSIS/namespace
- http://www.crosswire.org/OSIS/teiP5osis.1.4.xsd\">
+        print (USFM "<?xml\ version=\"1.0\"\ encoding=\"utf-8\"?>\n
+        <TEI\ xmlns=\"http://www.crosswire.org/2008/TEIOSIS/namespace\"\n
+          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
+          xsi:schemaLocation=\"http://www.crosswire.org/2008/TEIOSIS/namespace
+          http://www.crosswire.org/OSIS/teiP5osis.1.4.xsd\">
  
  <teiHeader>
  <fileDesc>




More information about the sword-cvs mailing list