Thursday, July 15, 2010

XSLT output and using  

I did it again. I wrote some cool little XSLT that spit out an HTML document only to find out that all of my   turn into ? or Ă. Of course I should realize that the computer is only doing exactly what I told it to do.  Here's what I told it:

<!DOCTYPE xsl:stylesheet [<!ENTITY nbsp "&#160;">]>

And the computer turned that into Ă exactly as I told it to or in the case of IE6, a ?. Here's a simple fix for it:

<!DOCTYPE xsl:stylesheet [<!ENTITY nbsp "<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>">]>

It will turn all in your XSLT into &nbsp; which will in turn display correctly on your browser.

Dummy coder.