[jsword-svn]
jsword/java/jsword/org/crosswire/jsword/book/filter/osis s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Fri Mar 4 05:52:53 MST 2005
Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/filter/osis
In directory www.crosswire.org:/tmp/cvs-serv8751/java/jsword/org/crosswire/jsword/book/filter/osis
Modified Files:
OSISFilter.java
Log Message:
Worked on improving the html whitespace problems. This was made evident with NASB.
Fixed the NASB strongs problem.
Changed the output of errors on OSIS parsing to include the entire text.
Index: OSISFilter.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/filter/osis/OSISFilter.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** OSISFilter.java 16 Aug 2004 22:08:45 -0000 1.10
--- OSISFilter.java 4 Mar 2005 12:52:51 -0000 1.11
***************
*** 49,62 ****
public List toOSIS(String plain) throws FilterException
{
! Element ele = OSISUtil.factory().createDiv();
try
{
! parse(ele, plain);
}
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 a low damage
--- 49,64 ----
public List toOSIS(String plain) throws FilterException
{
! // Element ele = OSISUtil.factory().createDiv();
+ Element ele = null;
try
{
! ele = parse(plain);
}
catch (Exception ex1)
{
! DataPolice.report("parse (1) original failed: " + ex1.getMessage() + //$NON-NLS-1$
! "\n while parsing: " + plain); //$NON-NLS-1$
! // DataPolice.report(" while parsing: " + FilterUtil.forOutput(plain)); //$NON-NLS-1$
// Attempt to fix broken entities, that could be a low damage
***************
*** 66,70 ****
try
{
! parse(ele, cropped);
}
catch (Exception ex2)
--- 68,72 ----
try
{
! ele = parse(cropped);
}
catch (Exception ex2)
***************
*** 78,82 ****
try
{
! parse(ele, shawn);
}
catch (Exception ex3)
--- 80,84 ----
try
{
! ele = parse(shawn);
}
catch (Exception ex3)
***************
*** 105,109 ****
* crack at parsing it
*/
! private void parse(Element ele, String plain) throws JDOMException, IOException
{
// create a root element to house our document fragment
--- 107,111 ----
* crack at parsing it
*/
! private Element parse(String plain) throws JDOMException, IOException
{
// create a root element to house our document fragment
***************
*** 118,123 ****
// itself
! List data = div.removeContent();
! ele.addContent(data);
}
--- 120,125 ----
// itself
! // List data = div.removeContent();
! return div;
}
More information about the jsword-svn
mailing list