Saxon API for .NET

XQueryCompiler.DeclareNamespace Method 

Declare a namespace for use by the query. This has the same status as a namespace appearing within the query prolog (though a declaration in the query prolog of the same prefix will take precedence)

public void DeclareNamespace(
   string prefix,
   string uri
);

Parameters

prefix
The namespace prefix to be declared. Use a zero-length string to declare the default namespace (that is, the default namespace for elements and types).
uri
The namespace URI. It is possible to specify a zero-length string to "undeclare" a namespace.

See Also

XQueryCompiler Class | Saxon.Api Namespace