Re: Collapsing border model

2005-05-05 Thread Simon Pepping
Jeremias,

At first sight I agree with Andreas' interpretation in his reply to
this message, which I think is the same as your original
interpretation. Thinking on, however, I see that there may be a
problem with spanned cells. Is that what you are aiming at?

The cell level, means the level of the spanned cell. This suggests
indeed that each side of a spanned cell must be treated as a whole.
However, the spec says precisely:

 If the value of the border-collapse property is collapse or
 collapse-with-precedence the border is determined, for each segment,
   
 at the cell level.

and

 If the value of the border-collapse trait is collapse, the border for
 each side of the cell is determined by, for each segment of a border,
  
 selecting, from all border specifications for that segment, the border
 that has the most eye catching border style...

Moreover, the term 'cell level' is rather vague, and certainly not the
same as 'per cell'.

That seems to mean that the determination is done per segment indeed,
which agrees with your original interpretation. Note that the spec
does not define the notion of a segment, nor does the CSS2 spec. But I
take it to mean the side of a grid unit.

Your Wiki example shows a result that is probably undesirable, a
spanned cell with vastly different border segments. But apparently the
spec does not protect the user from specifying such a border
arrangement.

Probably it is not possible to define resolution of collapsing border
specifications per cell. Consider the following example:

   ++++
   ||||
   ||||
   ||||
   ||||
   ++---+++
   || |
   || |
   || |
   || |
   ++-+

On the border between rows 1 and 2 each segment is part of two cell
borders. Conflicting border specifications can only be resolved per
segment, not per cell.

Note also this remark in the spec (6.7.3 fo:table) about the
background of spanned cells: A cell that is spanned may have a
different background in each of the grid units it occupies. This is
somewhat similar to the spec allowing different segments on a side of
a spanned cell.

Regards, Simon

On Tue, May 03, 2005 at 03:14:50PM +0200, Jeremias Maerki wrote:
 I've just realized I probably made a big mistake interpreting collapsing
 border model. While going through the specs to reread everything about
 the outer table border I carefully reread the following passages:
 
 XSL-FO 1.0, 6.7.2, Trait Derivation:
 If the value of the border-collapse property is collapse or
 collapse-with-precedence the border is determined, for each segment,
 at the cell level.
 
 So far I've based everything on being determined, for each segment, at
 the segment level as it seems. I even had the part about cell level
 highlighted in my print-out and still got it wrong. Damn me!
 
 But I think I know why I got it wrong:
 
 XSL-FO 1.0, 6.7.10, Trait Derivation:
 If the value of the border-collapse trait is collapse, the border for
 each side of the cell is determined by, for each segment of a border,
 selecting, from all border specifications for that segment, the border
 that has the most eye catching border style...
 
 Obviously sounded too much like a per-segment thing.
 
 Under the new light, this means a totally different thing. Looking at my
 (buggy) example [1] this means that the segment where the arrow points
 should actually be the same broad red border as the one next to it on
 the right side.


-- 
Simon Pepping
home page: http://www.leverkruid.nl



RE: iStartOn = break-before?

2005-05-05 Thread Andreas L. Delmelle
 -Original Message-
 From: Glen Mazza [mailto:[EMAIL PROTECTED]


Hi,

 The AbstractBreaker.BlockSequence has an iStartOn property, that from
 looking at PSLM, quite possibly just means the break-before trait.
 Are they synonyms?

Not really. I seem to agree with Jeremias here, in that iStartOn's _value_
is indeed the same type as that of the trait --Constants.EN_PAGE,
.EN_COLUMN...-- but, in the context of the BlockSequence this value is used
to represent what kind of (sub)page the first element should be layed out
on.
(IIUC: the break itself is already _there_ at that point, and iStartOn is
passed to handleBreak() to check if additional pageVP's need to be created
or the flow's column index needs to be incremented...)

So IMO naming it breakBefore would be misleading here.

 I would like us to use the official Rec term if at
 all possible.

I'm also very much in favor of this idea, however, that's all very easy when
it comes to the FOTree and the AreaTree, but it seems that whatever's in
between is left up to the implementation...

Cheers,

Andreas



Re: cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr PageSequenceLayoutManager.java

2005-05-05 Thread Glen Mazza
Jeremias Maerki wrote:
Glen,
I'd like you to revert that one and take a different approach if any.
 

Kein Problem.  Bald werde ich dass machen, aber nicht dieser Nacht, weil 
ich ziemlich muede bin.

handleBreak does really handle break-before AND break-after, so the name
was ok. 

Ja, Sie haben Recht.  Leider habe ich nur die ehemalige 
PSLM.prepareNormalFlowArea() gelesen, und von da irrtumlich gelernen, 
dass break-before die einzel Benutzung war.

What can be is that there is some left-over code from the
previous approach. 

Ja, jetzt sollen wir das alterer Kodierung (pNFA() usw.) entfernen.  
Letztes Januar war PSLM ungefaehr 930 LVK, aber bald wird es vielleicht 
nur 560 LVK sein!

Danke,
Glen


Re: iStartOn = break-before?

2005-05-05 Thread Glen Mazza
OK, I'll update the variable with a comment explaining its meaning.
Thanks,
Glen
Jeremias Maerki wrote:
Using the official terms is usually a good idea but in this instance I'd
leave it like it is. It's not just the break-before value. The value for
startOn can also come from a break-after property. It simply indicates
for a BlockSequence on what kind of page it should start after
normalizing where the value originally came from (break-after or
break-before). IMO using break-before here would actually be confusing
and startOn is more descriptive.
On 05.05.2005 06:00:56 Glen Mazza wrote:
 

Team,
The AbstractBreaker.BlockSequence has an iStartOn property, that from 
looking at PSLM, quite possibly just means the break-before trait.  
Are they synonyms?  I would like us to use the official Rec term if at 
all possible.

Thanks,
Glen

   public class BlockSequence extends KnuthSequence {
   private int startOn;
   public BlockSequence(int iStartOn) {
   super();
   startOn = iStartOn;
   }
  .
   


Jeremias Maerki