XslCompiledTransform::Load Method (IXPathNavigable^)
Compiles the style sheet contained in the IXPathNavigable object.
Assembly: System.Xml (in System.Xml.dll)
Parameters
- stylesheet
-
Type:
System.Xml.XPath::IXPathNavigable^
An object implementing the IXPathNavigable interface. In the Microsoft .NET Framework, this can be either an XmlNode (typically an XmlDocument), or an XPathDocument containing the style sheet.
| Exception | Condition |
|---|---|
| ArgumentNullException | The stylesheet value is null. |
| XsltException | The style sheet contains an error. |
The XslCompiledTransform class supports the XSLT 1.0 syntax. The XSLT style sheet must use the http://www.w3.org/1999/XSL/Transform namespace.
This method has the following behavior:
An XmlUrlResolver with no user credentials is used to process any xsl:import or xsl:include elements.
The document() function is disabled.
Embedded scripts are not supported.
You can use the Load overload to specify an XmlResolver with the necessary authentication credentials, or to specify different XSLT settings.
The following example loads a style sheet contained in an XPathDocument object.
Available since 2.0