Wednesday, September 24, 2003

You should pass XmlResolver to Transform() method

protected override void Render(HtmlTextWriter writer)
{
XPathDocument xDoc = new XPathDocument(Context.Server.MapPath(sourceFilePath) );

XslTransform xslt = new XslTransform();
xslt.Load( Context.Server.MapPath(transformFilePath) );
xslt.Transform(xDoc,null,writer);

}

now i got on "xslt.Transform(xDoc,null,writer);" those informations:

E:\Extend\Controls\Navigator.cs(67):
'System.Xml.Xsl.XslTransform.Transform(System.Xml.XPath.IXPathNavigable,
System.Xml.Xsl.XsltArgumentList, System.IO.TextWriter)' is obsolete: 'You
should pass XmlResolver to Transform() method'


It seems you are using version 1.1 or higher of .Net Framework.

This way of calling Transform method of XslTransform class
is indeed obselete in the new versions.

Visit the following url for the latest info in this regard

http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemxmlxslxsltransformclasstransformtopic17.asp?frame=true


and one more article:

http://www.xmlforasp.net/CodeSection.aspx?csID=103

No comments:

Shared Cache - .Net Caching made easy

All information about Shared Cache is available here: http://www.sharedcache.com/. Its free and easy to use, we provide all sources at codeplex.

Facebook Badge