22. set-variable

set-variable(name, value)

Set variable having specified name to specified value. Parameter name is a string representing an XML qualified name.

The variable set by this command is the variable in scope having specified name. It is either a variable local to a macro or a global variable. See also command variable().

Examples:

namespace my="urn:x-acme:namespace:local";

set-variable("my:list", <ul/>);

set-variable("listItem", preceding-sibling::li[last()]);