node using a dynamic name * * @param DOMElement $template node * @param Tag $tag Tag this template belongs to * @return void */ public function check(DOMElement $template, Tag $tag) { $nodes = $template->getElementsByTagNameNS(self::XMLNS_XSL, 'element'); foreach ($nodes as $node) { if (strpos($node->getAttribute('name'), '{') !== false) { throw new UnsafeTemplateException('Dynamic names are disallowed', $node); } } } }