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 Andreas L Delmelle <a_...@pandora.be> on 2005/09/13 19:49:47 UTC

FOTree test question

Hi,

I can describe the case only, since I can't commit my changes yet (they 
still break a few layout tests), so please ask further if you don't 
have enough info to form an idea of my changes.
Maybe better to wait to when I commit my stuff to a branch --tomorrow 
or Thursday--, so you get a clearer view, but anyway...

Sketch of the changes:
In my local copy, I have added a new Maker subclass for the 
column-number property.
It works in combination with an added columnIndex instance variable in 
the related FObjs (Table/TableBody/TableRow), which is updated in 
addChildNode() (if the child-node is a TableColumn/TableCell).

Very roughly, the new ColumnNumberProperty.make() does something like 
this:

if( fo.getNameId() == FO_TABLE_CELL || fo.getNameId() == 
FO_TABLE_COLUMN ) {
    //return the parent's current columnIndex
} else {
    //tried two things here:
    //1) return null
    //2) throw a PropertyException
}

All seems to work nicely if I trace it using log.debug(), but I wanted 
to include some junit tests.

Problem is that the tests fail because:
- either an exception is thrown because the property is specified on 
'null'
- or the property evaluates to 'null' instead of the expected '1'.

The related fragments of the test-case look like:

<fo:table-column column-width="100%">
   <test:assert property="column-number" expected="1" />
</fo:table-column>
...
<fo:table-cell>
   <test:assert property="column-number" expected="1" />
   <fo:block>cell content</fo:block>
</fo:table-cell>


Any idea what I am missing/doing wrong? Any insights appreciated.

TIA!

Cheers,

Andreas


Re: FOTree test question

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Sep 13, 2005, at 22:06, Finn Bock wrote:

> [Andreas]
>
>> Very roughly, the new ColumnNumberProperty.make() does something like 
>> this:
>
> That should be ColumnNumberPropertyMaker in order to follow the naming 
> of all the other custom makers.

OK, I'll keep that in mind... Shouldn't it be 
TableBorderPrecedenceMaker as well then?

Cheers,

Andreas


Re: FOTree test question

Posted by Finn Bock <bc...@worldonline.dk>.
[Andreas]

> Very roughly, the new ColumnNumberProperty.make() does something like this:

That should be ColumnNumberPropertyMaker in order to follow the naming 
of all the other custom makers.

regards,
finn