Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • kentiler 76 posts 69 karma points
    Dec 13, 2013 @ 02:00
    kentiler
    0

    Trying to put flash embedded into XSLT - The Expected token is ";"

    Hi,

     

    I'm trying to create an xslt file that I can use via macro to embed a flash player in a page.  The code I need to insert is:

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" height="480" width="854" id="sn_player" align="middle">
      <param name="allowFullScreen" value="true" />
      <param name="allowScriptAccess" value="always" />
      <param name="wmode" value="transparent" />
      <param name="allownetworking" value="all" />
      <param name="bgcolor" value="#000000" />
      <param name="movie" value="http://studio.io/swf/player45.swf?1">
      <PARAM name="flashvars" value="file=http://studio.io/build_xml_wzd_sn.php?player=9744_playlist-live-.xml&backcolor=000000;&frontcolor=CCCCCC&lightcolor=FFFFFF&screencolor=AAAAAA&=Save&controlbar=bottom&skin=http://mdsone.com/swf/stylish/modieus_arial_live.swf&autostart=true&displayclick=play&icons=true&mute=false&repeat=none&shuffle=false&stretching=fill&plugins=yourlytics-1,update_playlist,captions-2&viral.onpause=false&yourlytics.callback=http://www.mdsone.com/jw_callback.php;" />
      <embed src="http://studio.io/swf/player45.swf?1" quality="high" height="480" width="854" id="sn_player" align="middle" allowScriptAccess="always" allowfullscreen="true" bgcolor="#000000" wmode="opaque" type="application/x-shockwave-flash" flashvars="file=http://studio.io/build_xml_wzd_sn.php?player=9744_playlist-live-.xml&backcolor=000000;&frontcolor=CCCCCC&lightcolor=FFFFFF&screencolor=AAAAAA&=Save&controlbar=bottom&skin=http://mdsone.com/swf/stylish/modieus_arial_live.swf&autostart=true&displayclick=play&icons=true&mute=false&repeat=none&shuffle=false&stretching=fill&plugins=yourlytics-1,update_playlist,captions-2&viral.onpause=false&yourlytics.callback=http://www.mdsone.com/jw_callback.php;" pluginspage="http://www.macromedia.com/go/getflashplayer">
      </embed></object><a href="http://www.mdsone.com" border="01">  <img src="http://www.mdsone.com/images/poweredby.gif" border="0" height="1px" width="1px"></a>
    
    
    I keep getting an error about the expect token is ";", but that's inside a string.  Shouldn't it be ignoring what is inside quotes?
    Any suggestions for getting this to work?
    Thank you!
    --Kent

     

  • Len Dierickx 150 posts 92 karma points
    Dec 13, 2013 @ 09:47
    Len Dierickx
    2

    Hi, 

    Whatever code you put in the XSLT, it needs to be valid XML. (or put it in a CDATA section).
    Try the code below.  

    These are the issues with your code: 

    img not properly closed = <img /> 
    parameter not properly closed) = <parameter />
    ampersands in URLs not encoded > &amp; 

    <?xml version="1.0"?>
    <t>
      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" height="480" width="854" id="sn_player" align="middle">
        <param name="allowFullScreen" value="true"/>
        <param name="allowScriptAccess" value="always"/>
        <param name="wmode" value="transparent"/>
        <param name="allownetworking" value="all"/>
        <param name="bgcolor" value="#000000"/>
        <param name="movie" value="http://studio.io/swf/player45.swf?1"/>
        <PARAM name="flashvars" value="file=http://studio.io/build_xml_wzd_sn.php?player=9744_playlist-live-.xml&amp;backcolor=000000;&amp;frontcolor=CCCCCC&amp;lightcolor=FFFFFF&amp;screencolor=AAAAAA&amp;=Save&amp;controlbar=bottom&amp;skin=http://mdsone.com/swf/stylish/modieus_arial_live.swf&amp;autostart=true&amp;displayclick=play&amp;icons=true&amp;mute=false&amp;repeat=none&amp;shuffle=false&amp;stretching=fill&amp;plugins=yourlytics-1,update_playlist,captions-2&amp;viral.onpause=false&amp;yourlytics.callback=http://www.mdsone.com/jw_callback.php;"/>
        <embed src="http://studio.io/swf/player45.swf?1" quality="high" height="480" width="854" id="sn_player" align="middle" allowScriptAccess="always" allowfullscreen="true" bgcolor="#000000" wmode="opaque" type="application/x-shockwave-flash" flashvars="file=http://studio.io/build_xml_wzd_sn.php?player=9744_playlist-live-.xml&amp;backcolor=000000;&amp;frontcolor=CCCCCC&amp;lightcolor=FFFFFF&amp;screencolor=AAAAAA&amp;=Save&amp;controlbar=bottom&amp;skin=http://mdsone.com/swf/stylish/modieus_arial_live.swf&amp;autostart=true&amp;displayclick=play&amp;icons=true&amp;mute=false&amp;repeat=none&amp;shuffle=false&amp;stretching=fill&amp;plugins=yourlytics-1,update_playlist,captions-2&amp;viral.onpause=false&amp;yourlytics.callback=http://www.mdsone.com/jw_callback.php;" pluginspage="http://www.macromedia.com/go/getflashplayer">
      </embed>
      </object>
      <a href="http://www.mdsone.com" border="01">
        <img src="http://www.mdsone.com/images/poweredby.gif" border="0" height="1px" width="1px"/>
      </a>
    </t>
    

     

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Dec 13, 2013 @ 09:47
    Dennis Aaen
    0

    Hi Kent,

    You can use this code:

    <xsl:text disable-output-escaping="yes"><![CDATA[
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" height="480" width="854" id="sn_player" align="middle">
            <param name="allowFullScreen" value="true" />
            <param name="allowScriptAccess" value="always" />
            <param name="wmode" value="transparent" />
            <param name="allownetworking" value="all" />
            <param name="bgcolor" value="#000000" />
            <param name="movie" value="http://studio.io/swf/player45.swf?1" />
            <PARAM name="flashvars" value="file=http://studio.io/build_xml_wzd_sn.php?player=9744_playlist-live-.xml&backcolor=000000;&frontcolor=CCCCCC&lightcolor=FFFFFF&screencolor=AAAAAA&=Save&controlbar=bottom&skin=http://mdsone.com/swf/stylish/modieus_arial_live.swf&autostart=true&displayclick=play&icons=true&mute=false&repeat=none&shuffle=false&stretching=fill&plugins=yourlytics-1,update_playlist,captions-2&viral.onpause=false&yourlytics.callback=http://www.mdsone.com/jw_callback.php;" />
            <embed src="http://studio.io/swf/player45.swf?1" quality="high" height="480" width="854" id="sn_player" align="middle" allowScriptAccess="always" allowfullscreen="true" bgcolor="#000000" wmode="opaque" type="application/x-shockwave-flash" flashvars="file=http://studio.io/build_xml_wzd_sn.php?player=9744_playlist-live-.xml&backcolor=000000;&frontcolor=CCCCCC&lightcolor=FFFFFF&screencolor=AAAAAA&=Save&controlbar=bottom&skin=http://mdsone.com/swf/stylish/modieus_arial_live.swf&autostart=true&displayclick=play&icons=true&mute=false&repeat=none&shuffle=false&stretching=fill&plugins=yourlytics-1,update_playlist,captions-2&viral.onpause=false&yourlytics.callback=http://www.mdsone.com/jw_callback.php;" pluginspage="http://www.macromedia.com/go/getflashplayer">
            </embed>
        </object>
        <a href="http://www.mdsone.com" border="01"> 
            <img src="http://www.mdsone.com/images/poweredby.gif" border="0" height="1px" width="1px">
        </a>
    ]]>
    </xsl:text>

    When you wrapped your code in a CDATA section everything inside a CDATA section is ignored by the XML parser. 

    More about the CDATA section

    /Dennis

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies