Saxon API for .NET

XPathSelector.SetVariable Method 

Set the value of a variable The name of the variable. This must match the name of a variable that was declared to the XPathCompiler. No error occurs if the expression does not actually reference a variable with this name.The value to be given to the variable.

public void SetVariable(
   QName name,
   XdmValue value
);

See Also

XPathSelector Class | Saxon.Api Namespace