Migrating to XslCompiledTransform

To improve XSLT execution performance in the .NET Framework version 2.0, the XslTransform class has been replaced with a new XSLT 1.0 implementation: the XslCompiledTransform class. XslCompiledTransform compiles XSLT stylesheets to Microsoft Intermediate Language (MSIL) methods and then executes them. Execution time of the new processor is on average 4 times better than XslTransform and matches the speed of MSXML, the native XML processor.

Although XslCompiledTransform is designed to be as compatible with XslTransform as possible, differences between the two classes nonetheless exist. The purpose of this document is to cover known differences between XslTransform to XslCompiledTransform and to simplify migration from the former to the latter.


Comments (2)
  1. "For subsequent stylesheets/documents XmlResolver returns to Proccessor XmlReader, TextReader, Stream or XPathNavigator."

    I’m writing my own XmlResolver and I would love for this to actually be the case. But XslCompiledTransform (Beta 2) accepts only Stream from my resolver. XslTransform accepts XPathNavigator, which allows me to efficiently cache already-parsed stylesheets as XPathDocuments.

  2. Frank says:

    Hi XmlTeam,

    I ran into following situation when migrating my framework 1.1 code to 2.0:

    Old situation:

    I have a System.Web.UI.WebControls.Xml control.

    – I pass an XmlDocument object, a TransformArgumentList and a XslTransform object.

    Now the 2.0 world:

    -I changed XmlDocument to: XPathNavigator object

    BUT HOW do I do the transformation part? A created already an XCT, but even when I perform the transformation within the XCT,… how do I get the result into the XML control?

    Hope you can help?


    best regards


Comments are closed.

Skip to main content