Hi,

I was taking a look at the issue where the text in a fo:block has a leading space added. I thought that by default, the initial spaces and LFs for such a block should be suppressed, but I can't quite find the place in the spec where it is defined.

At least 3 properties comes into play:

white-space-treatment (default: ignore-if-surrounding-linefeed)
http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#white-space-treatment

linefeed-treatment  (default: treat-as-space)
http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#linefeed-treatment

white-space-collapse (default: true)
http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#white-space-collapse

For an example like this:

    <fo:block>
        This is a simple fo block.
    </fo:block>

, the text contains:

0x0a 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x54 0x68 0x69 0x73 ...

the spaces surrounding the LF should be ignores:

0x0a 0x54 0x68 0x69 0x73 ...

and the linefeed turned into a space:

0x20 0x54 0x68 0x69 0x73 ...

and last, two or more consecutive spaces removed:

0x20 0x54 0x68 0x69 0x73 ...

which is exactly what HEAD does!

But surely that can't be right. I must be missing or misreading something.

regards,
finn




Reply via email to