473,770 Members | 1,787 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting XML, XSL, and HTML to work

To begin, I'm using Adobe's Spry Framework for all my data in my XML
page, it saves space and code on the HTML. Well, I want to make it so
that certain cells are chosen and are either highlighted with green or
red depending on a condition.

=============== =============== ======XML====== =============== =============== ==

<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="bowlgames .xsl"?>
<bowlgames>
<game id="1">
<name>Poinset ta Bowl</name>
<date>12/19/06 8:00 PM</date>
<channel>ESPN 2</channel>
<team1>TCU</team1>
<team2>Northe rn Illinois</team2>
<score>37-7</score>
<winner>TCU</winner>
<steve>TCU</steve>
<brandon>TCU</brandon>
</game>

<game id="2">
<name>Las Vegas Bowl</name>
<date>12/21/06 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>BYU</team1>
<team2>Oregon </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>BYU</steve>
<brandon</brandon>
</game>

<game id="3">
<name>New Orleans Bowl</name>
<date>12/22/06 8:00 PM</date>
<channel>ESPN 2 HD</channel>
<team1>Rice</team1>
<team2>Troy</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Rice</steve>
<brandon</brandon>
</game>

<game id="4">
<name>Papajohns .com Bowl</name>
<date>12/23/06 1:00 PM</date>
<channel>ESPN 2 HD</channel>
<team1>South Florida</team1>
<team2>East Carolina</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>East Carolina</steve>
<brandon</brandon>
</game>

<game id="5">
<name>New Mexico Bowl</name>
<date>12/23/06 4:30 PM</date>
<channel>ESPN HD</channel>
<team1>New Mexico</team1>
<team2>San Jose State</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>San Jose State</steve>
<brandon</brandon>
</game>

<game id="6">
<name>Bell Helicopter Armed Forces Bowl</name>
<date>12/23/06 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>Tulsa</team1>
<team2>Utah</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Tulsa</steve>
<brandon</brandon>
</game>

<game id="7">
<name>Hawaii Bowl</name>
<date>12/24/06 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>Arizon a State</team1>
<team2>Hawaii </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Arizon a State</steve>
<brandon</brandon>
</game>

<game id="8">
<name>Motor City Bowl</name>
<date>12/26/06 7:30 PM</date>
<channel>ESPN HD</channel>
<team1>Middle Tennessee</team1>
<team2>Centra l Michigan</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Centra l Michigan</steve>
<brandon</brandon>
</game>

<game id="9">
<name>Emerald Bowl</name>
<date>12/27/06 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>Florid a State</team1>
<team2>UCLA</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>UCLA?</steve>
<brandon</brandon>
</game>

<game id="10">
<name>Independe nce Bowl</name>
<date>12/28/06 4:30 PM</date>
<channel>ESPN HD</channel>
<team1>Oklaho ma State</team1>
<team2>Alabam a</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Oklaho ma State</steve>
<brandon</brandon>
</game>

<game id="11">
<name>Holiday Bowl</name>
<date>12/28/06 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>Californ ia</team1>
<team2>Texas A&amp;M</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Californ ia</steve>
<brandon</brandon>
</game>

<game id="12">
<name>Texas Bowl</name>
<date>12/28/06 8:00 PM</date>
<channel>NFL Network</channel>
<team1>Rutger s</team1>
<team2>Kansas State</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Rutger s</steve>
<brandon</brandon>
</game>

<game id="13">
<name>Music CityBowl</name>
<date>12/29/06 1:00 PM</date>
<channel>ESPN HD</channel>
<team1>Clemso n</team1>
<team2>Kentucky </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Clemso n</steve>
<brandon</brandon>
</game>

<game id="14">
<name>Brut Sun Bowl</name>
<date>12/29/06 2:00 PM</date>
<channel>CBS</channel>
<team1>Oregon State</team1>
<team2>Missouri </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Missouri ?</steve>
<brandon</brandon>
</game>

<game id="15">
<name>Liberty Bowl</name>
<date>12/29/06 4:30 PM</date>
<channel>ESPN HD</channel>
<team1>Housto n</team1>
<team2>South Carolina</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>South Carolina</steve>
<brandon</brandon>
</game>

<game id="16">
<name>Insight Bowl</name>
<date>12/29/06 7:30 PM</date>
<channel>NFL Network</channel>
<team1>Texas Tech</team1>
<team2>Minnesot a</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Minnesot a</steve>
<brandon</brandon>
</game>

<game id="17">
<name>Champs Sports Bowl</name>
<date>12/29/06 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>Purdue </team1>
<team2>Maryland </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Purdue </steve>
<brandon</brandon>
</game>

<game id="18">
<name>Meineke Car Care Bowl</name>
<date>12/30/06 1:00 PM</date>
<channel>ESPN HD</channel>
<team1>Navy</team1>
<team2>Boston College</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Navy</steve>
<brandon</brandon>
</game>

<game id="19">
<name>Alamo Bowl</name>
<date>12/30/06 4:30 PM</date>
<channel>ESPN HD</channel>
<team1>Texas</team1>
<team2>Iowa</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Texas</steve>
<brandon</brandon>
</game>

<game id="20">
<name>Chick-fil-A Bowl</name>
<date>12/30/06 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>Georgi a</team1>
<team2>Virgin ia Tech</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Virgin ia Tech</steve>
<brandon</brandon>
</game>

<game id="21">
<name>MPC Computers Bowl</name>
<date>12/31/06 7:30 PM</date>
<channel>ESPN HD</channel>
<team1>Miami</team1>
<team2>Nevada </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Miami? </steve>
<brandon</brandon>
</game>

<game id="22">
<name>Outback Bowl</name>
<date>1/1/07 11:00 AM</date>
<channel>ESPN HD</channel>
<team1>Tennesse e</team1>
<team2>Penn State</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Tennesse e</steve>
<brandon</brandon>
</game>

<game id="23">
<name>Cotton Bowl</name>
<date>1/1/07 11:30 AM</date>
<channel>FOX</channel>
<team1>Auburn </team1>
<team2>Nebraska </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Nebraska ?</steve>
<brandon</brandon>
</game>

<game id="24">
<name>Gator Bowl</name>
<date>1/1/07 1:00 PM</date>
<channel>CBS</channel>
<team1>West Virginia</team1>
<team2>Georgi a Tech</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>West Virginia</steve>
<brandon</brandon>
</game>

<game id="25">
<name>Capital One Bowl</name>
<date>1/1/07 1:00 PM</date>
<channel>ABC HD</channel>
<team1>Arkansas </team1>
<team2>Wisconsi n</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Wisconsi n</steve>
<brandon</brandon>
</game>

<game id="26">
<name>Rose Bowl</name>
<date>1/1/07 5:00 PM</date>
<channel>ABC HD</channel>
<team1>USC</team1>
<team2>Michigan </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Michigan </steve>
<brandon</brandon>
</game>

<game id="27">
<name>Fiesta Bowl</name>
<date>1/1/07 8:00 PM</date>
<channel>FOX</channel>
<team1>Boise State</team1>
<team2>Oklahoma </team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Oklahoma </steve>
<brandon</brandon>
</game>

<game id="28">
<name>Orange Bowl</name>
<date>1/2/07 8:00 PM</date>
<channel>FOX</channel>
<team1>Louisvil le</team1>
<team2>Wake Forest</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Louisvil le</steve>
<brandon</brandon>
</game>

<game id="29">
<name>Sugar Bowl</name>
<date>1/3/07 8:00 PM</date>
<channel>FOX</channel>
<team1>Notre Dame</team1>
<team2>LSU</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>LSU</steve>
<brandon</brandon>
</game>

<game id="30">
<name>Internati onal Bowl</name>
<date>1/6/07 8:00 PM</date>
<channel>ESPN 2 HD</channel>
<team1>Cincinna ti</team1>
<team2>Wester n Michigan</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Cincinna ti</steve>
<brandon</brandon>
</game>

<game id="31">
<name>GMAC Bowl</name>
<date>1/7/07 8:00 PM</date>
<channel>ESPN HD</channel>
<team1>Ohio</team1>
<team2>Southe rn Miss</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Southe rn Miss</steve>
<brandon</brandon>
</game>

<game id="32">
<name>BCS Championship Game</name>
<date>1/8/07 8:00 PM</date>
<channel>FOX</channel>
<team1>Florid a</team1>
<team2>Ohio State</team2>
<score>N/A</score>
<winner>N/A</winner>
<steve>Ohio State</steve>
<brandon</brandon>
</game>

</bowlgames>

=============== =============== ==========XSL== =============== =============== ===
<?xml version="1.0" encoding="ISO-8859-1"?><!--
DWXMLSource="bo wlgames.xml" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:spry="htt p://ns.adobe.com/spry/">
<xsl:template match="/">
<xsl:for-each select="bowlgam es/game">
<div align="left" class="ContentM ain" style="position :absolute;
left:144px; top:398px; z-index:3; width: 697px;"
spry:region="ds BowlGame" >
<table width="100%" border="1" cellpadding="1" cellspacing="0"
bordercolor="#0 00000" align="center">
<tr>
<th width="3%" onclick="dsBowl Game.sort('@id' );">#</th>
<th onclick="dsBowl Game.sort('stev e');">Steve's Pick</th>
<th onclick="dsBowl Game.sort('bran don');">Brandon 's Pick</th>
</tr>
<tr spry:repeat="ds BowlGame">
<td align="center"> {@id}</td>
<xsl:choose>
<xsl:when test="bowlgames/game/steve = bowlgames/game/winner">
<td align="center"> <span
style="color:#0 0FF00">{steve}</span></td>
</xsl:when>
<xsl:otherwis e>
<td align="center"> <span
style="color:#F F0000">{steve}</span></td>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="bowlgames/game/brandon =
bowlgames/game/winner">
<td align="center"> <span
style="color:#0 0FF00">{brandon }</span></td>
</xsl:when>
<xsl:otherwis e>
<td align="center"> <span
style="color:#F F0000">{brandon }</span></td>
</xsl:otherwise>
</xsl:choose>
</tr>
</table>
</div>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

=============== =============== =====HTML====== =============== =============== =

This is only a code snippet of the whole HTML file, because the XML
doesn't affect anyone else.

<div align="left" class="ContentM ain" style="position :absolute;
left:144px; top:398px; z-index:3; width: 697px;"
spry:region="ds BowlGame" >
<table width="100%" border="1" cellpadding="1" cellspacing="0"
bordercolor="#0 00000" align="center">
<tr>
<th width="3%" onclick="dsBowl Game.sort('@id' );">#</th>
<th width="25%" onclick="dsBowl Game.sort('name ');">Bowl Name</th>
<th width="15%" onclick="dsBowl Game.sort('date ');">Date &amp;
Time</th>
<th width="10%"
onclick="dsBowl Game.sort('chan nel');">Channel </th>
<th width="13%" onclick="dsBowl Game.sort('team 1');">Team 1</th>
<th width="13%" onclick="dsBowl Game.sort('team 2');">Team 2</th>
<th width="10%" onclick="dsBowl Game.sort('scor e');">Score</th>
<th width="8%" onclick="dsBowl Game.sort('winn er');">Winner</th>
<!--<th onclick="dsBowl Game.sort('stev e');">Steve's Pick</th>
<th onclick="dsBowl Game.sort('bran don');">Brandon 's Pick</th>-->
</tr>
<tr spry:repeat="ds BowlGame">
<td align="center"> {@id}</td>
<td align="center"> {name}</td>
<td align="center"> {date}</td>
<td align="center"> {channel}</td>
<td align="center"> {team1}</td>
<td align="center"> {team2}</td>
<td align="center"> {score}</td>
<td align="center"> {winner}</td>
<!--<td align="center"> {steve}</td>
<td align="center"> {brandon}</td>-->
</tr>
</table>
</div>

Any suggestions, help, what not is greatly appreciated!

Dec 20 '06 #1
0 1318

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

Similar topics

4
2757
by: PHPkemon | last post by:
Hi there, A few weeks ago I made a post and got an answer which seemed very logical. Here's part of the post: PHPkemon wrote: > I think I've figured out how to do the main things like storing products in
3
2586
by: James | last post by:
Please help - getting very desperate! Sun, 12 October 2003 05:39 I have PHPDEV 4.2.3 from Firepages.com.au as the upgrade to 4.3.0 did not work. I also had an abortive download from PHP.NET as I could not configure Apache myself. The REAL problem is that PHPmyAdmin works and sees my test database Wines.... But my PHP program does not!
4
2804
by: Mxsmanic | last post by:
The require() I'm using in a PHP script has stopped working after I moved from PHP4 and Apache 1.3.x to PHP5 and Apache 2.x. Now I get messages like this: Warning: main(/includes/ReloadScript.html) : failed to open stream: No such file or directory in /usr/local/www/htdocs/main/AOLCompression.php on line 14 Fatal error: main() : Failed opening required '/includes/ReloadScript.html' (include_path='.:/usr/local/lib/php') in
4
2414
by: projecktzero | last post by:
Well, I've managed to get an image into a postgre database, but now I'm having trouble getting it out. #! /usr/bin/env python from pyPgSQL import PgSQL def main(): connectdb = PgSQL.connect('server:port:database:username:password') cur = connectdb.cursor()
3
4326
by: Mr. x | last post by:
Hello, I have simple table <table id = "mytable" ....> .... </table> I want to get the left position of the table. Everything I did getting wrong :
17
2083
by: Howard Kaikow | last post by:
How do I find where I am screwing up? Using the following in Eudora, and equivalent links elsewhere, the URLs with the # get truncated just before the #. <a href="http://www.standards.com/links.html?FailureToDeleteToolbar" eudora="autourl">http://www.standards.com/links.html?FailureToDeleteToolbar< br><br> </a><a href="http://www.standards.com/links.html#FailureToDeleteToolbar"...
0
1749
by: =?Utf-8?B?cGI2NDgxNzQ=?= | last post by:
We have been having this problem for months and always assumed it was because of our somewhat complicated setup. I have just spent almost all of today making this into a simple example that can be easily reproduced and it seems like a major .NET flaw/limitation that I was hoping you could explain to me as it is really frustrating me. I just want to be able to get info for a row clicked, whether it is a Repeater, GridView, etc. I have...
10
2285
by: jonathan184 | last post by:
Hi I tried getting this to work through dreamweaver but it did not. So i found a n example on the internet , i followed everything exactly the search script does not work. Could somebody help me this please. Thanks for your help in advance. The form and script are on the same page. <?php require_once('../Connections/rs_ais.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
1
2687
by: ced69 | last post by:
having trouble getting marquee to work get object required errors tring t <title>This Month at the Chamberlain Civic Center</title> <link href="styles.css" rel="stylesheet" type="text/css" /> <script src="Dunbarlab9.js" type="text/javascript"></script> <script type="text/javascript">
9
3543
vikas251074
by: vikas251074 | last post by:
I am not getting date value in spite of my good effort. This code was working in my last office where I work. Now I am trying to work at my home pc. but not getting date value. Any can help me why this happens. This is my part of code given below. <%@ Language=VBScript%> <%Option Explicit%> <html> <head> <title>SABF</title> <!--#include file="font.css"-->
0
9617
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
10257
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8931
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 project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6710
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
5354
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...
1
4007
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
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
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.