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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running XSL in IE 6

Status
Not open for further replies.

LuckyKoen

Programmer
Feb 14, 2005
57
BE
I have just read the basics about XSL and XML and now I am trying to run a simple article.xsl file in IE. I use IE 6 on a PC with Windows 2000, and I installed msxml.

The article.xsl file is an example on how to use XSL that I found on the web so I assume that it works correctly. I already put the following tag on the first line of my article.xsl file :

<?xml-stylesheet type="text/xsl" href="article.xsl"?>

With this tag IE won't just show the xsl code and tries to process the xsl code instead. I can see normal html text but the xsl code fails to get any data out of my xml file. Is there something I forgot to add besides the text/xsl line ?
 
<?xml-stylesheet type="text/xsl" href="article.xsl"?>

This needs to go on the second line of your XML file (it links the XML file to the XSL file), below the <?xml version="1.0"?>. Then open your XML file up.
 
I added <?xml version="1.0"?> on the first line of the file but that didn't fix the problem.

Speaking of linking, how does the XSL file know where to look for the XML file ? I assume that it automaticly looks in the same directory or is this wrong ?
 
Read my post again.

<?xml-stylesheet type="text/xsl" href="article.xsl"?>

Needs to be in the *** XML *** file.
 
Now I get it.. I was opening the xsl file instead of the xml file in IE :)

Silly beginner's mistake, my appologies
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top