473,387 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

url redirects from xsl style sheet

I have a personal web server that imports from my weather station. The data is already in XML format. I created my xsl and it displays the data on the web page very nicely.

I have been unsuccessful on trying to link from the discriptor field. I'm trying to link to a more detailled report on each item to show a graph of the past 12 hours. I have the part done and this part. I need help breaking my roadblock to link the discriptor to the individual html page with the graph on that item.

ie.. wind speed showes the current data i\on the web page. I want to click on wind speed ( descriptor in the XSL ) to bbring up the next web page to display the wind graph data for the past 12 or 24 hours.

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <xsl:stylesheet version="1.0"
  3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
  4.   <html>
  5.   <body bgcolor="#999999">
  6.     <table border="1">
  7.       <tr bgcolor="#9acd32">
  8.         <th align="left">Date stamp</th> 
  9.         <th align="left">Time stamp</th> 
  10.         <th align="left">Outdoor Temp</th> 
  11.         <th align="left">Humidity </th> 
  12.         <th align="left">Bar Pressure Mb</th> 
  13.         <th align="left">Wind Speed</th> 
  14.         <th align="left">wind Dir</th> 
  15.         <th align="left">Angle</th> 
  16.       </tr>
  17.       <xsl:for-each select="/">
  18.       <tr>
  19.         <td bgcolor="#ccffcc"><xsl:value-of select="/ws2300/Date" /></td>
  20.         <td bgcolor="#ccffcc"><xsl:value-of select="/ws2300/Time" /></td>
  21.         <td bgcolor="#ccffcc"><xsl:value-of select="/ws2300/Temperature/Outdoor/Value" /></td>
  22.         <td bgcolor="#ccffcc"><xsl:value-of select="/ws2300/Humidity/Outdoor/Value" /></td>
  23.         <td bgcolor="#ccffcc"><xsl:value-of select="/ws2300/Pressure/Value" /></td>
  24.         <td bgcolor="#ccffcc"><xsl:value-of select="/ws2300/Wind/Value" /></td>
  25.         <td bgcolor="#ccffcc"><xsl:value-of select="/ws2300/Wind/Direction/Text" /></td>
  26.         <td bgcolor="#ccffcc"><xsl:value-of select="/ws2300/Wind/Direction/Dir0" /></td>
  27.       </tr>
  28.       </xsl:for-each>
  29.   </table>
  30.   </body>
  31.   </html>
  32. </xsl:template></xsl:stylesheet>
Aug 12 '06 #1
1 1867
Date stamp Time stamp Outdoor Temp Humidity Bar Pressure Mb Wind Speed wind Dir Angle
2006-08-12 15:08:34 88.7 19 1013.500 0.0 SE 135.0




xml data that is used


<?xml version="1.0" encoding="utf-8"?>
<ws2300 version="1.0">
<Date>2006-08-12</Date>
<Time>15:08:34</Time>
<Temperature>
<Indoor>
<Value>75.2</Value>
<Min>68.0</Min>
<Max>87.6</Max>
<MinTime>09:32</MinTime>
<MinDate>2006-06-13</MinDate>
<MaxTime>20:36</MaxTime>
<MaxDate>2006-05-30</MaxDate>
</Indoor>
<Outdoor>
<Value>88.7</Value>
<Min>50.2</Min>
<Max>106.5</Max>
<MinTime>06:15</MinTime>
<MinDate>2006-06-11</MinDate>
<MaxTime>11:35</MaxTime>
<MaxDate>2006-08-03</MaxDate>
</Outdoor>
</Temperature>
<Humidity>
<Indoor>
<Value>53</Value>
<Min>41</Min>
<Max>69</Max>
<MinTime>19:43</MinTime>
<MinDate>2006-06-11</MinDate>
<MaxTime>12:54</MaxTime>
<MaxDate>2006-07-23</MaxDate>
</Indoor>
<Outdoor>
<Value>19</Value>
<Min>11</Min>
<Max>96</Max>
<MinTime>18:29</MinTime>
<MinDate>2006-05-29</MinDate>
<MaxTime>06:51</MaxTime>
<MaxDate>2006-08-12</MaxDate>
</Outdoor>
</Humidity>
<Dewpoint>
<Value>278.0</Value>
<Min>29.1</Min>
<Max>79.2</Max>
<MinTime>10:27</MinTime>
<MinDate>2006-06-11</MinDate>
<MaxTime>07:34</MaxTime>
<MaxDate>2006-08-03</MaxDate>
</Dewpoint>
<Wind>
<Value>0.0</Value>
<Direction>
<Text>SE</Text>
<Dir0>135.0</Dir0>
<Dir1>112.5</Dir1>
<Dir2>135.0</Dir2>
<Dir3>112.5</Dir3>
<Dir4>0.0</Dir4>
<Dir5>0.0</Dir5>
</Direction>
<Min>0.0</Min>
<Max>29.5</Max>
<MinTime>15:10</MinTime>
<MinDate>2006-08-12</MinDate>
<MaxTime>20:12</MaxTime>
<MaxDate>2006-06-04</MaxDate>
</Wind>
<Windchill>
<Value>88.7</Value>
<Min>47.3</Min>
<Max>106.5</Max>
<MinTime>04:04</MinTime>
<MinDate>2006-06-05</MinDate>
<MaxTime>11:35</MaxTime>
<MaxDate>2006-08-03</MaxDate>
</Windchill>
<Rain>
<OneHour>
<Value>0.00</Value>
<Max>0.02</Max>
<MaxTime>18:40</MaxTime>
<MaxDate>2006-07-21</MaxDate>
</OneHour>
<TwentyFourHour>
<Value>0.00</Value>
<Max>0.02</Max>
<MaxTime>16:57</MaxTime>
<MaxDate>2006-07-22</MaxDate>
</TwentyFourHour>
<Total>
<Value>0.02</Value>
<Time>11:12</Time>
<Date>2006-06-03</Date>
</Total>
</Rain>
<Pressure>
<Value>1013.500</Value>
<Min>1001.600</Min>
<Max>1021.300</Max>
<MinTime>05:41</MinTime>
<MinDate>2006-06-03</MinDate>
<MaxTime>10:28</MaxTime>
<MaxDate>2006-07-07</MaxDate>
<Tendency>Rising</Tendency>
</Pressure>
<Forecast>Sunny</Forecast>
</ws2300>
Aug 12 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mark | last post by:
Hi - I want to allow users of an intranet application, to select their own colours etc. So I have a tbale in my database, which has fields called bgcolour, fontcolour etc. As I want all pages...
2
by: Luke Bellamy | last post by:
Hi, I have been looking for a way to incorperate several different style sheets into a web page (i.e cascading effect). I have looked into the @import statement which seems to do what I want but...
19
by: Roger | last post by:
How can I pass parameters to a style sheet? I have noticed a couple of sites are now passing variables to the style sheet, which appear to be substituted at run time. For example: <link...
5
by: Andrew Poulos | last post by:
If I have an external stylesheet that is @imported into my page and it has an element that looks like this: * html td { font-style: italic; } how can I use javascript to change the font...
7
by: Daniel Kaplan | last post by:
I have the item below at the top of my style sheet. And it seems that the font-szie is ignored. I know that my linked style sheet is being read, and used because if I remove the font-family line,...
1
by: Amanda H. | last post by:
I posted about this a few days ago, and I got a few suggestions that fixed part of my problem. I am using a PHP script to switch external style sheets when the viewer clicks on the style link. ...
8
by: pamelafluente | last post by:
Hi guys, Is it possible to add "onload" (via Javascript) a new class to the <styleheader section? If yes, how would that be done ? <style type="text/css" media="screen"> .NewStyleClass{...
10
by: pamelafluente | last post by:
Hi, this time I am trying to add a style on the fly.I wish equivalency with this one (only the menuItemStyle line): <head> <style type="text/css" media="screen"> ... some static styles ......
4
by: fjm | last post by:
Hello everyone. I’d like to know how to handle multiple style sheets. I have css tabs that have a style sheet and then I also have a separate style sheet for the content that goes inside the tab. ...
4
Frinavale
by: Frinavale | last post by:
So a while ago I created a Tab Strip Control (before the AjaxToolkit had theirs otherwise I would have probably just used theirs). When I looked at the AjaxToolkit control to see how they got...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...

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.