Re: [xsl] White space

Subject: Re: [xsl] White space
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 14 Jan 2004 13:33:08 -0500
At 2004-01-14 15:05 +0000, Mark Williams wrote:
The xsl
file below will not do it.

The XSL file below does not describe a result template rule.


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.

Right ... because that is the document element of an XSL-FO instance.


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.

Did you not think we were already trying to do so?


- <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>
...

The above does nothing for XSLT except be considered an empty stylesheet.


Perhaps you wanted:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format";>
 <xsl:template match="/">
   <fo:root>
   ...
 </xsl:template>
</xsl:stylesheet>

Otherwise, you have an empty set of template rules engaging only the built-in template rules. The <fo:root> elements is bug a top-level foreign-namespace construct.

I hope this helps.

........................ Ken

--
North America (Washington, DC): 3-day XSLT/2-day XSL-FO 2004-03-15
Instructor-led on-site corporate, government & user group training
for XSLT and XSL-FO world-wide:  please contact us for the details

G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                       Definitive XSLT and XPath
ISBN 0-13-140374-5                               Definitive XSL-FO
ISBN 1-894049-08-X   Practical Transformation Using XSLT and XPath
ISBN 1-894049-11-X               Practical Formatting Using XSL-FO
Member of the XML Guild of Practitioners:     http://XMLGuild.info
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/s/bc


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



Current Thread