protected function importView(dom\node $source, dom\node $target) { if ($sPath = $source->readx('@extends', array(), false)) { $file = $this->getSourceFile($sPath); $new = $this->importDocument($file->asDocument(array(), \Sylma::MODE_EXECUTE, false), $file); $target->shift($new->getRoot()->getChildren()); $this->importView($new, $target); } }