473,585 Members | 2,512 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:styleshe et 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="toaddoc ument/title"/></p>
<br/>
<p><xsl:apply-templates select="toaddoc ument/author"/></p>
<br/>
<br/>
<div class="test">
<p align="justify" ><xsl:apply-templates
select="toaddoc ument/section1"/></p>
</div>
<br/>
<p><xsl:apply-templates select="toaddoc ument/section2"/></p>
<br/>
<p><xsl:apply-templates select="toaddoc ument/section3"/></p>
<br/>
<br/>
<br/>
<p><xsl:apply-templates select="toaddoc ument/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:styleshe et 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>websit e template</title>
<meta name="author" content="toadwa rrior" />
<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:visi ble
}

..cssnav a:hover img
{
visibility:hidd en
}

..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="toadwarrio r.com logo" />
</div>
<!-- Navigation Links -->
<div class="links" title="links">
 <div class="cssnav">
<a href="http://www.toadwarrior .com/index.php" title="home"><i mg

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>writin g</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="copyrigh t">
 <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.curiositysh oppe.org"
target="_blank" >Curiosityshopp e.Org</a><br />
<a href="http://www.gameboyhq.n et"
target="_blank" >GameboyHQ.Ne t</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="toadwarrio r.com is made with
studio mx" /></a>
<br />
<a href="http://validator.w3.or g/check?uri=refer er"
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="toaddoc ument/title"/></p>
<br/>
<p><xsl:apply-templates select="toaddoc ument/author"/></p>
<xsl:apply-templates select="toaddoc ument/section1"/></p>
<p><xsl:apply-templates select="toaddoc ument/section2"/></p>
<p><xsl:apply-templates select="toaddoc ument/section3"/></p>
<p><xsl:apply-templates select="toaddoc ument/score"/></p>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Sep 8 '05 #1
2 1626
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:styleshe et 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="toaddoc ument/title"/></p>
<br/>
<p><xsl:apply-templates select="toaddoc ument/author"/></p>
<br/>
<br/>
<div class="test">
<p align="justify" ><xsl:apply-templates
select="toaddoc ument/section1"/></p>
</div>
<br/>
<p><xsl:apply-templates select="toaddoc ument/section2"/></p>
<br/>
<p><xsl:apply-templates select="toaddoc ument/section3"/></p>
<br/>
<br/>
<br/>
<p><xsl:apply-templates select="toaddoc ument/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:styleshe et 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>websit e template</title>
<meta name="author" content="toadwa rrior" />
<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:visi ble
}

.cssnav a:hover img
{
visibility:hidd en
}

.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="toadwarrio r.com logo" />
</div>
<!-- Navigation Links -->
<div class="links" title="links">
<div class="cssnav">
<a href="http://www.toadwarrior .com/index.php" title="home"><i mg

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>writin g</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="copyrigh t">
<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.curiositysh oppe.org"
target="_blank" >Curiosityshopp e.Org</a><br />
<a href="http://www.gameboyhq.n et"
target="_blank" >GameboyHQ.Ne t</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="toadwarrio r.com is made with
studio mx" /></a>
<br />
<a href="http://validator.w3.or g/check?uri=refer er"
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="toaddoc ument/title"/></p>
<br/>
<p><xsl:apply-templates select="toaddoc ument/author"/></p>
<xsl:apply-templates select="toaddoc ument/section1"/></p>
<p><xsl:apply-templates select="toaddoc ument/section2"/></p>
<p><xsl:apply-templates select="toaddoc ument/section3"/></p>
<p><xsl:apply-templates select="toaddoc ument/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
1822
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 possible to control this, i.e. not genrating a name space attribute in the root of the output, or generating other attributes in the root? The following illustrates the case. The XSLT script specifies...
4
5234
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 (document.getElementById) { var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); } if (x) {
17
4596
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 the commented line, this is the culprit ** Dim xsl As New System.Xml.Xsl.XslTransform() Dim xw As New System.IO.StringWriter() Dim xmldoc As New System.Xml.XmlDocument() Dim xsldoc As New...
4
4813
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 methods I see use files. I want to create a Xslt transform via code? Any examples would be great.
3
2188
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 these products and then, give me your opinion about the development environment or recommend me some other that you know. XML IDE's - http://xslt-process.sourceforge.net -...
1
2410
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 message "Too many fields defined." in ImportErrors column. I was wondering is there any solution to fix the problem. Please reply.
2
3124
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 ProduceXHTML($xml, $xsl){ $xh = xslt_create(); xslt_set_encoding ($xh, CODE_PAGE); $arguments = array('/_xml' => $xml, '/_xsl' => $xsl); $result = @xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL,...
2
2605
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 builds an input form. The input form, while having some non dynamic hidden INPUT tags, has one hidden INPUT tag that is dynamic. In the XSL file I attempt to bring this dynamic hidden INPUT tag in...
1
2405
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. XSLTc (Compiler for XSLT stylesheets, that generates .NET assemblies) 2. Performance improvements in the XslCompiledTransform
0
7908
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main...
0
7836
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7950
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6606
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5389
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3835
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2343
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.