XslCompiledTransform.Load Method (Type)
Loads the compiled style sheet that was created using the XSLT Compiler (xsltc.exe).
Assembly: System.Xml (in System.Xml.dll)
- Type: System.Type
The name of the class that contains the compiled style sheet.
This is usually the name of the style sheet. Unless otherwise specified, the xsltc.exe tool uses the name of the style sheet for the class and assembly names.
The xsltc.exe tool is used to compile style sheets and generate assemblies from the style sheets. The Load method loads the compiled style sheet from the assembly.
You must also include the XSLT assembly as a reference in your application.
The following example shows how to load a compiled style sheet from an XSLT assembly. The example assumes that the xsltc.exe tool was used to create an assembly named bookOrders.dll with a class named bookOrders.
You have to reference the XSLT assembly when compiling the code. For example, csc /r:system.dll;system.xml.dll;bookOrders.dll myCode.cs.
// Load the type of the class. XslCompiledTransform xslt = new XslCompiledTransform(); xslt.Load(typeof(bookOrders));
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.