473,804 Members | 2,673 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 1633
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
1828
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 an output root element
4
5253
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
4617
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 System.Xml.XmlDocument() xmldoc.Load("test.xml")
4
4825
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
2197
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 - http://www.mentattech.com/themes/mentat/alchemist/index.html Regards,
1
2421
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
3130
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, $arguments);
2
2615
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 via the following statements: <xsl:template match="/">
1
2421
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
9706
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9577
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7615
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5519
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.