System.Xml 2.0.0.0 4.0.0.0 System.Object The class is an XSLT processor that supports the XSLT 1.0 syntax. It is a new implementation and includes performance gains when compared to the obsolete class. The structure of the class is very similar to the class. The method loads and compiles the style sheet, while the method executes the XSLT transform. Support for the XSLT document() function and embedded script blocks are disabled by default. These features can be enabled by creating an object and passing it to the method. For more information, see Using the XsltCompiledTransform Class and Migrating From the XslTransform Class.

Security Considerations

When creating an application that uses the class, you should be aware of the following items and their implications: XSLT scripting is disabled by default. XSLT scripting should be enabled only if you require script support and you are working in a fully trusted environment. The XSLT document() function is disabled by default. If you enable the document() function, restrict the resources that can be accessed by passing an object to the method. Extension objects are enabled by default. If an object containing extension objects is passed to the method, they are utilized. XSLT style sheets can include references to other files and embedded script blocks. A malicious user can exploit this by supplying you with data or style sheets that when executed can cause your system to process until the computer runs low on resources. XSLT applications that run in a mixed trust environment can result in style sheet spoofing. For example, a malicious user can load an object with a harmful style sheet and hand it off to another user who subsequently calls the method and executes the transformation. These security issues can be mitigated by not enabling scripting or the document() function unless the style sheet comes from a trusted source, and by not accepting objects, XSLT style sheets, or XML source data from an untrusted source.
Transforms XML data using an XSLT style sheet.
Constructor 2.0.0.0 4.0.0.0 To be added. Initializes a new instance of the class. Constructor 2.0.0.0 4.0.0.0 The following conditions must be met in order to step into the code and debug the style sheet: The parameter is set to true. The style sheet is passed to the method either as a URI, or an implementation of the class that implements the interface. The interface is implemented on all text-parsing objects. In other words, if the style sheet is loaded using an object, such as an or , or an implementation that does not implement the interface, you cannot debug the style sheet. The used to load the style sheet is a file-based , such as the (this is the default used by the class). The style sheet is located on the local machine or on the intranet. Initializes a new instance of the class with the specified debug setting. true to generate debug information; otherwise false. Setting this to true enables you to debug the style sheet with the Microsoft Visual Studio Debugger. Method 2.0.0.0 4.0.0.0 System.Void The 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 with no user credentials is used to resolve the style sheet URI, and process any xsl:import or xsl:include elements. An with default settings is used to load the style sheet. DTD processing is disabled on the . If you require DTD processing, create an with this feature enabled, and pass it to the method. The document() function is disabled. Embedded scripts are not supported. You can use the overload to specify an with the necessary authentication credentials, or to specify different XSLT settings. Loads and compiles the style sheet located at the specified URI. The URI of the style sheet. Method 2.0.0.0 4.0.0.0 System.Void The 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 through all its children. This enables you to use a portion of a document as the style sheet. After the method completes, the is positioned on the next node after the end of the style sheet. If the end of the document is reached, the is positioned at the end of file (EOF). This method has the following behavior: An 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 overload to specify an with the necessary authentication credentials, or to specify different XSLT settings. Compiles the style sheet contained in the . An containing the style sheet. Method 2.0.0.0 4.0.0.0 System.Void The 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 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 overload to specify an with the necessary authentication credentials, or to specify different XSLT settings. Compiles the style sheet contained in the object. An object implementing the interface. In the Microsoft .NET Framework, this can be either an (typically an ), or an containing the style sheet. Method 2.0.0.0 4.0.0.0 System.Void The class supports the XSLT 1.0 syntax. The XSLT style sheet must use the http://www.w3.org/1999/XSL/Transform namespace. An with default settings is used to load the style sheet. DTD processing is disabled on the . If you require DTD processing, create an with this feature enabled, and pass it to the method. Loads and compiles the XSLT style sheet specified by the URI. The resolves any XSLT import or include elements and the XSLT settings determine the permissions for the style sheet. The URI of the style sheet. The to apply to the style sheet. If this is null, the setting is applied. The used to resolve the style sheet URI and any style sheets referenced in XSLT import and include elements. Method 2.0.0.0 4.0.0.0 System.Void The 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 through all its children. This enables you to use a portion of a document as the style sheet. After the method completes, the is positioned on the next node after the end of the style sheet. If the end of the document is reached, the is positioned at the end of file (EOF). Compiles the XSLT style sheet contained in the . The resolves any XSLT import or include elements and the XSLT settings determine the permissions for the style sheet. The containing the style sheet. The to apply to the style sheet. If this is null, the setting is applied. The used to resolve any style sheets referenced in XSLT import and include elements. If this is null, external resources are not resolved. Method 2.0.0.0 4.0.0.0 System.Void The class supports the XSLT 1.0 syntax. The XSLT style sheet must use the http://www.w3.org/1999/XSL/Transform namespace. Compiles the XSLT style sheet contained in the . The resolves any XSLT import or include elements and the XSLT settings determine the permissions for the style sheet. An object implementing the interface. In the Microsoft .NET Framework, this can be either an (typically an ), or an containing the style sheet. The to apply to the style sheet. If this is null, the setting is applied. The used to resolve any style sheets referenced in XSLT import and include elements. If this is null, external resources are not resolved. Property 2.0.0.0 4.0.0.0 System.Xml.XmlWriterSettings To be added. This property is populated after a successful call to the method. It contains information derived from the xsl:output element of a compiled style sheet. This object can be passed to the method to create the object to which you want to output. Gets an object that contains the output information derived from the xsl:output element of the style sheet. Property 2.0.0.0 4.0.0.0 System.CodeDom.Compiler.TempFileCollection To be added. This property identifies the files that were generated during XSLT processing. The files are placed in your Temp directory (specified by the %TEMP% environment variable) You can delete these files after the XSLT processing has completed. Gets the that contains the temporary files generated on disk after a successful call to the method. Method 2.0.0.0 4.0.0.0 System.Void This method uses a default with no user credentials to resolve the input and output documents. If any of these resources are located on a network resource that requires authentication, use the overload that takes an as one of its arguments and specify an with the necessary credentials. An with default settings is used to load the input document. DTD processing is disabled on the . If you require DTD processing, create an with this feature enabled, and pass it to the method. Executes the transform using the input document specified by the URI and outputs the results to a file. The URI of the input document. The URI of the output file. Method 2.0.0.0 4.0.0.0 System.Void This method uses a default with no user credentials to resolve the input document and any instances of the XSLT document() function found in the style sheet. If any of these resources are located on a network resource that requires authentication, use the overload that takes an as one of its arguments and specify an with the necessary credentials. An with default settings is used to load the input document. DTD processing is disabled on the . If you require DTD processing, create an with this feature enabled, and pass it to the method. This method does not support the xsl:strip-space element. If your compiled style sheet included the xsl:strip-space element, you must use the overload which takes an as the input argument. Executes the transform using the input document specified by the URI and outputs the results to an . The URI of the input document. The to which you want to output. Method 2.0.0.0 4.0.0.0 System.Void If the XSLT document() function is enabled, it is resolved using an with no user credentials. If the external resource is located on a network resource that requires authentication, use the overload that takes an as one of its arguments and specify an with the necessary credentials. Executes the transform using the input document specified by the object and outputs the results to an . The containing the input document. The to which you want to output. Method 2.0.0.0 4.0.0.0 System.Void If the XSLT document() function is enabled, it is resolved using an with no user credentials. If the external resource is located on a network resource that requires authentication, use the overload that takes an as one of its arguments and specify an with the necessary credentials. This method does not support the xsl:strip-space element. If your compiled style sheet included the xsl:strip-space element, you must use the overload which takes an as the input argument. The interface is implemented in the and classes. These classes represent an in-memory cache of XML data. The class is based on the W3C Document Object Model (DOM) and includes editing capabilities. The class is a read-only data store based on the XPath data model. is the recommended class for XSLT processing. It provides faster performance when compared to the class. Transformations apply to the document as a whole. In other words, if you pass in a node other than the document root node, this does not prevent the transformation process from accessing all nodes in the loaded document. To transform a node fragment, you must create an object containing just the node fragment, and pass that object to the method. For more information, see How To: Transform a Node Fragment. Executes the transform using the input document specified by the object and outputs the results to an . An object implementing the interface. In the Microsoft .NET Framework, this can be either an (typically an ), or an containing the data to be transformed. The to which you want to output. Method 2.0.0.0 4.0.0.0 System.Void This method uses a default with no user credentials to resolve the input document and any instances of the XSLT document() function found in the style sheet. If any of these resources are located on a network resource that requires authentication, use the overload that takes an as one of its arguments and specify an with the necessary credentials. An with default settings is used to load the input document. DTD processing is disabled on the . If you require DTD processing, create an with this feature enabled, and pass it to the method. Executes the transform using the input document specified by the URI and outputs the results to stream. The provides additional run-time arguments. The URI of the input document. An containing the namespace-qualified arguments used as input to the transform. This value can be null. The stream to which you want to output. Method 2.0.0.0 4.0.0.0 System.Void This method uses a default with no user credentials to resolve the input document and any instances of the XSLT document() function found in the style sheet. If any of these resources are located on a network resource that requires authentication, use the overload that takes an as one of its arguments and specify an with the necessary credentials. An with default settings is used to load the input document. DTD processing is disabled on the . If you require DTD processing, create an with this feature enabled, and pass it to the method. Executes the transform using the input document specified by the URI and outputs the results to a . The URI of the input document. An containing the namespace-qualified arguments used as input to the transform. This value can be null. The to which you want to output. Method 2.0.0.0 4.0.0.0 System.Void This method uses a default with no user credentials to resolve the input document and any instances of the XSLT document() function found in the style sheet. If any of these resources are located on a network resource that requires authentication, use the overload that takes an as one of its arguments and specify an with the necessary credentials. An with default settings is used to load the input document. DTD processing is disabled on the . If you require DTD processing, create an with this feature enabled, and pass it to the method. Executes the transform using the input document specified by the URI and outputs the results to an . The provides additional run-time arguments. The URI of the input document. An containing the namespace-qualified arguments used as input to the transform. This value can be null. The to which you want to output. Method 2.0.0.0 4.0.0.0 System.Void If the style sheet includes an XSLT document() function, it is resolved using an with no user credentials. If the external resource is located on a network resource that requires authentication, use the overload that takes an as one of its arguments and specify an with the necessary credentials. Executes the transform using the input document specified by the object and outputs the results to a stream. The provides additional run-time arguments. An containing the input document. An containing the namespace-qualified arguments used as input to the transform. This value can be null. The stream to which you want to output. Method 2.0.0.0 4.0.0.0 System.Void If the style sheet includes an XSLT document() function, it is resolved using an with no user credentials. If the external resource is located on a network resource that requires authentication, use the overload that takes an as one of its arguments and specify an with the necessary credentials. Executes the transform using the input document specified by the object and outputs the results to a . The provides additional run-time arguments. An containing the input document. An containing the namespace-qualified arguments used as input to the transform. This value can be null. The to which you want to output. Method 2.0.0.0 4.0.0.0 System.Void If the style sheet includes an XSLT document() function, it is resolved using an with no user credentials. If the external resource is located on a network resource that requires authentication, use the overload that takes an as one of its arguments and specify an with the necessary credentials. Executes the transform using the input document specified by the object and outputs the results to an . The provides additional run-time arguments. An containing the input document. An containing the namespace-qualified arguments used as input to the transform. This value can be null. The to which you want to output. Method 2.0.0.0 4.0.0.0 System.Void If the XSLT document() function is enabled, it is resolved using an with no user credentials. If the external resource is located on a network resource that requires authentication, use the overload that takes an as one of its arguments and specify an with the necessary credentials. This method does not support the xsl:strip-space element. If your compiled style sheet included the xsl:strip-space element, you must use the overload which takes an as the input argument. The interface is implemented in the and classes. These classes represent an in-memory cache of XML data. The class is based on the W3C Document Object Model (DOM) and includes editing capabilities. The class is a read-only data store based on the XPath data model. is the recommended class for XSLT processing. It provides faster performance when compared to the class. Transformations apply to the document as a whole. In other words, if you pass in a node other than the document root node, this does not prevent the transformation process from accessing all nodes in the loaded document. To transform a node fragment, you must create an object containing just the node fragment, and pass that object to the method. For more information, see How To: Transform a Node Fragment. Executes the transform using the input document specified by the object and outputs the results to a stream. The provides additional runtime arguments. An object implementing the interface. In the Microsoft .NET Framework, this can be either an (typically an ), or an containing the data to be transformed. An containing the namespace-qualified arguments used as input to the transform. This value can be null. The stream to which you want to output. Method 2.0.0.0 4.0.0.0 System.Void If the XSLT document() function is enabled, it is resolved using an with no user credentials. If the external resource is located on a network resource that requires authentication, use the overload that takes an as one of its arguments and specify an with the necessary credentials. This method does not support the xsl:strip-space element. If your compiled style sheet included the xsl:strip-space element, you must use the overload which takes an as the input argument. The interface is implemented in the and classes. These classes represent an in-memory cache of XML data. The class is based on the W3C Document Object Model (DOM) and includes editing capabilities. The class is a read-only data store based on the XPath data model. is the recommended class for XSLT processing. It provides faster performance when compared to the class. Transformations apply to the document as a whole. In other words, if you pass in a node other than the document root node, this does not prevent the transformation process from accessing all nodes in the loaded document. To transform a node fragment, you must create an object containing just the node fragment, and pass that object to the method. For more information, see How To: Transform a Node Fragment. Executes the transform using the input document specified by the object and outputs the results to an . The provides additional run-time arguments. An object implementing the interface. In the Microsoft .NET Framework, this can be either an (typically an ), or an containing the data to be transformed. An containing the namespace-qualified arguments used as input to the transform. This value can be null. The to which you want to output. Method 2.0.0.0 4.0.0.0 System.Void If the XSLT document() function is enabled, it is resolved using an with no user credentials. If the external resource is located on a network resource that requires authentication, use the overload that takes an as one of its arguments and specify an with the necessary credentials. This method does not support the xsl:strip-space element. If your compiled style sheet included the xsl:strip-space element, you must use the overload which takes an as the input argument. The interface is implemented in the and classes. These classes represent an in-memory cache of XML data. The class is based on the W3C Document Object Model (DOM) and includes editing capabilities. The class is a read-only data store based on the XPath data model. is the recommended class for XSLT processing. It provides faster performance when compared to the class. Transformations apply to the document as a whole. In other words, if you pass in a node other than the document root node, this does not prevent the transformation process from accessing all nodes in the loaded document. To transform a node fragment, you must create an object containing just the node fragment, and pass that object to the method. For more information, see How To: Transform a Node Fragment. Executes the transform using the input document specified by the object and outputs the results to an . The provides additional run-time arguments. An object implementing the interface. In the Microsoft .NET Framework, this can be either an (typically an ), or an containing the data to be transformed. An containing the namespace-qualified arguments used as input to the transform. This value can be null. The to which you want to output. Method 2.0.0.0 4.0.0.0 System.Void To be added. Executes the transform using the input document specified by the object and outputs the results to an . The provides additional run-time arguments and the XmlResolver resolves the XSLT document() function. An containing the input document. An containing the namespace-qualified arguments used as input to the transform. This value can be null. The to which you want to output. The used to resolve the XSLT document() function. If this is null, the document() function is not resolved.