Loads the XSLT style sheet contained in the System.Xml.XPath.IXPathNavigable.
- stylesheet
- An object implementing the System.Xml.XPath.IXPathNavigable interface. In the .NET Framework, this can be either an System.Xml.XmlNode (typically an System.Xml.XmlDocument), or an System.Xml.XPath.XPathDocument containing the XSLT style sheet.
- resolver
- The System.Xml.XmlResolver used to load any style sheets referenced in xsl:import and xsl:include elements. If this is null, external resources are not resolved.
The System.Xml.Xsl.XslTransform class is obsolete in the .NET Framework version 2.0. The System.Xml.Xsl.XslCompiledTransform class is the new XSLT processor. For more information, see Using the XslCompiledTransform Class and Migrating From the XslTransform Class.
System.Xml.Xsl.XslTransform supports the XSLT 1.0 syntax. The XSLT style sheet must include the namespace declaration xmlns:xsl= http://www.w3.org/1999/XSL/Transform.
If the style sheet contains embedded scripting, the script is compiled to an assembly. The assembly has full trust. The recommended practice is to provide evidence using the XslTransform.Load(System.Xml.XPath.IXPathNavigable, System.Xml.XmlResolver, System.Security.Policy.Evidence) method. For issues with the erload:System.Xml.Xsl.XslTransform.Load method and style sheets with embedded scripts, see article Q316755 in the Microsoft Knowledge Base at http://support.microsoft.com.
If the caller does not have UnmanagedCode permission, the embedded script is not compiled and a System.Security.SecurityException is thrown. See System.Security.Permissions.SecurityPermission and System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode for more information.