On Wed, Jan 04, 2006 at 08:37:31PM +0100, Andreas L Delmelle wrote: >On Jan 4, 2006, at 20:22, Andreas L Delmelle wrote: > >>On Jan 4, 2006, at 14:55, gerhard oettl wrote: >>> >>>as far as i can see this cannot be assurred for table-cell with >>>the current code at the point this function is called. >> >>Hmmm... The columns will always be available
>To expand, a little remark: try '((TableCell) pInfo.getFO >()).getColumnNumber()' This was the beginning of my illness some days ago ;-) It always ends with a NullPointerExection. The following is much suspection, because i only get slowly familiar with that powerfull concepts of mapping, events, event-like triggers and so on (especialy about the order and the exact time when they are called)so that i am not quite shure about the followint, but my tests confirm my sight: When running into the FromTableColumnFunction we are at the stage of collecting properties "long" before the binding [1]. For the order i see two possibilities: a) left to right in the property-string b) "unorederd" in the sense that the sax engine decides in whitch order it delivers the properties (may be you could clarify, but only if possible in some words - otherwise dont matter, the time and the source will bring light ...) >Now I'm thinking that perhaps the column-number property does need to >be bound first in TableCell.bind() for this to work properly... this does not help because of [1] >>A call to PropertyList.get(PR_COLUMN_NUMBER) for the table-cell >>should take care of resolving the column-number for that cell, if >>it wasn't already initialized. a test with the following fo-fragment arges against it: <fo:table-body> <fo:table-row> <fo:table-cell display-align="from-table-column()" column-number="3"> reports a column-number of "1", what would make case a) possible/likely. In other words, at the thime the from-table-column() is evaluated the PropertyList does not know about the following _explicit_ column-number. A additional side-effect is that the call makes the wrong column-number "1" permanent and i get a OverlapExeception when the cell with the realy explicit column-number "1" arises in the fo-file. That let me see two ways (in that order): 1) Only handle descendants of table-cell, which is not a great restriction for me, because - as shown in a previos fo-snippet - i primary want to use table-column as info container for properties of fo:block elements. At this time the full table-cell (expecialy the column-number) is available. 2) Defer all properties that need a call to FromTableColumnFunction to be evaluated at the end of the property-collecting / parsing stage. This is a little too tricky for me with my current knowledge of the code and a source for later improvement. and yes 3) I hope i am wrong with my pessimistic sight and you could lead me out of the misery ;-)) gerhard -- .''`. gerhard oettl on Debian/Gnu Linux : :' : `. `'` gpg key: 1024D/D59131AA 2002-06-18 `-