[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
xml/xsl won't display when used online
- To: <xml-dev@l...>
- Subject: xml/xsl won't display when used online
- From: "James Rayner" <rcxau@y...>
- Date: Sun, 23 Feb 2003 12:22:05 +1100
I have the following page setup.It is meant to parse the
XML/XSL and output the result into a <div> tag to display it
onscreen. It works fine offline but when uploaded online, it doesnt work.
You can see it online at http://vrtechau.tripod.com/games/games.html
.
Thanks in advance, sorry the code's bloated
James
GAMES.HTML
<?xml version="1.0"?> <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd"> <html
xmlns="http://www.w3.org/TR/xhtml1"> <head> <title>VR
Tech - Games</title>
<link rel="StyleSheet" href="../style.css"
type="text/css" media="screen" />
<SCRIPT LANGUAGE="javascript">
<!-- Here's the script --> function
dlxml() { var source = new
ActiveXObject("Msxml2.DOMDocument"); source.async =
false; source.resolveExternals =
false; source.load("topten.xml");
var stylesheet = new
ActiveXObject("Msxml2.DOMDocument"); stylesheet.async =
false; stylesheet.resolveExternals =
false; stylesheet.load("topten.xsl");
divInfo.innerHTML =
source.transformNode(stylesheet); } </script> </head> <body
> <center>
<!--NAVBAR--> <div class="body"
align="center"> <table cellspacing="0"
cellpadding="0"> <tr> <td
bgcolor="#000000" height="20" width="100"><div class="tnav"
align="center"><strong>Home</strong></div></td> </tr> <tr>
<td bgcolor="#000000" height="20" width="100"><div class="tnav"
align="center"><strong><a
href="news.html">News</a></strong></div></td> </tr> <tr>
<td bgcolor="#000000" height="20" width="100"><div class="tnav"
align="center"><strong><a
href="reviews.html">Reviews</a></strong></div></td> </tr> <tr>
<td bgcolor="#000000" height="20" width="100"><div class="tnav"
align="center"><strong><a href="online/online.html">Play
online</a></strong></div></td> </tr> <tr>
<td bgcolor="#000000" height="20" width="100"><div class="tnav"
align="center"><strong><a href="#">Downloads</a><br
/><br
/></strong></div></td> </tr> <tr>
<td bgcolor="#000000" height="20" width="100"><div class="tnav"
align="center"><strong>
<!-- The parsed XML/XSL should appear
here-->
<div
id="divInfo"></div></strong></div></td> </tr> </table> </center> </body> </html>
topten.xsl
<?xml version="1.0"?> <xsl:stylesheet
version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template
match="/"> <html> <head>
<link rel="stylesheet" href="../style.css" type="text/css"
/> </head> <body topmargin="0"
leftmargin="0" marginheight="0" marginwidth="0">
<xsl:apply-templates/> <div
class="body"><br /> <a href="../games/games.html"
target="_parent"> Visit the forums
TODAY </a></div></body> </html> </xsl:template> <!--
Formatting -->
<xsl:template match="topfive"> <span
class="tnav"><strong>Top
5</strong> </span><br
/> </xsl:template>
<xsl:template match="f1"> <span
class="body"> <a href=" {@location}"><xsl:value-of
select="."/></a> </span> </xsl:template> <xsl:template
match="f2"> <span class="body"> <a
href=" {@location}"><xsl:value-of
select="."/></a> </span> </xsl:template> <xsl:template
match="f3"> <span class="body"> <a
href=" {@location}"><xsl:value-of
select="."/></a> </span> </xsl:template> <xsl:template
match="f4"> <span class="body"> <a
href=" {@location}"><xsl:value-of
select="."/></a> </span> </xsl:template> <xsl:template
match="f5"> <span class="body"> <a
href=" {@location}"><xsl:value-of
select="."/></a> </span><br
/> </xsl:template> <xsl:template
match="newfive"> <span class="tnav"><strong>New
5</strong> </span><br
/> </xsl:template> <xsl:template
match="n1"> <span class="body"> <a
href=" {@location}"><xsl:value-of
select="."/></a> </span> </xsl:template> <xsl:template
match="n2"> <span class="body"> <a
href=" {@location}"><xsl:value-of
select="."/></a> </span> </xsl:template> <xsl:template
match="n3"> <span class="body"> <a
href=" {@location}"><xsl:value-of
select="."/></a> </span> </xsl:template> <xsl:template
match="n4"> <span class="body"> <a
href=" {@location}"><xsl:value-of
select="."/></a> </span> </xsl:template> <xsl:template
match="n5"> <span class="body"> <a
href=" {@location}"><xsl:value-of
select="."/></a> </span> </xsl:template>
</xsl:stylesheet>
topten.xml
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl"
href="main.xsl"?> <home>
<newfive /> <n1 location="http://vr_tech.tripod.com/games/online/ufoattack/index.html"
target="_blank">UFO Attack</n1> <n2 location="http://vr_tech.tripod.com/games/online/3ddriver/index.html"
target="_blank">3D Driver</n2> <n3 location="http://vr_tech.tripod.com/games/online/torpedo/torpedo.html"
target="_blank">Torpedo Alley</n3> <n4 location="http://vr_tech.tripod.com/games/online/jsnake1/snake1.html"
target="_blank">jSnake</n4> <n5 location="http://vr_tech.tripod.com/games/online/break1/break1.html"
target="_blank">BreakOut 1</n5>
</home>
<about name="RCXAU" email="rcxau@y..." question="Why
is the buggiest browser the most widespread" /> <VRtech
motto="Bringing you all things IT (in the near future
:-)" web="http://vrtechau.tripod.com/"
/>
|
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|