we can embed javascript in XSLT and run it after transform on Mircrosoft IE platform.
the trick is put javascript code in a seperate procedure template, and let transform engine treat content as html code.
then, we must escape the javascript code, this means we use "<" to replace "<" and ">" to replace ">", otherwise the xslt file will be illformed.
afte this, we use <xsl:call-template name=""/> to call the javascript template.
<!--in main template-->
....
<xsl:call-template name="jsproc"/>
....
<!--javascript template-->
<xsl:template name="jsproc">
<xsl:text disable-output-escaping="yes">
<script type="text/javascript">
......
</script>
</xsl:text>
</xsl:template>
2008年10月25日星期六
订阅:
博文评论 (Atom)

没有评论:
发表评论