[jsword-svn] jsword/java/jsword/org/crosswire/jsword/book/filter/thml s

jswordcvs at crosswire.org jswordcvs at crosswire.org
Sun Mar 6 11:13:30 MST 2005


Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/filter/thml
In directory www.crosswire.org:/tmp/cvs-serv24431/java/jsword/org/crosswire/jsword/book/filter/thml

Modified Files:
	THMLFilter.java 
Log Message:
Fixed up DataPolice a bit more.

Index: THMLFilter.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/filter/thml/THMLFilter.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** THMLFilter.java	5 Mar 2005 22:08:05 -0000	1.13
--- THMLFilter.java	6 Mar 2005 18:13:28 -0000	1.14
***************
*** 15,19 ****
  import org.crosswire.jsword.book.OSISUtil;
  import org.crosswire.jsword.book.filter.Filter;
- import org.crosswire.jsword.book.filter.FilterUtil;
  import org.crosswire.jsword.passage.Key;
  import org.jdom.Element;
--- 15,18 ----
***************
*** 66,73 ****
          catch (Exception ex1)
          {
!             DataPolice.report("parse (1) original failed: " + ex1.getMessage()); //$NON-NLS-1$
!             DataPolice.report("  while parsing: " + FilterUtil.forOutput(plain)); //$NON-NLS-1$
  
!             // Attempt to fix broken entities, that could be the least damage
              // way to fix a broken input string
              String cropped = XMLUtil.cleanAllEntities(plain);
--- 65,72 ----
          catch (Exception ex1)
          {
!             DataPolice.report("Parse failed: " + ex1.getMessage() + //$NON-NLS-1$
!                               "\non: " + plain); //$NON-NLS-1$
  
!             // Attempt to fix broken entities, that could be a low damage
              // way to fix a broken input string
              String cropped = XMLUtil.cleanAllEntities(plain);
***************
*** 79,84 ****
              catch (Exception ex2)
              {
!                 DataPolice.report("parse (2) cropped failed: " + ex2.getMessage()); //$NON-NLS-1$
!                 DataPolice.report("  while parsing: " + FilterUtil.forOutput(cropped)); //$NON-NLS-1$
  
                  // So just try to strip out all XML looking things
--- 78,82 ----
              catch (Exception ex2)
              {
!                 log.warn("Could not fix it by cleaning entities: " + ex2.getMessage()); //$NON-NLS-1$
  
                  // So just try to strip out all XML looking things
***************
*** 91,96 ****
                  catch (Exception ex3)
                  {
!                     DataPolice.report("parse (3) shawn failed: " + ex3.getMessage()); //$NON-NLS-1$
!                     DataPolice.report("  while parsing: " + FilterUtil.forOutput(shawn)); //$NON-NLS-1$
  
                      try
--- 89,93 ----
                  catch (Exception ex3)
                  {
!                     log.warn("Could not fix it by cleaning tags: " + ex3.getMessage()); //$NON-NLS-1$
  
                      try
***************
*** 102,106 ****
                      catch (Exception ex4)
                      {
!                         log.warn("no way. say it ain't so!", ex4); //$NON-NLS-1$
                      }
                  }
--- 99,103 ----
                      catch (Exception ex4)
                      {
!                         log.warn("no way. say it ain't so! " + ex4.getMessage()); //$NON-NLS-1$
                      }
                  }
***************
*** 109,112 ****
--- 106,110 ----
          finally
          {
+             // Make sure that other places don't report this problem
              DataPolice.setKey(null);
          }



More information about the jsword-svn mailing list