不用, 在 xml 里用 C# 实现就行了.<?xml version="1.0" encoding="UTF-8"?>
<!--Powered by Benjamin Tan-->
<!--Email: [email protected]>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:benScript="urn:www.me65.com">
<msxsl:script language="C#" implements-prefix="benScript"><![CDATA[
//test
string test(string input)
{
return input.Replace("\n", "<br/>");
}
]]></msxsl:script>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:apply-templates select="[Template Path]"/>
</xsl:template>
<xsl:template match="([Template Path]">
<xsl:value-of select="benScript:test([XPath])"/>
</xsl:template>
</xsl:stylesheet>
<!--Powered by Benjamin Tan-->
<!--Email: [email protected]>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:benScript="urn:www.me65.com">
<msxsl:script language="C#" implements-prefix="benScript"><![CDATA[
//test
string test(string input)
{
return input.Replace("\n", "<br/>");
}
]]></msxsl:script>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:apply-templates select="[Template Path]"/>
</xsl:template>
<xsl:template match="([Template Path]">
<xsl:value-of select="benScript:test([XPath])"/>
</xsl:template>
</xsl:stylesheet>
解决方案 »
- 如何在服务器端获取HTML控件
- ASP.NET中使用ajax,form的action的问题
- 控制上传类型,写客户端脚本出错,恳请高手指点!
- 检测到无法访问的代码
- 关于随机读取!!!
- 请问:用户打开网页时,如何判断其是否安装了abode reader 或者excel ,谢谢了
- Html字符串提交给ashx 检测到不安全字符
- 高分 WebService 问题
- 请问怎样在一个框架里面更新另一个框架里面的网页?
- 在DataGrid的編輯模式,在第一個TextBox中輸入料號,從后台數據庫取出名稱放入相鄰的另一個TextBox中﹐應在什么事件中寫代碼,怎樣做?
- 高分请教:水晶报表导pdf问题!!!!!!!!!
- 重新问关于datagrid的问题
http://www.eggheadcafe.com/articles/20030317.asp