Home All Groups Group Topic Archive Search About

migrating from XslTransform to XslCompiledTransform

Author
6 Mar 2007 5:33 PM
Marcelo
Hello,
I have a web proyect/solution built in .Net 1.1 which I am migrating to 2.0

There is a function which is called from just about everywhere:
///<summary>
///Applies an xsl transformation to a xml document
///</summary>
///<param name='strXML'>The string of the xml document</param>
///<param name='strXSLURL'>The url of the xsl</param>
///<param name='Response'>The html response object to send exception if
needed</param>
///<returns>The result of transformation</returns>
public static string TransformXML(string strXML, string strXSLURL,
System.Web.HttpResponse Response)
{
System.Xml.Xsl.XslTransform oXSLT = new System.Xml.Xsl.XslTransform();
oXSLT.Load(strXSLURL);
return TransformXML(strXML,oXSLT,Response);
}

The third parameter is System.Web.HttpResponse which is not compatible with
XslCompiledTransform

Is there a way to fix this function in such a way that I do not have to
modify all the calls to this function?

Thanks

AddThis Social Bookmark Button