logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Space in XSL FO: msg#00004

Subject: Re: Space in XSL FO

        <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




<Prev in Thread] Current Thread [Next in Thread>