function jstSetInstance(template, values, index) {
  if (index == jsLength(values) - 1) {
    domSetAttribute(template, ATT_instance, CHAR_asterisk + index);
  } else {
    domSetAttribute(template, ATT_instance, STRING_empty + index);
  }
}
Sets the jsinstance attribute on a node according to its context.

@param {Element} template The template DOM node to set the instance
attribute on.

@param {Array} values The current input context, the array of
values of which the template node will render one instance.

@param {number} index The index of this template node in values.