[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl looping 2 siblings help

Subject: xsl looping 2 siblings help
From: -= jay =- <deepsweech@xxxxxxxxx>
Date: Thu, 23 Jun 2005 15:00:18 +0800
xsl looping
this is my sample xml
<root>
 <artist>
   <name>Jackson</name>
   <songlist>
     <songs>
        <sid>001</sid>
        <sname>Sample 1</sname>
     </songs>
     <songs>
        <sid>002</sid>
        <sname>Sample 2</sname>
     </songs>
   </songlist>
   <genrelist>
      <genre>
         <gid>001</gid>
         <gname>Rock</gname>
      </genre>
      <genre>
         <gid>002</gid>
         <gname>R&B</gname>
      </genre>
   </genrelist>
 </artist>

 <artist> ....... and it goes </artist> ....
</root>

now how can i loop throug artist by filtering them according to genre
and then list name and all the songs of each artist

i have something like:
<xsl:parse>
<xsl:stylesheet>
<xsl: template match:"root">
  < xsl:for-each select="artist">
     <xsl:for-each select="genrelist/genre">
       < xsl:if test="gid='001'">
         < xsl:valueOf select="name">
         <xsl:for-each select="songlist/songs">
         <xsl:valueOf select="sname">
    end .....

but the songs list doesnt display.  so my problem is looping a node
inside its sibling
thnks

--
*-::jay::-*

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.