Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

XslCompiledTransform.Load Method

Compiles the style sheet.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method Load(IXPathNavigable) Compiles the style sheet contained in the IXPathNavigable object.
Public method Load(String) Loads and compiles the style sheet located at the specified URI.
Public method Load(Type) Loads the compiled style sheet that was created using the XSLT Compiler (xsltc.exe).
Public method Load(XmlReader) Compiles the style sheet contained in the XmlReader.
Public method Load(IXPathNavigable, XsltSettings, XmlResolver) Compiles the XSLT style sheet contained in the IXPathNavigable. The XmlResolver resolves any XSLT import or include elements and the XSLT settings determine the permissions for the style sheet.
Public method Load(MethodInfo, Byte[], Type[]) Loads a method from a style sheet compiled using the XSLTC.exe utility.
Public method Load(String, XsltSettings, XmlResolver) Loads and compiles the XSLT style sheet specified by the URI. The XmlResolver resolves any XSLT import or include elements and the XSLT settings determine the permissions for the style sheet.
Public method Load(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.
Top

Although the overall performance of the XslCompiledTransform class is better than the XslTransform class, the Load method of the XslCompiledTransform class might perform more slowly than the Load method of the XslTransform class the first time it is called on a transformation. This is because the XSLT file must be compiled before it is loaded. For more information, see the following blog post: XslCompiledTransform Slower than XslTransform?

Note Note

There are differences between XSLT compiled in Debug mode and XSLT compiled in Release mode. In some situations, style sheets compiled in Debug mode will not throw errors during Load, but will later fail during Transform. The same style sheet compiled in Release mode will fail during Load. An example of such behavior is when a variable that is not of a node-set type is assigned to an expression where a node-set is required.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.