code: function xsltPassText(template) {
    if (!template.nodeValue.match(/^\s*$/)) {
      return true;
    }
  
    var element = template.parentNode;
    if (element.nodeName == 'xsl:text') {
      return true;
    }
  
    while (element && element.nodeType == DOM_ELEMENT_NODE) {
      var xmlspace = domGetAttribute(element, 'xml:space');
      if (xmlspace) {
        if (xmlspace == 'default') {
          return false;
        } else if (xmlspace == 'preserve') {
          return true;
        }
      }
  
      element = element.parentNode;
    }
  
    return false;
  }
docs: Determines if a text node in the XSLT template document is to be stripped according to XSLT whitespace stipping rules.  See [XSLT], section 3.4.  TODO(mesch): Whitespace stripping on the input document is currently not implemented.