code: function xsltVariable(input, template, override) {
    var name = xmlGetAttribute(template, 'name');
    var select = xmlGetAttribute(template, 'select');
  
    var value;
  
    if (template.childNodes.length > 0) {
      var root = domCreateDocumentFragment(template.ownerDocument);
      xsltChildNodes(input, template, root);
      value = new NodeSetValue([root]);
  
    } else if (select) {
      value = xpathEval(select, input);
  
    } else {
      value = new StringValue('');
    }
  
    if (override || !input.getVariable(name)) {
      input.setVariable(name, value);
    }
  }
docs: Evaluates a variable or parameter and set it in the current input context. Implements xsl:variable, xsl:param, and xsl:with-param.  @param override flag that defines if the value computed here overrides the one already in the input context if that is the case. I.e. decides if this is a default value or a local value. xsl:variable and xsl:with-param override; xsl:param doesn't.