zip_000
06-27-2007, 02:10 AM
I'm pretty new to xml - I've played around with it before on and off, so there could be a really easy solution or maybe I'm doing something completely wrong.
Okay problem:
I've got an XML file linked to a XSL file linked to a CSS file. Everything works fine in IE7 and Safari, and everything works fine in FF and Opera whenever I'm looking at the file on my own system, but when I look at the file on a server with FF and Opera, I just get plain text for all three. IE7 displays the file correctly whether it's on my machine or on the server.
Any help?
The XML file starts off with this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?>
<mymusic date="6-26-2007">
The XSL file has this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<?xml-stylesheet type="text/css" href="catalog.css"?>
<xsl:template match="/">
<html>
<head>
<LINK href=catalog.css" title="catalog" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="main">
<span class="title">My Music <span style="font-size:10pt;">(in alphabetic order)</span></span><br/>
<br/>
<div style="color:#704b26;">
<xsl:for-each select="mymusic/artist">
<span class="title2"><xsl:value-of select="name"/>
</span>
<ul> <xsl:for-each select="albums/album"> <span><li><xsl:value-of select="albumname"/> - <span style="color:#ff8000;">(<xsl:value-of select="date"/>)</span> </li></span> </xsl:for-each> </ul></xsl:for-each>
</div> </div> </body> </html></xsl:template></xsl:stylesheet>
Thanks!
Okay problem:
I've got an XML file linked to a XSL file linked to a CSS file. Everything works fine in IE7 and Safari, and everything works fine in FF and Opera whenever I'm looking at the file on my own system, but when I look at the file on a server with FF and Opera, I just get plain text for all three. IE7 displays the file correctly whether it's on my machine or on the server.
Any help?
The XML file starts off with this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?>
<mymusic date="6-26-2007">
The XSL file has this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<?xml-stylesheet type="text/css" href="catalog.css"?>
<xsl:template match="/">
<html>
<head>
<LINK href=catalog.css" title="catalog" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="main">
<span class="title">My Music <span style="font-size:10pt;">(in alphabetic order)</span></span><br/>
<br/>
<div style="color:#704b26;">
<xsl:for-each select="mymusic/artist">
<span class="title2"><xsl:value-of select="name"/>
</span>
<ul> <xsl:for-each select="albums/album"> <span><li><xsl:value-of select="albumname"/> - <span style="color:#ff8000;">(<xsl:value-of select="date"/>)</span> </li></span> </xsl:for-each> </ul></xsl:for-each>
</div> </div> </body> </html></xsl:template></xsl:stylesheet>
Thanks!