Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


BUG: .NET XSLT transform xml -> html w/indent option

From: bentt2000@-----------.---------.---
To: 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!


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent