<?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),'&links=',substring($links,1,string-length($links)-1),'&texts=',substring($texts,1,string-length($texts)-1),'&borderwidth=',$focusWidth,'&borderheight=',$focusHeight,'&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),'&links=',substring($links,1,string-length($links)-1),'&texts=',substring($texts,1,string-length($texts)-1),'&borderwidth=',$focusWidth,'&borderheight=',$focusHeight,'&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
<!--图文轮播模板-->
<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),'&links=',substring($links,1,string-length($links)-1),'&texts=',substring($texts,1,string-length($texts)-1),'&borderwidth=',$focusWidth,'&borderheight=',$focusHeight,'&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),'&links=',substring($links,1,string-length($links)-1),'&texts=',substring($texts,1,string-length($texts)-1),'&borderwidth=',$focusWidth,'&borderheight=',$focusHeight,'&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