Editare

Partajați prin


XsltSettings Constructors

Definition

Initializes a new instance of the XsltSettings class.

Overloads

XsltSettings()

Initializes a new instance of the XsltSettings class with default settings.

XsltSettings(Boolean, Boolean)

Initializes a new instance of the XsltSettings class with the specified settings.

XsltSettings()

Source:
XsltSettings.cs
Source:
XsltSettings.cs
Source:
XsltSettings.cs

Initializes a new instance of the XsltSettings class with default settings.

public:
 XsltSettings();
public XsltSettings ();
Public Sub New ()

Remarks

The new XsltSettings object does not support the XSLT document() function or embedded script blocks.

Important

XSLT scripting should be enabled only if you require script support and you are working in a fully trusted environment. If you enable the document() function, you can restrict the resources that can be accessed by passing an XmlSecureResolver object to the Transform method.

See also

Applies to

XsltSettings(Boolean, Boolean)

Source:
XsltSettings.cs
Source:
XsltSettings.cs
Source:
XsltSettings.cs

Initializes a new instance of the XsltSettings class with the specified settings.

public:
 XsltSettings(bool enableDocumentFunction, bool enableScript);
public XsltSettings (bool enableDocumentFunction, bool enableScript);
new System.Xml.Xsl.XsltSettings : bool * bool -> System.Xml.Xsl.XsltSettings
Public Sub New (enableDocumentFunction As Boolean, enableScript As Boolean)

Parameters

enableDocumentFunction
Boolean

true to enable support for the XSLT document() function; otherwise, false.

enableScript
Boolean

true to enable support for embedded scripts blocks; otherwise, false.

Examples

The following example loads a style sheet and enables XSLT script support.

// Create the XsltSettings object with script enabled.
XsltSettings settings = new XsltSettings(false,true);

// Create the XslCompiledTransform object and load the style sheet.
XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load("sort.xsl", settings, new XmlUrlResolver());
' Create the XsltSettings object with script enabled.
Dim settings As New XsltSettings(False, True)
        
' Create the XslCompiledTransform object and load the style sheet.
Dim xslt As New XslCompiledTransform()
xslt.Load("sort.xsl", settings, New XmlUrlResolver())

Remarks

Important

XSLT scripting should be enabled only if you require script support and you are working in a fully trusted environment. If you enable the document() function, you can restrict the resources that can be accessed by passing an XmlSecureResolver object to the Transform method.

See also

Applies to