Jump to content

Kovo

Members
  • Posts

    237
  • Joined

  • Last visited

Posts posted by Kovo

  1. Well, it didn't. =\ Thanks, though. Anyone else know about this problem?EDIT:http://developer.mozilla.org/en/docs/index...w_to_handle_XMLUh, how do I do that?EDIT: Another thing: would it be possible to specify only a certain part of my page to load the news.xml, without using JScript or anything like that? This might solve the "pictures out of place" problem as well.I'm really pissed that everything works in IE, but not in FF though.EDIT#2: I don't think it's a tabular problem though, because everything displays fine in IE. This totally doesn't make any sense.

    Its ur server host. Read the Topic I started. Its the host not your code.
  2. Just to update on thsi matter. It was my host. I emailed them about the problem, and they addmitted that they currently dont have support for XSL/T and XML. But it is on their list for future service upgrades.Woot. My hair will no longer fall from too much stress. And thanks for the help.

  3. Honestly, I'm out of ideas. This is not a code problem scince everything is working locally. Therefore, it's getting out of my competencse. Try asking the host if he knows anything about this. If he could register the mime type of xml and xslt or whatever...

    Yea, youve done enough man, thx a lot. Its all good, Ill go bother the server providers. Thx take care.
  4. "mimetype" refers to the
    type="text/xsl"

    stuff. They are also specified in the server's configuration. I don't know exactly why they are needed and what's the difference but I know they are requred and IE doesn't care for them and that's why it shows them. By the way, is it me, or the XSL stylesheet doesn't have an XML prolog? I mean...

    <?xml version="1.0" encoding="ISO-8859-1"?>

    Ic. Well the prolog is there... just not in the version of code i posted before.Do I have to use that encoding? or can it be UTF-8
  5. Mozilla requires that you send the XML and XSLT file holding the stylesheet with an XML mimetype (text/xml or application/xml). This is the most common reason why XSLT won't run in Mozilla but will in Internet Explorer. Mozilla is strict in that way.
    Just found that little tip. So how would I apply that to my situation? Considering I load the XML file in an iframe on a .shtml file, is there any changes I should be doing to the shtml file?I also discovered that if I remove the "type" attribute from ym xml file
    ...<?xml-stylesheet type="text/xsl" href="database.xsl"?>...

    Firefox no longer shows the error, and shows the data...just not formatted. I no longer think its the server entirley.

  6. Yea Im about to give up. This is what confuses me. If I load the XML file locally on firefox it works great, but when I load the same XML file on firefox from the server it no longer works. So this must be the servers fault right?

  7. Maybe it's just that the server you are on sucks :) . Try it elswhere. IE doesn't care for MIME types and FF does. In general, what IE does is bad but in this case- better :) .Also, I see you haven't changed the referance in the XML...?

    No I tried what u said... changing to xsl but it didnt work, so i went back to xslt since that wasnt the problem. Ill try on a different server. Hopefully it works.
  8. Tried that. Nothing. Internet Explorer 6 shows it just fine. But when it comes to firefox or netscape I get the same error message.Again this is my code:XML:

    <?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="database.xslt"?><Database>	  <Torrent> 	 <Name>Torrent 1</Name> 	 <Number>1</Number> 	 <Size>4.5GB</Size> 	 <Description>A good program</Description> 	 <DateAdded>April 15 1988</DateAdded> 	 <Type>Windows Application(ISO)</Type> 	 <Link url="http://www.mjf88.com/kev/ttab/click.php?id=1" /> 	 <Link2 url="http://www.googles.com" />  </Torrent>  <Torrent> 	 <Name>Torrent 2</Name> 	 <Number>2</Number> 	 <Size>4.2GB</Size> 	 <Description>A good program also</Description> 	 <DateAdded>April 15 1948</DateAdded> 	 <Type>Windows Game(ISO)</Type> 	 <Link url="http://www.mjf88.com/kev/ttab/click.php?id=2" /> 	 <Link2 url="http://www.goog3les.com" />  </Torrent>	</Database>

    XSLT:

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">	<xsl:template match="/">  <html> 	 <head>    <title>Torrents</title>    <style>  body {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}	table{border-collapse: collapse; border: none;}	td {font-size: 8pt;	border: solid #FF0000 1px;}  </style> 	 </head> 	 <body>    <xsl:for-each select="Database/Torrent">   	 <xsl:sort select="number" order="descending"/>   	 <center>      <table border="0">     	 <tr>        <td width="400px">       	 <center>          <xsl:value-of select="Name"/>       	 </center>        </td>        <td width="50px">       	 <center>          <xsl:value-of select="Size"/>       	 </center>        </td>     	 </tr>      </table>      <table border="0">     	 <tr>        <td width="180px">       	 <center>Added: <xsl:value-of select="DateAdded"/>       	 </center>        </td>        <td width="270px">       	 <center>          <xsl:value-of select="Type"/>       	 </center>        </td>     	 </tr>      </table>      <table border="0">     	 <tr>        <td width="420px">       	 <center>          <xsl:value-of select="Description"/>       	 </center>        </td>        <td width="30px">       	 <center>#<xsl:value-of select="Number"/>       	 </center>        </td>     	 </tr>      </table>      <table border="0">     	 <tr>        <td width="350" align="center">       	 <xsl:for-each select="Link">          <a>         	 <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>Try It</a>       	 </xsl:for-each>     |     <xsl:for-each select="Link2">          <a>         	 <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>Buy It</a>       	 </xsl:for-each>        </td>        <td width="100px">       	 <center>          <script language="Javascript" src="display.php">         	 <!--//-->          </script>Downloads: <script language="Javascript">ccount_display('<xsl:value-of select="Number"/>')</script>       	 </center>        </td>     	 </tr>      </table>   	 </center>   	 <br/>    </xsl:for-each> 	 </body>  </html>	</xsl:template></xsl:stylesheet>

    This is puzzling..

  9. heheheh. Spoke too soon. This is what firefox gives me once I upload my site to my server

    Error loading stylesheet: An XSLT stylesheet does not have an XML mimetype:http://www.mjf88.com/kev/ttab/database.xslt
    MY code atm:
    <?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"><html>	<head>  <title>Torrents</title>  <style>  body {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}	table{border-collapse: collapse; border: none;}	td {font-size: 8pt;	border: solid #FF0000 1px;}  </style>	</head>	<body>	<xsl:for-each select="Database/Torrent"><xsl:sort select="number" order="descending" />	<center><table border="0"> <tr>      <td width="400px"><center><xsl:value-of select="Name"/></center></td>      <td width="50px"><center><xsl:value-of select="Size"/></center></td>    </tr></table>     <table border="0"><tr>     <td width="180px"><center>Added: <xsl:value-of select="DateAdded"/></center></td>      <td width="270px"><center><xsl:value-of select="Type"/></center></td>      </tr>    </table>      <table border="0"><tr>     <td width="420px"><center><xsl:value-of select="Description"/></center></td>      <td width="30px"><center>#<xsl:value-of select="Number"/></center></td>      </tr>   </table>      <table border="0"><tr>     <td width="350" align="center"><xsl:for-each select="Link"/><a><xsl:attribute name="href"/><xsl:value-of select="@url"/>Try It</a>       |       <xsl:for-each select="Link2"/><a><xsl:attribute name="href"/><xsl:value-of select="@url"/>Buy It</a></td>      <td width="100px"><center>Downloads: </center></td>      </tr>   </table></center><br />		</xsl:for-each>	</body></html>	</xsl:template></xsl:stylesheet>

  10. It should be
    <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>

    Look at your code again... you have set it to method="xml". You should use that(xml) only if you want the output to be another xml document which is then retransformed with another stylesheet.P.S. I made a long speech about the variable and yet you use the attribute. It seems I'm not as convincing as I was hoping for :) .

    Thank you man. As soon as I get back to myhome(room) Ill change it. Sorry that I didnt listen lol :) But ur help has been critical for what I need. Ill let you know if it worked (of course)
  11. Thanks! It worked great!!!Heres my second problem. Now that its all done(this is try out, no real data is set yet). Firefox does not format the XML. Only Internet Explorer. If you try to load the XML file with the XSLT stylesheet in IE, it looks great, in forefox, notrhing gets formatted. Whats up with that?XML

    <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="database.xslt"?><Database>	  <Torrent> 	 <Name>Torrent 1</Name> 	 <Number>1</Number> 	 <Size>4.5GB</Size> 	 <Description>A good program</Description> 	 <DateAdded>April 15 1988</DateAdded> 	 <Type>Windows Application(ISO)</Type> 	 <Link url="http://www.google.com" />  </Torrent>  <Torrent> 	 <Name>Torrent 2</Name> 	 <Number>2</Number> 	 <Size>4.2GB</Size> 	 <Description>A good program also</Description> 	 <DateAdded>April 15 1948</DateAdded> 	 <Type>Windows Game(ISO)</Type> 	 <Link url="http://www.goog3le.com" />  </Torrent>	</Database>

    XSLT

    <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes">	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/><xsl:template match="/"><html>	<head>  <title>Torrents</title>	</head>	<body>	<xsl:for-each select="Database/Torrent"><xsl:sort select="number" order="descending" />	<table border="1"> <tr>      <td width="400px"><center><xsl:value-of select="Name"/></center></td>      <td width="50px"><center><xsl:value-of select="Size"/></center></td>    </tr></table>     <table border="1"><tr>     <td width="180px"><center>Added: <xsl:value-of select="DateAdded"/></center></td>      <td width="270px"><center><xsl:value-of select="Type"/></center></td>      </tr>    </table>      <table border="1"><tr>     <td width="420px"><center><xsl:value-of select="Description"/></center></td>      <td width="30px"><center>#<xsl:value-of select="Number"/></center></td>      </tr>   </table>      <table border="1"><tr><xsl:for-each select="Link">     <td width="350"><center><a><xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>Try It</a></center></td>      <td width="100px"><center>Downloads: </center></td>      </xsl:for-each></tr>   </table><br />		</xsl:for-each>	</body></html>	</xsl:template></xsl:stylesheet>

    Again this is all just testing...

×
×
  • Create New...