xsl-list
[Top] [All Lists]

Re: adding space in xslt and trimming last space in java-problem

2003-07-16 13:18:45
remko de knikker wrote:
       <xsl:value-of select="text()"/>&#xa0;</xsl:for-each>

&#xA0; or U+00A0 is a non-breaking space. Java's trim() routines
don't recognize it as a space.

In VIM the transformed file shows not a space but a capital A with a ^ on top, I assume this is the problem.
This is (probably) one of the bytes of an UTF-8 encoded non-breaking
space as displayed by a non-UTF-8 aware editor (well, the most common
case).

what can I use instead of &#xa0;??
Try
 <xsl:text> </xsl:text>

You might want to read what the XSLT spec says about whitespace
stripping, and probably a bit more on XML basics.

J.Pietschmann


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