[xep-support] white-space-treatment="ignore-if-before-linefeed"

Bob Stayton bobs at sagehill.net
Sat Sep 2 13:33:15 PDT 2006


Hi David,
Here are some more details.  A docbook document has a programlisting 
element that contains an XInclude with parse="text" to include a code 
sample from a Windows text file that has cr-lf line endings.  When this is 
processed by the XInclude processor and the stylesheet, the result is the 
following FO:

      <fo:block id="id405244" white-space-collapse="false" 
white-space-treatment="preserve" linefeed-treatment="preserve" 
text-align="start" wrap-option="no-wrap" space-before.minimum="0.8em" 
space-before.optimum="1em" space-before.maximum="1.2em" 
space-after.minimum="0.8em" space-after.optimum="1em" 
space-after.maximum="1.2em" hyphenate="false" font-family="monospace">First 
line of the code&#13;
Second line of code&#13;
etc.

Note that each line in the FO ends with &#13;.  I get the same results with 
two different XInclude processors (Xerces and libxml2).  When I process 
this with Antenna House or FOP, the lines are single-spaced.  When 
processed with XEP, the lines are double-spaced.

Since white-space-treatment="preserve", perhaps the double spacing is 
correct, and AH and FOP get it wrong (but what the author wanted).   But my 
reading of XSL section 7.15.8 about 
white-space-treatment="ignore-if-before-linefeed" is that any XML white 
space character immediately preceding a &#xA; is ignored. The &#xD; 
character is certainly a white-space character by the definition of white 
space in XML, so it should be ignored, leading to single-spaced output, no? 
I don't think that property value applies just to the space character.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs at sagehill.net


----- Original Message ----- 
From: "David Tolpin" <dvd at davidashen.net>
To: <xep-support at renderx.com>
Sent: Saturday, September 02, 2006 10:24 AM
Subject: Re: [xep-support] 
white-space-treatment="ignore-if-before-linefeed"


>
>>> But the authors of XSL-FO actually considered this, and provided (in
>> section 7.15.8) for white-space-treatment="ignore-if-before-linefeed".
>
> Hi,
>
> white-space-treatment="ignore-if-before-linefeed" does not have anything 
> to do with CR's in the XML source (which should not be seen by the 
> application). This attribute is to drop spaces at the end of a line 
> (useful in case of coloured inline backgrounds and explicit line breaks, 
> for example, or for the purposes of justification.
>
> David
>
> -------------------
> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
> in the body of the message to majordomo at renderx.com from the address
> you are subscribed from.
> (*) By using the Service, you expressly agree to these Terms of Service 
> http://www.renderx.com/terms-of-service.html
>
> 


-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html



More information about the Xep-support mailing list