[thelist] XSLT embedding NBSP -- not working anymore :(

David.Cantrell at Gunter.AF.mil David.Cantrell at Gunter.AF.mil
Tue Aug 20 11:41:01 CDT 2002


I haven't tinkered with XML/XSL in a few months, so I suspect this may be my
rustiness showing through...

I've got an XSLT script with the following element:

	<td><xsl:value-of select="concat( ., '&#160;' )"/></td>

(This is so empty values still force the TD to be styled for display
purposes)

But the output is like this:

	<td> </td>

Whereas I want this:

	<td>&nbsp;</td>

How can I embed the &nbsp; declaration?

XSLT dies on &nbsp; because the entity is not defined in the XSLT namespace,
which is why I use &#160; instead.

Of course, &amp;nbsp; just displays the string literal "&nbsp;" to the
screen, so that doesn't work -- I thought maybe I needed to escape it in XSL
so it would come through in HTML, but no dice.

Thanks!
-dave



More information about the thelist mailing list