Problem using XSL from IE -- works with DOM in VB

wxdqz

New Member
I'm getting different results when I run an XSL style sheet against an xmldocument using the DOM API from within VB (where it works correctly), andthen simply trying to reference the stylesheet from within my xml documentand loading it in IE (version 5.0).I'm not sure if I'm not referring to the XSL correctly from my xml document,or if what I'm trying to do isn't supported by my version of IE (5.0), orif it's something else entirely.This is the very simple xml:<?xml version="1.0"?><products><product>Quake</product><product>Windows 2000</product><product>Cooking Light</product><product>Turbo Tax</product></products>And this is the XSL:<?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="xml" indent="yes" /><xsl:template match="/"><HTML><BODY><TABLE border="1"><xsl:for-each select="/products/product"><TR><TD>Name</TD><TD><xsl:value-of select="."/></TD></TR></xsl:for-each></TABLE></BODY></HTML></xsl:template></xsl:stylesheet>When using the DOM from VB, it works fine and produces this:<?xml version="1.0" encoding="UTF-16"?><HTML><BODY><TABLE border="1"><TR><TD>Name</TD><TD>Quake</TD></TR><TR><TD>Name</TD><TD>Windows 2000</TD></TR><TR><TD>Name</TD><TD>Cooking Light</TD></TR><TR><TD>Name</TD><TD>Turbo Tax</TD></TR></TABLE></BODY></HTML>So that works fine. But when I modify the xml to include a reference (notsure of the right term here) to the style sheet so that the xml looks likethis and simply try to load it in IE (instead of running it through my VBapp:<?xml version="1.0"?><!-- with stylesheet --><?xml:stylesheet type="text/xsl" href=http://forums.devx.com/archive/index.php/"products_table.xsl"?><products><product>Quake</product><product>Windows 2000</product><product>Cooking Light</product><product>Turbo Tax</product></products>... the only output I get is a single-rowed and single-celled table withone data value, "Name".Can anyone steer me in the right direction?Thanks for your help,Paul
 
Back
Top