Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sharepoint 找不到与命名空间关联的脚本或扩展对象http://schemas.microsoft.com/WebParts/v3/Publishing/runtime_Sharepoint_Sharepoint 2013 - Fatal编程技术网

Sharepoint 找不到与命名空间关联的脚本或扩展对象http://schemas.microsoft.com/WebParts/v3/Publishing/runtime

Sharepoint 找不到与命名空间关联的脚本或扩展对象http://schemas.microsoft.com/WebParts/v3/Publishing/runtime,sharepoint,sharepoint-2013,Sharepoint,Sharepoint 2013,我有一个自定义Xsl文件用于我的XsltListViewWebPart,但当我运行包含web部件的页面时,我的日志中出现以下异常: Error while executing web part: System.Xml.Xsl.XslTransformException: Cannot find a script or an extension object associated with namespace 'http://schemas.microsoft.com/WebParts/v3/Pu

我有一个自定义Xsl文件用于我的XsltListViewWebPart,但当我运行包含web部件的页面时,我的日志中出现以下异常:

Error while executing web part: System.Xml.Xsl.XslTransformException: Cannot find a script or an extension object associated with namespace 'http://schemas.microsoft.com/WebParts/v3/Publishing/runtime'.     at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)     at <xsl:template name="OuterTemplate.GetSafeStaticUrl">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current, String UrlColumnName)     at <xsl:template match="Row">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current)     at <xsl:template match="dsQueryResponse">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime... 1fbf809c-8c95-d00a-8f55-21bd43c1d0d2
        89a1    High        ..., XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current)     at <xsl:apply-templates>(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator )     at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)     at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.ApplyXslTransform(XPathNavigator dataNavigator, XslCompiledTransform xslCompiledTransform, XsltArgumentList xmlArguments)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.ExecuteTransform(XslCompiledTransform xslCompiledTransform, XsltArgumentList xmlArguments, Boolean bDeferExecuteTransform)     at Microsoft.SharePoint.WebPartPages.DataFormWeb...  1fbf809c-
执行web部件时出错:System.Xml.Xsl.XslTransformException:找不到与命名空间“”关联的脚本或扩展对象http://schemas.microsoft.com/WebParts/v3/Publishing/runtime'. 在System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(字符串名称,字符串名称空间URI,IList`1[]参数)在(XmlQueryRuntime{urn:schemas microsoft com:xslt debug}运行时,XPathNavigator{urn:schemas microsoft com:xslt debug}当前,字符串UrlColumnName)在(XmlQueryRuntime{urn:schemas microsoft com:xslt debug}运行时,XPathNavigator{urn:schemas microsoft com:xslt debug}当前)在(XmlQueryRuntime{urn:schemas microsoft com:xslt debug}运行时…1fbf809c-8c95-d00a-8f55-21bd43c1d0d2 89a1 High…,XPathNavigator{urn:schemas microsoft com:xslt debug}当前),在System.Xml.Xsl.XmlILCommand.Execute的根目录下(XmlQueryRuntime{urn:schemas microsoft com:xslt debug}运行时,XPathNavigator)Microsoft.SharePoint.WebPartPages.DataFormWebPart.ApplyXslTransform(XPathNavigator dataNavigator、XslCompiledTransform、XslCompiledTransform、XsltArgumentList xmlArguments)上的(对象defaultDocument、XmlResolver数据源、XsltArgumentList argumentList、XmlWriter-writer-writer-writer)位于Microsoft.SharePoint.WebPartPages.DataFormWebPart.ExecuteTransform(XslCompiledTransform XslCompiledTransform,XSLTargetList xmlArguments,布尔bDeferExecuteTransform),位于Microsoft.SharePoint.WebPartPages.DataFormWeb…1BF809C- 我的xsl文件是:

<xsl:stylesheet version="1.0"
            exclude-result-prefixes="msxsl"
            xmlns:x="http://www.w3.org/2001/XMLSchema" 
            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            xmlns:cmswrt="http://schemas.microsoft.com/WebParts/v3/Publishing/runtime"
            xmlns:cbq="urn:schemas-microsoft-com:ContentByQueryWebPart"
            xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" 
            xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
            xmlns:ddwrt2="urn:frontpage:internal"
            xmlns:msxsl="urn:schemas-microsoft-com:xslt">

     ...

     <xsl:template name="OuterTemplate.GetSafeStaticUrl">
         <xsl:param name="UrlColumnName"/>
         <xsl:variable name="Url">
             <xsl:call-template name="OuterTemplate.FormatColumnIntoUrl">
                 <xsl:with-param name="UrlColumnName" select="$UrlColumnName"/>
             </xsl:call-template>
         </xsl:variable>

         <xsl:value-of select="cmswrt:EnsureIsAllowedProtocol($Url)"/> // Using cmswrt here
    </xsl:template>

    ...

</xsl:stylesheet>

...
//在这里使用cmswrt
...

我做错了什么?

当使用自定义XSLT选项时,您必须自己维护扩展Xml,就像对调用外部程序集的内联自定义XSLT一样

文件:

示例:

您是否在尝试添加web部件的站点上启用了该功能?