xslt 1.0 to HTML table spacing problem -
all,
i attempting place spaces/indent text in column in html table. reading xml file using xslt 1.0 , writing html file. have tried following:
<?xml version='1.0' encoding='utf-16'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/xsl/transform" version="1.0"> <xsl:output method="html" indent="yes" encoding="utf-16"/> <tr> <td/> <td> <xsl:text xml:space="preserve"> </xsl:text> <xsl:value-of select="concat('substantiation-', @sourceid, ' (', current(), ')')"/> </td> </tr>
the results when viewed in internet explorer (opened generated html file) looks like:
 substantiation-9010 (p 1-5, para 1-10.)
i have tryed 	
,  
, ,  
has similar or no results.
i assuming have encoding issue (thanks michael kay pointing out), i'm not sure i'm doing wrong since specifing encoding in output tag. know how either add space/tab looks correct when viewed in ie?
thank help!!!
inserting  
character right way add non-breaking space. it's being displayed incorrectly because of kind of encoding problem - you're generating utf-8 document internet explorer thinks it's iso 8859-1 (or ms cp1252). reasons ie gets encoding wrong myriad (and beyond comprehension), haven't started give information needed diagnose them (we don't know if transformation server-side or client-side).
(of course, other responders right there might better ways achieve required layout use nbsp characters. if you've got encoding problem, affect other characters too, shouldn't leave festering.)
Comments
Post a Comment