Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: BUG: .NET XSLT transform xml -> html w/indent option BUG: .NET XSLT transform xml -> html w/indent optionTo: NULL Date: 2/3/2005 12:47:00 AM I have been wrestling with this for four days. I've concluded this is a bug
in .Net. Can someone verify so I can stop pounding my head against the wall?
If its not a bug, what am I doing wrong? Here are the details:
XML
<mydata>
<value>XML source doesn't matter</value>
</mydata>
XSL Stylesheet:
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="4.0" indent="yes" />
<xsl:template match="/">
<html>
<body>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="spacer.gif"/></td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
using the XSLTransform class in .NET, the output of this XSL->HTML
transformation is incorrect. The output is with "indent=yes" is:
<html>
...
<td>
<img ...>
</td>
...
</html>
It should be:
<html>
...
<td><img ...></td>
...
</html>
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.
Any help truely appreciated as I've done a weeks worth of research and
head-pounding.
Thanks!
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
