I am quite new to XSLT style sheets. I have done some very basic work with them and now have gotten a project that is testing my abilities. I don't even think I am asking the question the right way. 

Below is a set XML data that represents the data I am working with. Its nonsense data...

```
<?xml version="1.0" encoding="utf-8"?>
<catalog_new>
    <catalog_old>
        <catalog_newold>
            <final>
                <cd_info title="Empire Burlesque" artist="Dylan" />
                <store name="BestBuy" />
                    <sales thismonth="500"/>
                    <returns thismonth="10"/>
                <store name="Target" />
                    <sales thismonth="500"/>
                    <returns thismonth="10"/>
            </final>
            <final>
                <cd_info title="Stand" artist="REM" />
                <store name="BestBuy" />
                    <sales thismonth="1000"/>
                    <returns thismonth="20"/>
                <store name="Target" />
                    <sales thismonth="530"/>
                    <returns thismonth="50"/>
            </final>
        </catalog_newold>
    </catalog_old>
  </catalog_new>

```

What I need to do is select each final/cd\_info items and then just select the store record where the name = Best Buy and select the this month value for each of sales and returns.

I am trying to produce a table that looks like:

```
CDName          Artist          Store           SalesThisMonth    Returns
Stand           R.E.M           Best Buy           500              10

```

This is where I got to:

```
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
  <xsl:output method="html" indent="yes" encoding = "utf-8"   standalone = "yes"/>

  <xsl:template match="/">

    <html>
      <head>
        <meta charset="utf-8" />
        <title></title>
      </head>
      <body>

        <table border="1" style="width: 100%;">
          <tr>
            <th>Albumn Name</th>
            <th>Artist</th>
            <th>Store</th>
          </tr>

          <xsl:for-each select ="//catalog_new">
            <xsl:for-each select="catalog_old">
              <xsl:for-each select="catalog_newold">
                <xsl:for-each select="final">
                  <xsl:for-each select="cd_info">
                    <tr>
                      <td>
                        <xsl:value-of  select="@title"/>
                      </td>
                      <td>
                        <xsl:value-of select="@artist"/>
                      </td>
                    </tr>
                  </xsl:for-each>
                </xsl:for-each>
              </xsl:for-each>
            </xsl:for-each>
          </xsl:for-each>
        </table>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>

```

I have ended up deleting every attempt I made ..... Am I just way off track or am I on the right track?

Thanks in advance.