Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - BUG: .NET XSLT transform xml -> html w/indent option [Thread Next] Re: BUG: .NET XSLT transform xml -> html w/indent optionTo: NULL Date: 2/3/2005 12:40:00 PM bentt2000 wrote: > This slight difference causes serious visual anomalies in the resultant > HTML. I have tried for several days to make the <img> stay on the same line > as the <td> tag to no avail. Any help here? I took the XML source and linked > it with the XSL stylesheet and opened it manually in Internet Explorer 6. In > Internet Explorer 6, the XSL stylesheet renders perfectly and no visual > anomalies appear. > > Is this a known issue/bug? If so, I'm all ears for any alternative solution. > I have tried "indent=no" but this appears to randomly break up the HTML at > unpredictable places and thus I don't feel it is "reliable" in its results. Yeah, seems to be a bug. According to XSLT spec, indentation shouldn't change HTML rendering behaviour. And MSXML does output <td><img> even when indenting. I'll file the bug. The only option therefore seems to be disabling automatic indentation. You can keep your stylesheet's indentaion using xml:space attribute though: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="4.0" indent="no"/> <xsl:template match="/"> <html xml:space="preserve"> <body> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td><img src="spacer.gif"/></td> </tr> </table> </body> </html> </xsl:template> </xsl:stylesheet> -- Oleg Tkachenko [XML MVP, MCP] http://blog.tkachenko.com | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
