Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSL & IIS4 problems

Status
Not open for further replies.

DrDrew

Programmer
Jun 24, 2002
8
US
Im having some trouble getting my XSL files working on a web server that is running NT 4 as the OS with IIS 4. I am also using IE 4 as the browser. This has not always been the case, originally I installed MSXML (3.0) and things were working fine. I could pass XML strings to the XSL stylesheets and they would be formatted correctly. Without
making any changes to the server's configuration, one day this week the server simply stopped being able to utilize XSL files. If I try to pass an XML string to one of my XSL files, it is not formatted. I even got a very simple example to see if maybe the XML strings I had been
using had somehow become incorrectly formatted. Here is the simple XSL stylesheet, I dont see anything wrong with it and I have used it successfully on a server that is running Windows 2000 with IIS 5, MSXML3 and IE 5.5 as the browser:

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl=&quot;<xsl:template match=&quot;/&quot;>
<html>
<body>
<table border=&quot;2&quot; bgcolor=&quot;yellow&quot;>
<tr>
<th>Title</th>
<th>Artist</th>
</tr>
<xsl:for-each select=&quot;CATALOG/CD&quot;>
<tr>
<td><xsl:value-of select=&quot;TITLE&quot;/></td>
<td><xsl:value-of select=&quot;ARTIST&quot;/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

and a sample XML string that works with the above stylesheet:

<?xml version=&quot;1.0&quot; encoding=&quot;ISO8859-1&quot; ?>
<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;test.xsl&quot;?>
<CATALOG>
<CD>
<TITLE>Natural Mystic</TITLE>
<ARTIST>Bob Marley</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Tuff Gong</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
</CATALOG>

Anyone have any ideas as to what might be going wrong? Once again the above code works fine when used with MSXML3, IIS 5 and IE 5.5 but NOT with MSXML3, IIS 4 and IE 4. Does my problem lie within IIS or the browser? Or could my MSXML3.DLL have become corrupted or damaged without me knowing it? Is a reinstallation of the DLL necessary (which
I would like to avoid if possible)? Any suggestions?

Thanks,
Drew
 
Hi Drew,

As far as I know your problem lies in the browser. You're using the very much outdated namespace ...TR/WD-xsl. IE 5.5 comes with a version of msxml which supports the above mentioned namespace but I can imagine that IE 4.0 doesn't support this namespace at all or uses a different version of msxml for it.

If you want to be absolutely sure you use W3C compliant XSLT, use the namespace instead. This namespace actually uses msxml3.0 or msxml4.0.

You have to have msxml3.0 installed in replace mode however or just install IE6.0 or msxml4.0.

Good luck!

Jordi Reineman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top