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 August 30th, 2004, 11:05 PM
Rogelio Rogelio is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 104 Rogelio User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 43 m 32 sec
Reputation Power: 6
Send a message via AIM to Rogelio
nothing shows UP!! (frustration! help!!)

xsl file...
Code:
<?xml version ="1.0"?>
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0">
<xsl:template match ="/">
	<p align="center">
	<font color ="blue">
	Piranha palace...
	</font>
	</p>
	<xsl:for-each select="SUMMARY/PRODUCT">
			<b>PRODUCT ID:</b><xsl:value-of select = "./@ID" /> <br/>
			NAME: <xsl:value-of select ="@NAME"/> <br/>
			PRICE PER UNIT : <xsl:value-of select = "@PRICE"/>
			<br/><br/>
			<xsl:for-each select = "ORDER">
			<b>ORDER NUMBER: <xsl:value-of select ="@ID"/></b><br/>
			SHIPPING ADDRESS: <xsl:value-of select ="SHIP_ADD"/>
			TOTAL QUANTITY: <xsl:value-of select ="QUANTITY"/><br/>

	ORDER VALUE:<xsl:value-of select = '(../@PRICE) * (QUANTITY)'/> <br/><br/>
	</xsl:for-each>
	<HR/>
	<b>PRODUCT SALES VALUE: <xsl:value-of select = '(./@PRICE) * sum(./ORDER/QUANTITY)'/></b>
	<br/>
	<hr/>
	<br/>
         </xsl:for-each>
</xsl:template>
</xsl:stylesheet>



xml file....
Code:
<?xml version ="1.0"?>
<SUMMARY>
<PRODUCT ID = "P001" NAME = "Mini Bus" PRICE ="75">
	<ORDER OID = "O001">
	<SHIP_ADD>10 newstand</SHIP_ADD>
	<QUANTITY>30</QUANTITY>
	</ORDER>
	<ORDER OID = "O002">
	<SHIP_ADD>101 oldstand</SHIP_ADD>
	<QUANTITY>10</QUANTITY>
	</ORDER>
</PRODUCT>
<PRODUCT ID = "P002" NAME = "Barbie Doll" PRICE ="20">
	<ORDER OID = "O003">
	<SHIP_ADD>103 news</SHIP_ADD>
	<QUANTITY>60</QUANTITY>
	</ORDER>
</PRODUCT>
</SUMMARY> 




all i get is "piranha palace..." that s it... nothing else.. i have checked and re checked and checked again for the past hour.. WHY WHY WHY doesnt anything show? please help. my hair is turning grey!

Reply With Quote
  #2  
Old August 31st, 2004, 01:06 AM
Phrenetical Phrenetical is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 156 Phrenetical User rank is Corporal (100 - 500 Reputation Level)Phrenetical User rank is Corporal (100 - 500 Reputation Level)Phrenetical User rank is Corporal (100 - 500 Reputation Level)Phrenetical User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 5 sec
Reputation Power: 9
Ok i found your prob in about 2 seconds,
Ask your self this simple question, how does your XSL know what to format, is your XML linked to your XSL.

The answer is it doesnt and no its not. Stop turning your hair grey, its an easy fix.

Try this in your XML ok

<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="yourXSL.xsl" ?>


Reply With Quote
  #3  
Old September 8th, 2004, 11:42 AM
rguilbault rguilbault is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 30 rguilbault User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 15 m 18 sec
Reputation Power: 5
Quote:
Originally Posted by Phrenetical
Ok i found your prob in about 2 seconds,
Ask your self this simple question, how does your XSL know what to format, is your XML linked to your XSL.


Just curious -- how would he have seen the 'Piranah palace...' text if he didn't have the XML and XSL linked? If he called the XSL file directly, shouldn't it have been displayed as XML?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > nothing shows UP!! (frustration! 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 1 hosted by Hostway
Stay green...Green IT