Hello and thank you, I'm with a problem trying to create .txt file from a xml file, the xml file have that format (it's a music catalog):
PHP Code:
<catalog>
  <
artist ID="">
  <
name></name>
  <
country></country>
  <
style></style>
  <
cds>
   <
cd>
    <
title></title>
    <
year></year>
    <
musics>
     <
name length=""></name>
        </
musics>
   </
cd>
 </
artist>
</
catalog
Example:
PHP Code:
<catalog>
  <
artist ID="12">
  <
name>Dave Matthews Band</name>
  <
country>U.S.A</country>
  <
style>Rock Blues</style>
  <
cds>
   <
cd>
    <
title>Everyday</title>
    <
year>2001</year>
    <
musics>
     <
name length="3:36">I Did It</name>
     <
name length="3:32">When The World Ends</name>
     <
name length="4:03">The Space Between</name>
     <
name length="4:41">Dreams Of Our Fathers</name>
     <
name length="4:41">So Right</name>
     <
name length="4:03">If I Had It All</name>
     <
name length="4:33">What You Are</name>
     <
name length="3:56">Angel</name>
     <
name length="4:14">Fool To Think</name>
     <
name length="4:25">Sleep To Dream Her</name>
     <
name length="4:24">Mother Father</name>
     <
name length="4:43">Everyday</name>
    </
musics>
      </
cd>
     
     <
cd>
      <!-- 
another cd info -->
     </
cd>
  </
cds>
 </
artist>
  <!-- 
more artists -->
</
catalog
I'm trying to create a .txt file that include all artists in catalog in that format:

Artist:
Country:
Style:
Cds:
Title:
Year:
Musics:


Here is my template:
PHP Code:
<? xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" encoding="windows-1252"/>
 <xsl:template match="/">

  <xsl:for-each select="/catalog/artist">
   Artist: <xsl:value-of select="name"/>
   Country: <xsl:value-of select="country"/>
   Style: <xsl:value-of select="Style"/>
  
  Cds:
   <xsl:for-each select="cds/cd">
   Title:<xsl:value-of select="title"/> 
   Year:<xsl:value-of select="year"/>
   Musics:<xsl:for-each select="musics/name"><xsl:value-of    select="."/></xsl:for-each></xsl:for-each></cds>
   </xsl:for-each>
 </xsl:template>
</xsl:stylesheet>

It show everything, the Problem is that it show the musics just in one line like:

Musics:I Did ItWhen The World EndsThe Space BetweenDreams Of Our FathersSo RightIf I Had It AllWhat You AreAngel

There is a way to it show the music name like it:
Musics:
I Did It
When The World Ends
The Space Between
Dreams Of Our Fathers
So Right
If I Had It All
What You Are
Angel

And if possible put the length of music in the right side of the music name? since it is a attribute? Like it:

Musics:
I Did It 3:36


Damn look like i have write a book.

Thank You Alot.