[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] White space


Subject: Re: [xsl] White space
From: "Mark Williams" <mark@xxxxxxxxxxx>
Date: Wed, 14 Jan 2004 15:05:54 -0000

Ken,

Many thanks for the response.  I tried the shorthand and I tried all four
properties.  I still couldn't get my whitespace.  I hope you don't mind, but
I have set out below my (abbreviated) xsl file.  I use this witn an xml file
to perform a transform and the resulting output is rendered to pdf by FOP.
For some reason I simply cannot get whitespace between lines and between
xslt procedures etc within the body text.  By way of example, there are 2
text blocks in the xsl file below and an empty block, which I want to
produce a blank line between the 2 text blocks it does not do it.  The xsl
file below will not do it.  If change the first line to:

<?xml version="1.0" encoding="iso-8859-1"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

It renders to PDF exactly as I would expect it to.  I would have though the
fo:block would have rendered white space identically in both cases as it is
a fo property and not an XSL.  Can you please tell me what it is I need to
do to the file below to make it render white space correctly at all times.

Again, many thanks for your much appreciated help.

Regards,

Mark

- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format">
- <fo:root>
- <fo:layout-master-set>
- <fo:simple-page-master master-name="first-page" margin-top="0cm"
margin-right="0cm" margin-bottom="0cm" margin-left="0cm"
page-width="20.9982363315697cm" page-height="29.6966490299824cm">
  <fo:region-body margin-top="2.53968253968254cm"
margin-left="2.87569664902998cm" margin-right="3.02569664902998cm"
margin-bottom="2.53968253968254cm" />
  <fo:region-before precedence="false" extent="0cm"
region-name="xsl-region-before-first-page" overflow="visible" />
  <fo:region-after precedence="false" extent="0cm" overflow="visible"
display-align="after" />
  </fo:simple-page-master>
- <fo:simple-page-master master-name="any-page" margin-top="0cm"
margin-right="0cm" margin-bottom="0cm" margin-left="0cm"
page-width="20.9982363315697cm" page-height="29.6966490299824cm">
  <fo:region-body margin-top="2.53968253968254cm"
margin-left="2.87569664902998cm" margin-right="3.02569664902998cm"
margin-bottom="2.53968253968254cm" />
  <fo:region-before precedence="false" extent="0cm"
region-name="xsl-region-before-any-page" overflow="visible" />
  <fo:region-after precedence="false" extent="0cm" overflow="visible"
display-align="after" />
  </fo:simple-page-master>
- <fo:page-sequence-master master-name="main-doc">
- <fo:repeatable-page-master-alternatives>
  <fo:conditional-page-master-reference page-position="first"
master-reference="first-page" />
  <fo:conditional-page-master-reference page-position="any"
master-reference="any-page" />
  </fo:repeatable-page-master-alternatives>
  </fo:page-sequence-master>
  </fo:layout-master-set>
- <fo:page-sequence master-reference="main-doc">
- <fo:flow flow-name="xsl-region-body">
  <fo:wrapper id="_top" />
- <fo:block font-family="Helvetica" font-size="14pt" space-after="0.05pt">
  <fo:inline font-weight="bold">First Line</fo:inline>
  </fo:block>
  <fo:block font-family="Helvetica" font-size="12pt"
white-space-collapse="false" linefeed-treatment="preserve"
white-space-treatment="preserve" wrap-option="no-wrap" space-after="0.05pt"
/>
  <fo:block font-family="Helvetica" font-size="12pt" text-align="justify"
space-after="0.05pt">Second Line</fo:block>
  <fo:block font-family="Helvetica" font-size="12pt"
white-space-collapse="false" text-align="justify" space-after="0.05pt" />
  </fo:flow>
  </fo:page-sequence>
  </fo:root>
  </xsl:stylesheet>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords