Manuel Mall wrote:


I was close to throwing temporarily the proverbial "towel into the ring" with respect to whitespace handling. However an offline IM chat with Jeremias and writing the response to Stephen's post encouraged me to take a different approach.

Instead of trying to understand whitespace handling on the basis of a detailed analysis of the spec I looked at it from the perspective: What outcome did the spec writers most likely wanted to achieve? Of course the result is just a bunch of (educated?) guesses on my part.

Indeed. This is the approach I agree with and recommend as far as the spec is concerned. As you've found out the spec is often ambiguous. I think the best approach to implement any XSL-FO feature is;

1) work out what you think the XSL-FO WG intended. When doing this, I think it is important not to dwell too long on every single sentence - just get a gut feel of what the WG intended.
2) work through some use cases.
3) and add a pinch of common sense.

But based on my guesses I have posted a revised algorithm on the Wiki which I hope:
a) Deals sensibly with unresolved/unclear issues
b) Gives consistent results in the generated output
c) Moves most of the work into refinement and only leaves whitespace handling around formatter generated breaks to layout
d) Is understandable by others

However, I do admit it is at this stage a home cooked approach and certainly requires close scrutiny by others before any implementation into the FOP code base is attempted.

Of course this is just my 2 cents worth and may not be considered a good idea by others.


Reply via email to