/**
  * Set the current template. This is used to support xsl:apply-imports. The caller is responsible
  * for remembering the previous current template and resetting it after use.
  *
  * @param template the current template
  */
 public void setCurrentTemplate(Template template) {
   xsltContext = new XSLTContext(xsltContext);
   xsltContext.currentTemplate = template;
 }