}
  void doApply(Stylesheet stylesheet, QName mode,               Node context, int pos, int len,               Node parent, Node nextSibling)    throws TransformerException  {    String value = "";    Document doc = (parent instanceof Document) ? (Document) parent :      parent.getOwnerDocument();    if (children != null)      {        // Create a document fragment to hold the text        DocumentFragment fragment = doc.createDocumentFragment();        // Apply children to the fragment        children.apply(stylesheet, mode,                       context, pos, len,                       fragment, null);        // Use XPath string-value of fragment        value = Expr.stringValue(fragment);      }    Comment comment = doc.createComment(value);    // Insert into result tree    if (nextSibling != null)      {        parent.insertBefore(comment, nextSibling);      }    else      {        parent.appendChild(comment);      }    if (next != null)      {        next.apply(stylesheet, mode,                   context, pos, len,                   parent, nextSibling);      }  }