Hi All,
Please bare with me im a network engineer rather than a coder, but have had to turn my hand to this for a project im working on, any chance someone could help me with what I hope will be a simple XSLT question. Given the snippet of xml shown below
Code:
<resources>
<audio>
<file>
<name>file1.mp3</name>
</file>
</audio>
<audio>
<file>
<name>file1_preview.mp3</name>
</file>
</audio>
<audio>
<file>
<name>file1_wav.wav</name>
</file>
</audio>
</resources>
I need to find a way to select only the wav file dynamically each time and ignore the other two currently I have the following but clearly it just selects the first one.
Code:
<xsl:for-each select="resources/audio/file">
<MainFile>
<Filename>
<xsl:value-of select="name"/>
</Filename>
</MainFile>
</xsl:for-each>
Is it possible to do something like
Code:
<xsl:if test="@name = '*.wav'">
Really sorry but im out of my depth here and getting really frustrated as nothing I try works.
Any help would be greatly appreciated