XslCompiledTransform::Load Method (XmlReader^, XsltSettings^, XmlResolver^)
Compiles the XSLT style sheet contained in the XmlReader. The XmlResolver resolves any XSLT import or include elements and the XSLT settings determine the permissions for the style sheet.
Assembly: System.Xml (in System.Xml.dll)
public: void Load( XmlReader^ stylesheet, XsltSettings^ settings, XmlResolver^ stylesheetResolver )
Parameters
- stylesheet
-
Type:
System.Xml::XmlReader^
The XmlReader containing the style sheet.
- settings
-
Type:
System.Xml.Xsl::XsltSettings^
The XsltSettings to apply to the style sheet. If this is null, the Default setting is applied.
- stylesheetResolver
-
Type:
System.Xml::XmlResolver^
The XmlResolver used to resolve any style sheets referenced in XSLT import and include elements. If this is null, external resources are not resolved.
| 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.
The style sheet loads from the current node of the XmlReader through all its children. This enables you to use a portion of a document as the style sheet. After the Load method completes, the XmlReader is positioned on the next node after the end of the style sheet. If the end of the document is reached, the XmlReader is positioned at the end of file (EOF).
Available since 2.0