RE: [XSLTalk] Problem with transforming XML to XM.L using XSLT

Hi,
 
Can you tell us how do you exaclty obtain your output? Because I can clearly
see that the desired output is exactly what you get when you perform the
transformation of your sources.... ¿so what's up?
 
Regards, Pieter

-----Original Message-----
From: talktao2003 [mailto:talktao2003@yahoo.com]
Sent: Monday, July 21, 2003 12:34 PM
To: XSLTalk@yahoogroups.com
Subject: [XSLTalk] Problem with transforming XML to XM.L using XSLT


Can anybody let me know why I cannot get the desired output? 
Thanks so much.

INPUT XML FILE:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="cdcatalog3.xsl"?>
<catalog>
  <cd>
    <name>Name1</name>
    <artist>Bonnie Tyler</artist>
    <company>CBS Records</company>
    <price>9.90</price>
    <year>1988</year>
  </cd>
  <cd>
    <name>Name2</name>
    <artist>Jim Henry</artist>
    <company>London</company>
    <price>7.80</price>
    <year>1987</year>
  </cd>
</catalog>

INPUT XSLT FILE:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl=" http://www.w3.org/1999/XSL/Transform
<http://www.w3.org/1999/XSL/Transform> ">
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="/">
<catalog>
  <xsl:for-each select="catalog/cd">
    <cd>
      <name>    <xsl:value-of select="name"/>  </name>
      <artist> <xsl:value-of select="artist"/>  </artist>
    </cd>
  </xsl:for-each>
</catalog>
</xsl:template>
</xsl:stylesheet>

DESIRED OUPUT:
<catalog>
  <cd>
    <name>Name1</name>
    <artist>Bonnie Tyler</artist>
  </cd>
  <cd>
    <name>Name2</name>
    <artist>Jim Henry</artist>
  </cd>
</catalog>

OUTPUT GOT USING THE METHOD ABOVE:
Name1 Bonnie Tyler Name2 Jim Henry 



Yahoo! Groups Sponsor	

ADVERTISEMENT
 
<http://rd.yahoo.com/M=194081.3551198.4824677.1261774/D=egroupweb/S=17060303
90:HM/A=1663535/R=0/SIG=11ps6rfef/*http://www.ediets.com/start.cfm?code=3050
4&media=atkins> click here	
 
<http://us.adserver.yahoo.com/l?M=194081.3551198.4824677.1261774/D=egroupmai
l/S=:HM/A=1663535/rand=639096299> 	

This discussion list is hosted at TopXML (topxml.com).  If you like what
we're doing, please show your support by posting your small code snippets
there!  Also, post your tech announcements and news on our new site, Markup
World (markupworld.com)

To unsubscribe from this group, send an email to:
XSLTalk-unsubscribe@egroups.com


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> . 




[Non-text portions of this message have been removed]


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Breakthrough Natural Health Specialties at VitaminBoost.com $20 to $40
Naturally Painless Spray, Coral Calcium, No Snore, EZ Appetite Suppressant.
http://www.challengerone.com/t/l.asp?cid=2882
http://us.click.yahoo.com/yoMABA/ruYGAA/ySSFAA/2U_rlB/TM
---------------------------------------------------------------------~->

This discussion list is hosted at TopXML (topxml.com).  If you like what we're doing, please show your support by posting your small code snippets there!  Also, post your tech announcements and news on our new site, Markup World (markupworld.com)

To unsubscribe from this group, send an email to:
XSLTalk-unsubscribe@egroups.com
 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

Received on Monday, 21 July 2003 17:29:06 UTC