Microsoft XML Core Services (MSXML) 4.0 - DOM Reference

AllowDocumentFunction Property

This property, supported in MSXML 3.0 SP4 and MSXML 4.0 SP2, is used to enable (true) or disable (false) the document function in XLST. Attempts to call the disabled document function will result in an "Access Denied" error.

[JScript]

JScript Syntax

domObj.setProperty(strProp, strVal);
strVal= domObj.getProperty(strProp);
[Visual Basic]

Visual Basic Syntax

domObj.setProperty(strProp, strVal)
strVal= domObj.getProperty(strProp)
[C/C++]

C/C++ Syntax

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

Value

strProp
A BSTR string whose value is "AllowDocumentFunction".
StrVal
A VARIANT_BOOL value of true or false. The default value is true in MSXML 3.0 SP4 and false in MSXML 4.0 SP2.

Remarks

Because the document function is used in an XSLT style sheet, the AllowDocumentFunction property is effective only when it is set on a DOM object representing 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 not propagated to the cloned object. You need to reset this property on the clone if desired.

When XSLTemplate is used, the value of this property used is the one set on the DOM object when the corresponding XSLT style sheet is added (for example, at compile time), not when it is applied.

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

Applies To

Component: MSXML 3.0 SP4 and MSXML 4.0 SP2

Interface: IXMLDOMDocument2

Method: setProperty | getProperty

This HTML Help has been published using the chm2web software.