I got a sample xml like this:
<?xml version="1.0" encoding="UTF-8"?>
<collection>
<cd>
<title>Boys for Pele</title>
<artist>Tori Amos</artist>
<tracks>
<track type="vocal">
<name>Horses</name>
<length>3.5</length>
</track>
<track type="instrumental">
<name>Blood roses</name>
<length>3.2</length>
</track>
<track type="vocal">
<name>Father lucifer</name>
<length>3.8</length>
</track>
<track type="instrumental">
<name>Professional widow</name>
<length>4.1</length>
</track>
<track type="vocal">
<name>Mr. Zebra</name>
<length>3.6</length>
</track>
</tracks>
</cd>
</collection>
and I use a sample xsl for testing :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/"/>
</xsl:stylesheet>
The question is the '<xsl:template match="/"/>
' code.
When I test it, nothing comes out
When I replace it with '<xsl:template match="collection/cd"/>
, still nothing comes out
But when I replace it with '<xsl:template match="collection/cd/tracks"/>
' ,
the following result appear:-
Boys for Pele Tori Amos The Ghosts that Hunt me Crash TestDummies
But this value is not located inside the element of the xml, out outside it.
Can anyone offer some help on that? thanks very much!