{
  void doApply(Stylesheet stylesheet, QName mode,               Node context, int pos, int len,               Node parent, Node nextSibling)    throws TransformerException  {    if (withParams != null)      {        // compute the parameter values        LinkedList values = new LinkedList();        for (Iterator i = withParams.iterator(); i.hasNext(); )          {            WithParam p = (WithParam) i.next();            Object value = p.getValue(stylesheet, mode, context, pos, len);            Object[] pair = new Object[2];            pair[0] = p.name;            pair[1] = value;            values.add(pair);          }        // push the parameter context        stylesheet.bindings.push(Bindings.WITH_PARAM);        // set the parameters        for (Iterator i = values.iterator(); i.hasNext(); )          {            Object[] pair = (Object[]) i.next();            QName name = (QName) pair[0];            Object value = pair[1];            stylesheet.bindings.set(name, value, Bindings.WITH_PARAM);            if (stylesheet.debug)              {                System.err.println("with-param: " + name + " = " + value);              }          }      }    TemplateNode t = stylesheet.getTemplate(mode, name);    if (t != null)      {        t.apply(stylesheet, mode, context, pos, len,                parent, nextSibling);      }    if (withParams != null)      {        // pop the variable context        stylesheet.bindings.pop(Bindings.WITH_PARAM);      }    // call-template doesn't have processable children    if (next != null)      {        next.apply(stylesheet, mode,                   context, pos, len,                   parent, nextSibling);      }  }