SunQuest
           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:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old September 4th, 2003, 10:05 AM
degmo degmo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 1 degmo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry XML/XSL Question

Hey folks,
I have the following simple xml document called myxml.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<RegionInfo>
<Region>
<RegionName>Northeast</RegionName>
<Area>
<AreaID>AR000</AreaID>
</Area>
</Region>
<Region><RegionName>EastCentral</RegionName>
<Area>
<AreaID>AR120</AreaID>
</Area>
</Region>
</RegionInfo>

test.xsl looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


<xsl:template match="/">
<html>
<body>
<h2>Region Info</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Region</th>
</tr>
<xsl:for-each select="RegionInfo/Region">
<tr>
<td><xsl:value-of select="RegionName"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>

</xsl:stylesheet>

Now, when I open the XML file in a browser, I should be getting the two region names as rows of a table. But, I only get the table heading and not the region names. When I try this on my co-workers' machine, it works fine. I am running I.E 6.0 and I have MSXML4.0 SP2 Parser and SDK installed on my machine. Please help!!!!!!!!!!!!!!!!!!!!!

Reply With Quote
  #2  
Old September 5th, 2003, 01:50 AM
hhibo hhibo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 8 hhibo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi,

I could see nothing wrong with your files. I tested them on my own computer, and they worked fine. I got a nice little table with a green header row and two cells with region names.

I am running Explorer 5.0 and MSXML.

I have also downloaded the MSXML-validation tools which allow you to see the xsl-output passed to the browser. I find that very useful when testing for errors. This is the output from your files - and as far as I can see, it is a neat little table. It could of course have something to do with explorer 6, but I can't imagine what it would have against this code:


output:

<html>
<body>
<h2>Region Info</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Region</th>
</tr>
<tr>
<td>Northeast</td>
</tr>
<tr>
<td>EastCentral</td>
</tr>
</table>
</body>
</html>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML/XSL Question


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