XslTransform.XmlResolver Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Sets the XmlResolver used to resolve external resources when the Transform method is called.

Namespace:   System.Xml.Xsl
Assembly:  System.Xml (in System.Xml.dll)

public XmlResolver XmlResolver { set; }

Property Value

Type: System.Xml.XmlResolver

The XmlResolver to use during transformation. If set to null, the XSLT document() function is not resolved.

System_CAPS_noteNote

The XslTransform class is obsolete in the .NET Framework version 2.0. The XslCompiledTransform class is the new XSLT processor. For more information, see Using the XslCompiledTransform Class and Migrating From the XslTransform Class.

In version 1.1 of the .NET Framework, the trust level of the application determines the default behavior:

Fully trusted code: A default XmlUrlResolver with no user credentials is used to resolve the document() function. If authentication is required to access the external resource, use this property to specify an XmlResolver with the necessary credentials.

Semi-trusted code: The property is set to null, which means the document() function is not resolved. Because full trust is required to specify an XmlResolver, this property also cannot be set.

This resolver is used when the XSLT document() function is invoked. It is not used to resolve xsl:import and xsl:include elements referenced in the style sheet. To specify an XmlResolver to use to resolve xsl:import and xsl:include elements referenced in the style sheet, use the Load overload, which takes an XmlResolver as one of its arguments.

System_CAPS_noteNote

This property is obsolete in version 1.1 of the .NET Framework. Specifying an XmlResolver using the Transform method is the recommended practice. In this case, the XmlResolver is not cached after the Transform method completes.

.NET Framework
Available since 1.1
Return to top
Show: