XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 10th, 2004, 01:51 PM
weatherspyer weatherspyer is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 1 weatherspyer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation XSL Transformation HELP?!!!

I am trying to transform a weather XML file.

I am using this code on an asp page...


<html>
<body><script type="text/javascript">// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("KHZY.xml")

// Load XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("KHZY.xsl")

// Transform
document.write(xml.transformNode(xsl))</script>

</body>
</html>



This is the xml code I will be using...

<?xml version="1.0" encoding="UTF-8" ?>
<current_observation>
<credit>NOAA's National Weather Service</credit>
<credit_URL>http://weather.gov/</credit_URL>
<image>
<url>http://weather.gov/images/xml_logo.gif</url>
<title>NOAA's National Weather Service</title>
<link>http://weather.gov</link>
</image>
<suggested_pickup>15 minutes after the hour</suggested_pickup>
<suggested_pickup_period>60</suggested_pickup_period>
<location>Ashtabula County Airport, OH</location>
<station_id>KHZY</station_id>
<latitude>NA</latitude>
<longitude>NA</longitude>
<elevation>NA</elevation>
<observation_time>Last Updated on Oct 10, 12:53 pm EDT</observation_time>
<weather>Overcast</weather>
<temperature_string>59 F (15 C)</temperature_string>
<temp_f>59</temp_f>
<temp_c>15</temp_c>
<relative_humidity>60</relative_humidity>
<wind_string>From the Variable at 6 MPH</wind_string>
<wind_dir>Variable</wind_dir>
<wind_degrees>999</wind_degrees>
<wind_mph>5.75</wind_mph>
<wind_gust_mph>0</wind_gust_mph>
<pressure_string>30.24" (1023.9 mb)</pressure_string>
<pressure_mb>1023.9</pressure_mb>
<pressure_in>30.24</pressure_in>
<dewpoint_string>45 F (7 C)</dewpoint_string>
<dewpoint_f>45</dewpoint_f>
<dewpoint_c>7</dewpoint_c>
<heat_index_string>Not Applicable</heat_index_string>
<heat_index_f>Not Applicable</heat_index_f>
<heat_index_c>Not Applicable</heat_index_c>
<windchill_string>58 F (14 C)</windchill_string>
<windchill_f>58</windchill_f>
<windchill_c>14</windchill_c>
<visibility>10.00 mi.</visibility>
<two_day_history_url>http://www.weather.gov/data/obhistory/KHZY.html</two_day_history_url>
<ob_url>http://www.nws.noaa.gov/data/METAR/KHZY.1.txt</ob_url>
<disclaimer_url>http://weather.gov/disclaimer.html</disclaimer_url>
<copyright_url>http://weather.gov/disclaimer.html</copyright_url>
<privacy_policy_url>http://weather.gov/notice.html</privacy_policy_url>
</current_observation>

I have tried to make an xsl page that would work and I can not seem to make it work. Can somebody help me by making a very simple xsl page that works.

Thanks So Much!!!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XSL Transformation HELP?!!!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT