Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: XML/XSL Help XML/XSL HelpTo: NULL Date: 8/2/2006 8:03:00 AM Hello All, I'm experimenting with XML and I'm working on an example I've made up. Basically, this is the format: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="Baseball.xsl"?> <MLB> <team name="Yankees"> <player last="Jeter" first="Derek"/> <player last="Abreu" first="Bobby"/> <player last="Giambi" first="Jason"/> <player last="Williams" first="Bernie"/> <player last="Cano" first="Robinson"/> <player last="Johnson" first="Randy"/> </team> <team name="Red Sox"> <player last="Ramierez" first="Manny"/> <player last="Ortiz" first="David"/> <player last="Schilling" first="Curt"/> <player last="Becket" first="Josh"/> <player last="Varitek" first="Jason"/> . . . </MLB> Basically, I want to traverse the tree starting from MLB and kick out each team name. I've tried this XSL. But, it's not working: <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/MLB"> <HTML> <HEAD> <TITLE> MLB Teams </TITLE> </HEAD> <body bgcolor="#FFFFDD"> <xsl:for-each select="team/@name"> <xsl:value-of select="text()"/><BR /> </xsl:for-each> </body> </HTML> </xsl:template> </xsl:stylesheet> Any direction will be appreciated. Thanks. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
