Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-16-2011, 11:19 PM   PM User | #1
JeanClaudeDusse
New to the CF scene

 
Join Date: May 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
JeanClaudeDusse is an unknown quantity at this point
Exclamation Picture and soundfile in XSL

Hi,

In my XML file, I have the following :

Code:
<sf>../soundfile1.mp3</sf> 
<sf>../soundfile2.mp3</sf>
<sf>../soundfile3.mp3</sf>
(several times with different sound files everytime),
and I would like that with my stylesheet, on the final web page, you see a small picture (in png or jpg format - always the same picture), and that when you click on this picture, the corresponding soundfile is played.

What should I write in my XSL stylesheet so that it happens?
I guess it should be something like this :


Code:
<xsl:template match="sf">

<img src="../sound-icon.png" onclick="javascript:BatmoAudioPop('<xsl:value-of select="."/>',this.href,'1')"/>

</xsl:template>
... but it doesn't work... and I don't know what is wrong and should be modified...

Thanks in advance for your help!

Last edited by JeanClaudeDusse; 05-18-2011 at 03:31 PM..
JeanClaudeDusse is offline   Reply With Quote
Reply

Bookmarks

Tags
link, picture, sound, xml, xsl

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:43 AM.


Advertisement
Log in to turn off these ads.