不用, 在 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>