Freigeben über


AllowXsltScript Property

 

Enables (true) or disables (false) the <msxsl:script> element functionality in XLST. If this property is set to false, attempts to use a stylesheet that uses script will result in a "Security settings do not allow the execution of script code within this stylesheet" error.

This property has security implications. For more information, see MSXML Security Overview and DOM Security.

Script Syntax

domObj.setProperty(strProp, strVal);  
strVal= domObj.getProperty(strProp);  

Visual Basic Syntax

domObj.setProperty
(strProp, strVal)  
strVal= domObj.getProperty
(strProp)  

C\C++ Syntax

HRESULT setProperty(BSTR strProp, VARIANT strVal);  
HRESULT getProperty(BSTR strProp, VARIANT* strVal);  

Parameters

strProp
A BSTR string whose value is "AllowXsltScript".

strVal
A VARIANT_BOOL value of true or false.

Remarks

Because XSLT scripting is used only with an XSLT style sheet, the AllowXsltScript property is effective only when it is set on a DOM object that represents an XSLT style sheet. When set, it applies to all the ensuing transformations initiated either by the transformNode or transformNodeToObject method or through the XSLProcessor object.

When the style sheet DOM object is cloned, the value of this property is propagated to the cloned object.

When this property is set to false, the presence of the msxsl:script in an XSLT style sheet does not necessarily generate errors, as long as the script is not invoked in a transformation.

Versioning

This property is supported in MSXML 3.0 and 6.0. The default value is true for 3.0. The default value is false for 6.0.

Applies to

Interface: IXMLDOMDocument2

Methods: setProperty | getProperty