W3C home > Mailing lists > Public > xsl-editors@w3.org > October to December 2001

Re: XSL PR - white-space-collapse

From: MURAKAMI Shinyu <murakami@nadita.com>
Date: Fri, 5 Oct 2001 01:08:06 -0400 (EDT)
To: pgrosso@arbortext.com, xsl-editors@w3.org
Message-Id: <200110051407.CBB22295.BSNJNVBL@nadita.com>
At Wed, 03 Oct 2001 09:49:59 -0400, Paul Grosso wrote:
> The XSL FO group discussed this issue in depth.  We note that the
> results you desire match what is commonly done in HTML browsers.

And also done in current versions of XSL-FO formatters - at least:
  Apache FOP
  RenderX XEP
  Antenna House XSL Formatter
when white-space-collapse="collapse", unwanted whitespaces beginning and 
end of line are removed.

> 
> Though we can see the potential usefulness of being able to get
> what you want, we decided that it would be too dangerous to try
> to make any such changes at this stage in the spec.  We have spent
> lots of time during development of the spec on whitespaces, spacing 
> issues, and the area model, and we fear that any such change may have 
> unexpected results.  In general, if the user's document puts white space, 
> for example, at the beginning of a paragraph, and the XSL-fo stylesheet
> doesn't remove them, then that whitespace will get reflected in the output.  
> (And it is up to the XSL-fo stylesheet to be sure not to introduce new 
> unwanted whitespace into the FO result tree.)

I cannot agree. I don't want so complex XSL-fo stylesheets!

> 
> I note we are changing the initial value for white-space-treatment to
> ignore-if-surrounding-linefeed, but I also note that that change
> in your example below doesn't change your results.
> 
> So after much debate, we decided not to add a new property value in this 
> area for XSL 1.0. 
> 
> paul
> 
> At 16:28 2001 09 22 -0400, MURAKAMI Shinyu wrote:
> >7.15.12 "white-space-collapse"
> >
> >    true 
> >        Specifies, for any character flow object such that:
> >            - its character is classified as white space in XML, and 
> >            - it is not, however, a U+000A (linefeed) character, and 
> >            - the immediately preceding flow object is a character flow
> >              object with a character classified as white space in XML 
> >              or the immediately following flow object is a linefeed, 
> >        that flow object shall not generate an area.
> >
> >I think this definition is not sufficient.
> >whitespaces should be discarded also at beginning of line-area and end 
> >of line-area.
> >
> >Example:
> >
> ><fo:block white-space-treatment="preserve"
> >          linefeed-treatment="treat-as-space"
> >          white-space-collapse="true">
> >  AAA   AAA
> >  <fo:block>
> >    BBB
> >  </fo:block>
> >  CCC
> ></fo:block>
> >
> >These FOs generate three line-areas. 
> >Before white-space-collapse is processed, these texts are:
> >    ___AAA___AAA___
> >    _____BBB___
> >    ___CCC_
> >    (here, space is represented as _ )
> >
> >In each line-area spaces should be normalized.
> >Usually, we expect the following results:
> >    AAA_AAA
> >    BBB
> >    CCC
> >    (spaces are discarded at beginning and end of line-area)
> >
> >and not expect:
> >    _AAA_AAA_
> >    _BBB_
> >    _CCC_
> >
> 
Received on Friday, 5 October 2001 10:29:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:52 GMT