Unexplained space
Hi, I have a block with another block of text within and within it, I have another block of text. I do this to maintain spacing in certain circumstances (defined by the XSLT). Unfortunately one of the sideffects of this is a very large space after the enclosed block. If I run the example below in FOP 0.93, I get some chunky spacing after flight enquiries to check that your aircraft will be. ?xml version=1.0 encoding=UTF-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:str=http://exslt.org/strings; xmlns:datetime=http://exslt.org/dates-and-times; fo:layout-master-set fo:simple-page-master margin-right=7mm margin-left=7mm margin-bottom=10mm margin-top=6mm page-height=297mm page-width=210mm master-name=A4-first fo:region-body region-name=itin-body margin-right=10mm margin-bottom=17mm margin-top=40mm / fo:region-before extent=40mm region-name=itin-before-first / fo:region-after extent=17mm region-name=itin-after / /fo:simple-page-master fo:simple-page-master margin-right=7mm margin-left=7mm margin-bottom=10mm margin-top=6mm page-height=297mm page-width=210mm master-name=A4-itin fo:region-body region-name=itin-body margin-right=10mm margin-bottom=17mm margin-top=69.9mm / fo:region-before extent=69.9mm region-name=itin-before-rest / fo:region-after extent=17mm region-name=itin-after / /fo:simple-page-master fo:page-sequence-master master-name=A4 fo:repeatable-page-master-alternatives fo:conditional-page-master-reference page-position=first master-reference=A4-first / fo:conditional-page-master-reference page-position=rest master-reference=A4-itin / /fo:repeatable-page-master-alternatives /fo:page-sequence-master /fo:layout-master-set fo:page-sequence master-reference=A4 fo:static-content flow-name=itin-before-first fo:block fo:wrapper font-size=37mm fo:basic-link external-destination=http://www.tt.com.au; fo:external-graphic content-height=37mm src=C:\workspace\FOP\united.jpg scaling=uniform / /fo:basic-link /fo:wrapper /fo:block fo:block / /fo:static-content fo:static-content flow-name=itin-before-rest fo:block fo:wrapper font-size=37mm fo:basic-link external-destination=http://www.tt.com.au; fo:external-graphic content-height=37mm src=C:\workspace\FOP\united.jpg scaling=uniform / /fo:basic-link /fo:wrapper /fo:block fo:block fo:table border-bottom-width=1.7mm border-bottom-color=#d6d3cf border-bottom-style=solid border-top-width=1.7mm border-top-color=#d6d3cf border-top-style=solid padding-bottom=3.5mm padding-top=3.5mm table-layout=fixed width=100% fo:table-column column-width=27mm / fo:table-column column-width=90mm / fo:table-column column-width=75mm / fo:table-body font-family=sans-serif font-size=10pt color=#333 margin-bottom=3mm fo:table-row fo:table-cell fo:block margin-left=3mmItinerary for/fo:block /fo:table-cell fo:table-cell fo:blockMR A TEST/fo:block fo:blockAND PARTY/fo:block /fo:table-cell fo:table-cell fo:table table-layout=fixed width=100% fo:table-column column-width=50mm / fo:table-column column-width=25mm / fo:table-body fo:table-row fo:table-cell padding-after=2.2mm fo:block border-bottom-color=#333 border-bottom-width=thin border-bottom-style=solid Booking /fo:block /fo:table-cell fo:table-cell padding-after=2.2mm fo:block border-bottom-color=#333 border-bottom-width=thin border-bottom-style=solid text-align=right AA/BBB /fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell padding-after=2.2mm fo:blockIssued/fo:block /fo:table-cell fo:table-cell padding-after=2.2mm fo:block text-align=right13 Nov 2007/fo:block /fo:table-cell /fo:table-row /fo:table-body /fo:table /fo:table-cell /fo:table-row /fo:table-body /fo:table /fo:block /fo:static-content fo:static-content flow-name=itin-after fo:block margin-top=5mm fo:leader rule-thickness=0.05pt leader-length=195.5mm leader-pattern=rule / /fo:block fo:table table-layout=fixed width=100% fo:table-column column-width=89.5mm / fo:table-column column-width=120.5mm /
Re: Unexplained space
On Nov 13, 2007, at 21:52, Kamal Bhatt wrote: Hi Khamal Hi, I have a block with another block of text within and within it, I have another block of text. I do this to maintain spacing in certain circumstances (defined by the XSLT). Unfortunately one of the sideffects of this is a very large space after the enclosed block. If I run the example below in FOP 0.93, I get some chunky spacing after flight enquiries to check that your aircraft will be. The effect you describe is to be expected, I think, if you look at this snippet (simply cp; should be an exact copy of your original): --- fo:block linefeed-treatment=preserve margin-bottom=5mm margin- top=0 fo:block padding=0 margin-bottom=0 white-space-collapse=false white-space- treatment=preserve flight enquiries to check that your aircraft will be /fo:block departing at the time shown on your ticket and itinerary. --- The first series of 34 spaces in the outer block will be suppressed. Note that you have both enabled white-space-preserve and disabled white-space-collapse on the inner block. This means that, if FOP decides to break the line after the trailing spaces, they will be considered relevant when aligning the text flight enquiries Is that what you mean by 'chunky space'? Or is it maybe the effect of the preserved linefeeds in the outer block, that generate an empty line, because the second one is the only character in that line? Getting preserved white-space correct can be very tricky. Perhaps you wanted this: --- fo:block linefeed-treatment=preserve margin-bottom=5mm margin- top=0fo:block padding=0 margin-bottom=0 white-space- treatment=preserve flight enquiries to check that your aircraft will be /fo:blockdeparting at the time shown on your ticket and itinerary. --- Do you have control over the stylesheet? In that case, it should be a simple matter of adapting the template in question to produce the below version. HTH! Cheers Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]