xslt 中调用 focus.swf

<?xml version="1.0" encoding="UTF-8" ?>
<!--图文轮播模板-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:variable name="focusWidth" select="'290'"></xsl:variable>
    <xsl:variable name="focusHeight" select="'220'"></xsl:variable>
    <xsl:variable name="textHeight" select="'30'"></xsl:variable>
    <xsl:variable name="swfHeight" select="number($focusHeight)+number($textHeight)"></xsl:variable>
    <xsl:template match="/">
        <div class="focus">
            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0">
                <xsl:attribute name="width">
                    <xsl:value-of select="$focusWidth"/>
                </xsl:attribute>
                <xsl:attribute name="height">
                    <xsl:value-of select="$focusHeight"/>
                </xsl:attribute>
<xsl:variable name="pics">
                    <xsl:for-each select="List/Object">
                        <xsl:value-of select ="concat(ToUrl,'|')"/>
                    </xsl:for-each>
                </xsl:variable>
                <xsl:variable name="links">
                    <xsl:for-each select="List/Object">
                        <xsl:value-of select ="concat(Url,'|')"/>
                    </xsl:for-each>
                </xsl:variable>
                <xsl:variable name="texts">
                    <xsl:for-each select="List/Object">
                        <xsl:value-of select ="concat(Title,'|')"/>
                    </xsl:for-each>
                </xsl:variable>
                <param name="allowScriptAccess" value="sameDomain"></param>
                <param name="movie" value="../focus.swf"></param>
                <param name="quality" value="high"></param>
                <param name="bgcolor" value="#fffbf2"></param>
                <param name="menu" value="false"></param>
                <param name="wmode" value="opaque"></param>
                <param name="FlashVars">
                    <xsl:attribute name="value">
                        <xsl:value-of select="concat('pics=',substring($pics,1,string-length($pics)-1),'&amp;links=',substring($links,1,string-length($links)-1),'&amp;texts=',substring($texts,1,string-length($texts)-1),'&amp;borderwidth=',$focusWidth,'&amp;borderheight=',$focusHeight,'&amp;textheight=',$textHeight)"/>
                    </xsl:attribute>
                </param>

                <embed src="../focus.swf" wmode="opaque" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" menu="false" bgcolor="#ffffff" >
                    <xsl:attribute name="FlashVars">
                        <xsl:value-of select="concat('pics=',substring($pics,1,string-length($pics)-1),'&amp;links=',substring($links,1,string-length($links)-1),'&amp;texts=',substring($texts,1,string-length($texts)-1),'&amp;borderwidth=',$focusWidth,'&amp;borderheight=',$focusHeight,'&amp;textheight=',$textHeight,' width=',$focusWidth,' height=',$swfHeight,' ')"/>
                    </xsl:attribute>
                </embed>
            </object>
        </div>
    </xsl:template>
</xsl:stylesheet>


javascript的调用方式及focus.swf的下载:http://zhuyiwen.cnblogs.com/archive/2006/06/07/420119.html
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值