0

過去に遭遇したことのないエラーが表示されます (検索しても解決策が見つかりません)。

エラー メッセージ: XslTransformException はユーザー コードによって処理されませんでした: 名前空間'uri:PhysKare.Framework.Authentication.IUserAuthenticate'に関連付けられたスクリプトまたは拡張オブジェクトが見つかりません。

エラーの詳細:

   at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
   at <xsl:template match="/">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
   at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
   at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
   at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results)
   at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
   at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver)
   at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results)

この問題を解決する方法はありますか?

4

1 に答える 1

1

あなたの XSLT は名前空間uri:PhysKare.Framework.Authentication.IUserAuthenticateでカスタム関数を使用していますが、これらの関数を実装するオブジェクトを XSLT プロセッサに渡していません。つまり、次のようにする必要があります。

  XsltArgumentList args = new XsltArgumentList();
  args.AddExtensionObject("uri:PhysKare.Framework.Authentication.IUserAuthenticate", new PhysKare());
  compiledXslt.Transfor(source, args, dest)

ここPhysKareで、XSLT で使用されるカスタム関数を実装するクラスです。

于 2012-09-24T19:36:11.563 に答える