Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    May 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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 04:31 PM.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •