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 Manuel Mall <mm...@arcus.com.au> on 2006/02/02 11:28:50 UTC

table_width.xml testcase fails

After just upgrading to the latest svn version I get a test case 
failure. As I haven't updated for a few days I am not sure which patch 
caused this.

Manuel

[junit] Testcase: 
table_width.xml(org.apache.fop.layoutengine.LayoutEngineTestSuite$1):     
Caused an ERROR
    [junit] Expected XPath expression to evaluate to '360000', but got 
'' (XPath: //flow/block[1]/@ipd)
    [junit] java.lang.RuntimeException: Expected XPath expression to 
evaluate to '360000', but got '' (XPath: //flow/block[1]/@ipd)

Re: table_width.xml testcase fails

Posted by Manuel Mall <mm...@arcus.com.au>.
On Friday 03 February 2006 01:30, Andreas L Delmelle wrote:
> On Feb 2, 2006, at 12:10, Jeremias Maerki wrote:
<snip/>
> I'm clueless as to where this comes from, since I don't remember
> having altered this myself (so, I have absolutely no idea *why* I
> would have altered it)... maybe I've just had too much on my mind the
> last few weeks :-/
>

See http://marc.theaimsgroup.com/?l=fop-dev&m=113701529418403&w=2

> If this change makes sense/looks OK to you, then I'll commit it ASAP.
> (If none of you beat me to it, that is...)
>
> Cheers,
>
> Andreas
>
<snip/>
> > Jeremias Maerki

Manuel

Re: table_width.xml testcase fails

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Feb 2, 2006, at 12:10, Jeremias Maerki wrote:

Hi guys,

Weird. The test in question passes w/o problems on my side... Just  
made a diff of the complete sources, and stumbled upon this:

Index: src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
===================================================================
--- src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java	 
(revision 374438)
+++ src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java	(working  
copy)
@@ -363,9 +363,11 @@
          // index of the first KnuthBox in the sequence
          int firstBoxIndex = startIndex;
-        while (alignment != org.apache.fop.fo.Constants.EN_CENTER
-               && ! ((KnuthElement) par.get(firstBoxIndex)).isBox()) {
-            firstBoxIndex++;
+        if (alignment != org.apache.fop.fo.Constants.EN_CENTER) {
+            while (par.size() > firstBoxIndex
+                    && ! ((KnuthElement) par.get 
(firstBoxIndex)).isBox()) {
+                firstBoxIndex++;
+            }
          }

I'm clueless as to where this comes from, since I don't remember  
having altered this myself (so, I have absolutely no idea *why* I  
would have altered it)... maybe I've just had too much on my mind the  
last few weeks :-/

If this change makes sense/looks OK to you, then I'll commit it ASAP.  
(If none of you beat me to it, that is...)

Cheers,

Andreas

> I don't know, either. It looks like the line breaker is stumbling  
> over a
> Knuth sequence without a single box due to an FOText with only
> whitespace (IndexOutOfBoundsException in BreakingAlgorithm, line  
> 367). I
> guess it must have something to do with the recent changes in  
> whitespace
> handling.
>
> On 02.02.2006 11:28:50 Manuel Mall wrote:
>> After just upgrading to the latest svn version I get a test case
>> failure. As I haven't updated for a few days I am not sure which  
>> patch
>> caused this.
>>
>> Manuel
>>
>> [junit] Testcase:
>> table_width.xml(org.apache.fop.layoutengine.LayoutEngineTestSuite$1):
>> Caused an ERROR
>>     [junit] Expected XPath expression to evaluate to '360000', but  
>> got
>> '' (XPath: //flow/block[1]/@ipd)
>>     [junit] java.lang.RuntimeException: Expected XPath expression to
>> evaluate to '360000', but got '' (XPath: //flow/block[1]/@ipd)
>
>
>
> Jeremias Maerki
>
>


Re: table_width.xml testcase fails

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I don't know, either. It looks like the line breaker is stumbling over a
Knuth sequence without a single box due to an FOText with only
whitespace (IndexOutOfBoundsException in BreakingAlgorithm, line 367). I
guess it must have something to do with the recent changes in whitespace
handling.

On 02.02.2006 11:28:50 Manuel Mall wrote:
> After just upgrading to the latest svn version I get a test case 
> failure. As I haven't updated for a few days I am not sure which patch 
> caused this.
> 
> Manuel
> 
> [junit] Testcase: 
> table_width.xml(org.apache.fop.layoutengine.LayoutEngineTestSuite$1):     
> Caused an ERROR
>     [junit] Expected XPath expression to evaluate to '360000', but got 
> '' (XPath: //flow/block[1]/@ipd)
>     [junit] java.lang.RuntimeException: Expected XPath expression to 
> evaluate to '360000', but got '' (XPath: //flow/block[1]/@ipd)



Jeremias Maerki