/**
  * Creates a new response object
  *
  * @return  scriptlet.xml.XMLScriptletResponse
  */
 protected function newResponse(Stylesheet $stylesheet)
 {
     $res = new \scriptlet\xml\XMLScriptletResponse();
     $res->setProcessor(new DomXSLProcessor());
     $stylesheet->addParam('__state');
     $stylesheet->addParam('__page');
     $stylesheet->addParam('__lang');
     $stylesheet->addParam('__product');
     $stylesheet->addParam('__sess');
     $stylesheet->addParam('__query');
     $res->setStylesheet($stylesheet, XSLT_TREE);
     return $res;
 }
 public function addNamedTemplate()
 {
     $s = new Stylesheet();
     $s->addTemplate(create(new \xml\XslTemplate())->named('sitemap'));
     $this->assertEquals('<xsl:template name="sitemap"></xsl:template>', trim($this->getElementsByTagName($s->root, 'xsl:template')->get(0)->getSource(INDENT_NONE)));
 }