Compiles the style sheet contained in the System.Xml.XmlReader.
- stylesheet
An System.Xml.XmlReader containing the style sheet.
The System.Xml.Xsl.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 System.Xml.XmlReader through all its children. This enables you to use a portion of a document as the style sheet. After the XslCompiledTransform.Load(System.Xml.XmlReader) method completes, the System.Xml.XmlReader is positioned on the next node after the end of the style sheet. If the end of the document is reached, the System.Xml.XmlReader is positioned at the end of file (EOF).
This method has the following behavior:
An System.Xml.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 XslCompiledTransform.Load(System.Xml.XmlReader, XsltSettings, System.Xml.XmlResolver) overload to specify an System.Xml.XmlResolver with the necessary authentication credentials, or to specify different XSLT settings.