StaticContextSettings.DeclareVariable Method (XmlQualifiedName, XdmType)StaticContextSettings.DeclareVariable Method (XmlQualifiedName, XdmType)StaticContextSettings::DeclareVariable Method (XmlQualifiedName^, XdmType^)

Declares an external variable with the specified name and type.

Syntax

Public Sub DeclareVariable( _
    name As System.Xml.XmlQualifiedName, _
    type As XdmType _
)
public void DeclareVariable(
    System.Xml.XmlQualifiedName name,
    XdmType type
)
public:
void DeclareVariable(
    System.Xml::XmlQualifiedName^ name, 
    XdmType^ type
)
 

Parameters

name

Type: System.Xml.XmlQualifiedNameSystem.Xml.XmlQualifiedNameSystem.Xml::XmlQualifiedName^

The qualified name of the variable

type

Type: XmlPrime.XdmTypeXmlPrime.XdmTypeXmlPrime::XdmType^

The type of the variable

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullExceptionname is null a null reference (Nothing in Visual Basic) nullptr.

Remarks

If type is not null a null reference (Nothing in Visual Basic) nullptr, then calling this method is equivalent to the following XQuery declaration:

 
            declare variable    as    external;
            
 

If name is null a null reference (Nothing in Visual Basic) nullptr, then calling this method is equivalent to the following XQuery declaration:

 
            declare variable    external;