https://issues.apache.org/bugzilla/show_bug.cgi?id=45097





--- Comment #8 from Sean Griffin <[EMAIL PROTECTED]>  2008-05-29 17:08:39 PST 
---
(In reply to comment #7)
> ...if the line-breaking algorithm
> has a choice of either breaking before or after a space, it will always break
> before it.

Here's where I think our opinions might differ.  I believe it should break
after the space.  I equate the space character's significance in line wrapping
the same as a hyphen.  Technically I know they are quite different, but
functionally, with hyphenation, the break is placed *after* the hyphen not
before, and it seems the same rule should be used with spaces.

To test this theory I first opened up MS Word, turned on the "Show Formatting
Marks" option, and typed a few lines of text that Word wraps on its own.  The
space characters are kept on the line before the wrap as opposed to after.

Since XSL is based off CSS I wondered what happened in internet browsers with
HTML, so I tried the same thing there with a span border on a large block of
text.  Internet Explorer keeps the space at the end of the prior line before
the wrap.  Firefox trims the space similar to the XSL
white-space-treatment="ignore-if-surrounding-linefeed", so it didn't really
apply there.  Unfortunately CSS doesn't have the level of control over
whitespace that XSL does, but it seems the root of the issue isn't
white-space-treatment but how the line-areas are created.

I searched in the spec for quite awhile trying to find where it clearly says
which line-area gets the whitespace in a wrapping block-area, but I couldn't
find it.  The closest I found was this, which unfortunately is a little
ambiguous.

4.7.2 Line-building
The partitioning occurs at legal line-breaks. Specifically, if A is the last
area of Si and B is the first area of Si+1, then the rules of the language,
script and hyphenation constraints ... in effect must permit a line-break
between A and B, within the context of all areas in Si and Si+1.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to