You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Kelly Campbell <ca...@camk.net> on 2000/11/04 19:55:27 UTC

patch for unknown fo's

I was running into a problem with formatting a Docbook file with the current
cvs version of FOP because the stylesheet I am using (Norm Walsh's dbx 1.2.3
version) outputs some <i> tags into the fo version for some reason 
(probably something from the html version).

The error was this:
 [6] [7FATAL ERROR: -1000 < 0
java.lang.ArrayIndexOutOfBoundsException: -1000 < 0
	at java.util.Vector.elementAt(Vector.java:451)
	at org.apache.fop.fo.FObjMixed.layout(FObjMixed.java:104)
	at org.apache.fop.fo.FObjMixed.layout(FObjMixed.java:106)
	at org.apache.fop.fo.flow.Block.layout(Block.java:298)

note: I added the stacktrace output to the catch (Exception e) in 
CommandLine.java

I traced this down to the FObjMixed being created with a null property list.
Here's a simple patch to fix this:

--- FOTreeBuilder.java~	Sat Nov  4 09:38:54 2000
+++ FOTreeBuilder.java	Sat Nov  4 10:54:31 2000
@@ -266,6 +266,10 @@
 		  list = currentListBuilder.makeList(fullName, attlist,  
 			(currentFObj == null) ? null : currentFObj.properties);
 		}
+		else {
+		    list = currentFObj.properties;
+		}
+		
 	    fobj = fobjMaker.make(currentFObj, list);
 	} catch (FOPException e) {
 		throw new SAXException(e);

-Kelly
-- 
Kelly A. Campbell                        Software Engineer
camk@channelpoint.com                    Channelpoint, Inc.
camk@merlotxml.org                       Colorado Springs, Co.

Re: patch for unknown fo's

Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
Hi, Kelly

I would recommend sitting on this until we get Karen Lease's properties 
modifications put into CVS. The changes and upgrades are extensive, and 
probably fix this kind of thing.

Perhaps, if you'd be so kind, you could keep an eye out for when you can 
retest, retest, and then let us know if it is still an issue? In the interim 
few weeks, the patch is here for anyone who needs it right away, and thank
you.

Arved

At 11:55 AM 11/4/00 -0700, Kelly Campbell wrote:
>I was running into a problem with formatting a Docbook file with the current
>cvs version of FOP because the stylesheet I am using (Norm Walsh's dbx 1.2.3
>version) outputs some <i> tags into the fo version for some reason 
>(probably something from the html version).
>
>The error was this:
> [6] [7FATAL ERROR: -1000 < 0
>java.lang.ArrayIndexOutOfBoundsException: -1000 < 0
>	at java.util.Vector.elementAt(Vector.java:451)
>	at org.apache.fop.fo.FObjMixed.layout(FObjMixed.java:104)
>	at org.apache.fop.fo.FObjMixed.layout(FObjMixed.java:106)
>	at org.apache.fop.fo.flow.Block.layout(Block.java:298)
>
>note: I added the stacktrace output to the catch (Exception e) in 
>CommandLine.java
>
>I traced this down to the FObjMixed being created with a null property list.
>Here's a simple patch to fix this:
>
>--- FOTreeBuilder.java~	Sat Nov  4 09:38:54 2000
>+++ FOTreeBuilder.java	Sat Nov  4 10:54:31 2000
>@@ -266,6 +266,10 @@
> 		  list = currentListBuilder.makeList(fullName, attlist,  
> 			(currentFObj == null) ? null : currentFObj.properties);
> 		}
>+		else {
>+		    list = currentFObj.properties;
>+		}
>+		
> 	    fobj = fobjMaker.make(currentFObj, list);
> 	} catch (FOPException e) {
> 		throw new SAXException(e);
>
>-Kelly
>-- 
>Kelly A. Campbell                        Software Engineer
>camk@channelpoint.com                    Channelpoint, Inc.
>camk@merlotxml.org                       Colorado Springs, Co.
>
>
Senior Developer
e-plicity.com (www.e-plicity.com)
Halifax, Nova Scotia
"B2B Wireless in Canada's Ocean Playground"