Question : xsl and object params syntax

First, thank you for your time.

I downloaded a free mp3 flash player from the internet.  Within the head of the html file there is some code that needs to be inserted (I intentionally decided not to show it because it is not relevant to my question).  Additionally, the following code fragment needs to be inserted into the body of the html:
   
1:
2:
3:
4:
5:
6:
7:
<script language="JavaScript" src="audio-player.js"></script>
<object type="application/x-shockwave-flash" data="http://www.MySite.com/AudioFiles/player.swf" id="AudioPlayerUniqueId1">

    <param name="FlashVars" value="playerID=audioplayer1&soundFile=http://www.MySite.com/AudioFiles/File1.mp3" />
    <param more parameter stuff here />
</object>


This works fine when I place this in an html file.  The next part of my project requires that I xsl'ize the
above fragment.  Visual Studio barks about the FlashVars line.  It doesn't like the &.  So I changed the code
fragment to this xsl and xml version:

Here is the corresponding xsl fragment:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
  
<xsl:variable name="assetsPath" select="'http://www.MySite.com/AudioFiles/'" />

<xsl:variable name="flashVarsValue">
    <xsl:text>playerID=AudioPlayerUniqueId1</xsl:text>

    <xsl:text><![CDATA[&]]></xsl:text>
    <xsl:text>soundFile=</xsl:text>
    <xsl:value-of select="$assetsPath" />
    <xsl:value-of select="SoundFilename"/>
</xsl:variable>

<script language="JavaScript" src="audio-player.js"></script>
<object type="application/x-shockwave-flash" data="http://www.MySite.com/AudioFiles/player.swf" id="AudioPlayerUniqueId1">

    <param name="FlashVars" value="$flashVarsValue" />
    <param more parameter stuff here />
</object>

<!-- For debugging purposes I print out the flashVarsValue -->
<xsl:value-of select="$flashVarsValue"/>


Here is the corresponding xml fragment:
1:
2:
3:
4:
5:
6:
7:
8:
9:
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="Contacts.xslt"?>
 
<Contacts>
  <Contact>
     <SoundFilename>File1.mp3</SoundFilename>
  </Contact>
</Contacts>


Finally to the question.  The flash player loads and displays just fine.  However it complains that the mp3 file can't be found.  There is clearly something wrong with my flashVarsValue variable.  Do you know what I should try?

Thank you very much for your time,

Answer : xsl and object params syntax

try this syntax:

<param name="FlashVars" value="{$flashVarsValue}" />
Random Solutions  
 
programming4us programming4us