首页 新闻 赞助 找找看

【SSIS】项目,XML任务中能否使用包含脚本的XSLT文件

0
悬赏园豆:20 [待解决问题]

大家好,在使用SSIS XML task时候,能否用带脚本的XSLT文件作为第二操作数呢? 我在两个环境(SQLSERVER2008 VS2008、 SQLSERVER2012 VS2010)下测试,都有报错,说权限不足

报错信息如下:

SQLSERVER2008 VS2008:

[XML Task] Error: An error occurred with the following error message: "未能加载文件或程序集“en9eam6s, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。未能授予执行权限。 (异常来自 HRESULT:0x80131418)".

SQLSERVER2012 VS2010:

[XML Task] Error: An error occurred with the following error message: "禁止执行脚本。使用 XsltSettings.EnableScript 属性可以启用。 C:\Users\Administrator\Desktop\dr_flat.xslt(0,0) 处出错。".

XSLT文件大概如下:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:JS="JSCode">
  <xsl:output method="xml" indent="yes" encoding="utf-8" omit-xml-declaration="no" version="1.0" standalone="yes" />
<msxsl:script language="JavaScript" implements-prefix="JS">
<![CDATA[
   function ReplaceHTMLValues(htmlVal)
   {
      return htmlVal.replace(/"/g,"&quot;");
   }
]]>
</msxsl:script>

......<!--templates -->

 

哪位老师遇到过类似问题,还请赐教:)

Leon_Chao的主页 Leon_Chao | 初学一级 | 园豆:182
提问于:2013-07-17 18:06
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册