What where is the error in my XSLT document?

FrankStallone

Usenet Archive
Joined
Sep 8, 2005
Messages
1
Reaction score
0
I am just getting started in XML and I made my first xml, dtd and xslt file and XML spy said they were all valid and they worked.

This was the xslt doc that worked.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:eek:utput method="html" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <html> <head> <title>p00ts f4ct0r</title> <style type="text/css"> body,td,th { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF; } body { background-color: #006600; } a:link { color: #FF6600; text-decoration: none; } a:visited { text-decoration: none; color: #FF6600; } a:hover { text-decoration: underline; color: #FF6600; } a:active { text-decoration: none; color: #FF6600; } .test { width: 300px; } </style> </head> <body> <p><xsl:apply-templates select="toaddocument/title"/></p> <br/> <p><xsl:apply-templates select="toaddocument/author"/></p> <br/> <br/> <div class="test"> <p align="justify"><xsl:apply-templates select="toaddocument/section1"/></p> </div> <br/> <p><xsl:apply-templates select="toaddocument/section2"/></p> <br/> <p><xsl:apply-templates select="toaddocument/section3"/></p> <br/> <br/> <br/> <p><xsl:apply-templates select="toaddocument/score"/></p> </body> </html> </xsl:template> </xsl:stylesheet>

It's very basic and was more or less a test.
So then I took the code from my w3c validated xhtml made site and put it into the xslt and I have problems.

In IE it just shows a white page. Firefox shows everything but the background is white. I can't seem to change it at all.

Here is that code, can anyone see what the problem is?

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:eek:utput method="html" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>website template</title> <meta name="author" content="toadwarrior" /> <meta name="robots" content="all" /> <script type="text/javascript"> <!-- var _nwWnd function go(url, features) { closeWin; _nwWnd = window.open(url, "title", features); _nwWnd.focus; }

function closeWin{
if(_nwWnd && !_nwWnd.closed && _nwWnd.open) {
_nwWnd.close;
_nwWnd=null;
}
}

// -->
</script>
<style type="text/css">
body,td,th { font-family: Arial, Helvetica, sans-serif; font-size:
12px; color: #FFFFFF; }

body { background-color: #006600; }

..cssnav
{
position: relative;
font-family: arial, helvetica, sans-serif;
background: url(http://www.toadwarrior.com/images/over.jpg) no-repeat; white-space: nowrap; display: block; width: 85px; height: 22px; margin: 0; padding: 0; }

..cssnav a
{
display: block;
color: #000000;
font-size: 11px;
width: 85px;
height: 22px;
display: block;
float: left;
color: #FFFFFF;
text-decoration: none;
}

..cssnav img
{
width: 85px;
height: 22px;
border: 0
}

* html a:hover
{
visibility:visible
}

..cssnav a:hover img
{
visibility:hidden
}

..cssnav span
{
position: absolute;
left: 8px;
top: 4px;
margin: 0px;
padding: 0px;
cursor: pointer;
}
..links {
position: absolute;
left: 166px;
top: 28px;
z-index: 2;
}
..qbabe {
position: absolute;
left: 10px;
top: 10px;
z-index: 1;
}
..logo {
position: absolute;
left: 250px;
top: 0px;
z-index: 1;
}
..content {
position: absolute;
left: 166px;
top: 220px;
z-index: 2;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
color: #000000;
background-color: #8c7f62;
padding: 5px;
height: 400px;
width: 734px;
border: 1px solid #000000;
z-index: 2;
}
..copy {
position: absolute;
left: 10px;
top: 522px;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-style: normal;
color: #000000;
background-color: #70654a;
padding: 5px;
width: 126px;
border: none;
z-index: 2;
}
..copy a:link {
color: #FFFFFF;
text-decoration: none;
}
..copy a:visited {
text-decoration: none;
color: #FFFFFF;
}
..copy a:hover {
text-decoration: underline;
color: #FFFFFF;
}
..copy a:active {
text-decoration: none;
color: #FFFFFF;
}
..content a:link {
color: #FFFFFF;
text-decoration: none;
}
..content a:visited {
text-decoration: none;
color: #FFFFFF;
}
..content a:hover {
text-decoration: underline;
color: #FFFFFF;
}
..content a:active {
text-decoration: none;
color: #FFFFFF;
}
</style>
</head>
<body>
<!-- The Bond-like Girl On Page -->
<div class="qbabe" title="quake bird">
<img src="http://www.toadwarrior.com/images/qbabe.gif" width="126" height="389" alt="qbabe" /> </div> <!-- The Logo --> <div class="logo" title="logo"> <img src="http://www.toadwarrior.com/images/logo.gif" width="709" height="211" alt="toadwarrior.com logo" /> </div> <!-- Navigation Links --> <div class="links" title="links">  <div class="cssnav"> <a href="http://www.toadwarrior.com/index.php" title="home"><img

src="http://www.toadwarrior.com/images/link.jpg" alt="home" /><span>home</span> </a> </div> <div class="cssnav"> <a href="http://www.toadwarrior.com/quake.php" title="quake"><img

src="http://www.toadwarrior.com/images/link.jpg" alt="quake" /><span>quake</span> </a> </div> <div class="cssnav"> <a href="http://www.toadwarrior.com/flash.php" title="flash images"><img

src="http://www.toadwarrior.com/images/link.jpg" alt="flash images" /><span>flash / images</span> </a> </div> <div class="cssnav"> <a href="http://www.toadwarrior.com/write.php" title="writing"><img

src="http://www.toadwarrior.com/images/link.jpg" alt="writing" /><span>writing</span> </a> </div> <div class="cssnav"> <a href="http://www.toadwarrior.com/links.php" title="links"><img

src="http://www.toadwarrior.com/images/link.jpg" alt="links" /><span>links</span> </a> </div> <div class="cssnav"> <a href="http://www.toadwarrior.com/about.php" title="about"><img

src="http://www.toadwarrior.com/images/link.jpg" alt="about" /><span>about</span> </a> </div></div> <!-- Copyright Info --> <div class="copy" title="copyright">  <p> 2005 <a href="http://www.toadwarrior.org" target="_blank">ToadWarrior</a>. No part of this site may be used

without permission.
</p>
<p>
My other sites:<br />
<a href="http://www.curiosityshoppe.org"
target="_blank">Curiosityshoppe.Org</a><br />
<a href="http://www.gameboyhq.net"
target="_blank">GameboyHQ.Net</a><br />
<a href="http://www.toadwarrior.com/gbhq/index.html" target="_blank">GBHQ v1.0 Archive</a> </p> <p> <a href="http://www.macromedia.com/go/getflashplayer/" target="_blank"><img

src="http://www.toadwarrior.com/images/get_flashplayer.gif" width="88" height="31" border="0" alt="download flash

for use on toadwarrior.com" /></a>
<br />
<a href="http://www.macromedia.com" target="_blank"><img src="http://www.toadwarrior.com/images/studiomx.gif"

width="88" height="31" border="0" alt="toadwarrior.com is made with studio mx" /></a> <br /> <a href="http://validator.w3.org/check?uri=referer" target="_blank"><img src="http://www.w3.org/Icons/valid-

xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" border="0" /></a> </p></div> <!-- Content --> <div class="content" title="content"> <p align="justify"> <p><xsl:apply-templates select="toaddocument/title"/></p> <br/> <p><xsl:apply-templates select="toaddocument/author"/></p> <xsl:apply-templates select="toaddocument/section1"/></p> <p><xsl:apply-templates select="toaddocument/section2"/></p> <p><xsl:apply-templates select="toaddocument/section3"/></p> <p><xsl:apply-templates select="toaddocument/score"/></p> </div> </body> </html> </xsl:template> </xsl:stylesheet>
 

Tjerk Wolterink

Usenet Archive
Joined
Sep 18, 2004
Messages
218
Reaction score
0
FrankStallone said:
I am just getting started in XML and I made my first xml, dtd and xslt file and XML spy said they were all valid and they worked.

This was the xslt doc that worked.
[snip]

I am not going to read all your code,
but all i can say is, that it is better
to perform the xsl transformation server-side,

client side implementations are not so perfect.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,245
Members
248,133
Latest member
DujonT

Latest Threads

Top