W3C home > Mailing lists > Public > www-xsl-fo@w3.org > June 2003

Re: Space in XSL FO

From: David Carlisle <davidc@nag.co.uk>
Date: Wed, 11 Jun 2003 23:34:24 +0100
Message-Id: <200306112234.XAA11820@e3000>
To: srajappan@esri.com
CC: www-xsl-fo@w3.org


	<xsl:template match="SPACE">
	 &#160;
	</xsl:template>


Note that will put a newline  some spaces a non-breaking-space and
another newline into the output. I think you only wanted to insert a
single non breaking space, in which case you want

	<xsl:template match="SPACE">&#160;</xsl:template>

or 



	<xsl:template match="SPACE">
          <xsl:text>&#160;</xsl:text>
        </xsl:template>

the white space used to indent the xsl elements _is_ significant if
there are any non-white space characters in the same text node, and
#160 is not white space as far as XSLT (or XML) is concerned, even
though it prints as a space.

Once you are only adding one #160 character per SPACE element
you probably will not need to further collapse.

David
Received on Wednesday, 11 June 2003 18:34:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:11 GMT