472,353 Members | 1,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

What where is the error in my XSLT document?

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:output 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:output 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>

Sep 8 '05 #1
2 1575
FrankStallone wrote:
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.
Sep 8 '05 #2
Perhaps it is a problem with the AltovaXML processor - try using an
XSLT Debugger that uses more reliable industry standard XSLT processors
like Apache Xalan, MSXML 3.0, MSXML 4.0, System.XML (Microsoft .NET) or
Saxon. http://www.stylusstudio.com/xslt_debugger.html

Sincerely,
The Stylus Studio Team
http://www.stylusstudio.com
FrankStallone wrote:
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:output 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:output 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>


Sep 8 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Wolfgang | last post by:
XSLT transformations by default seem to pass name space attributes into the root element of their output (example below). QUESTION: Is it...
4
by: Stephen | last post by:
I have the following that outputs an xml file to a div using ajax: <script type="text/javascript"> function ajaxXML(url,control_id){ if...
17
by: rox.scott | last post by:
Can someone please explain why this happens? The expected output is 3, but uncommenting line 7 makes the output 0. Why ??? VB.NET code: ** note...
4
by: schneider | last post by:
Anyone know if there is a way to dynamicly create a Xslt template/s and use them as an xml transform with-out use files for the Xslt? All the...
3
by: Teksure | last post by:
Hi group, searching in the Internet I found two products for XML which incorporate a very robust debugger for XSL/XSLT, I would like you to see...
1
by: Srini | last post by:
Hi, I am trying to import an xml file which has more than 255 fields. Access is unable to import the xml file into tables and gives the error...
2
by: al3x4nder | last post by:
I`m need hanling XSLT errors in my script, before I`m use Sablotron, that has nice interface for it: ------------8<------------------ function...
2
by: slacker | last post by:
By clicking a link on a website I set a USERINFO cookie and then I redirect to a program which ultimately executes an XSL file which dynamically...
1
by: Sergey Dubinets | last post by:
In effort to prioritize our goals we composed the list of random features each of them may add value to set of XSLT tools offered from Microsoft. ...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.