Esempio n. 1
0
 /**
  * Transform the source DOM into a series of row elements according
  * to the row definitions.
  *
  * @param \DOMDocument $sourceDom
  * @param array $rowDefinitions
  * @param array $parameters
  *
  * @return Document
  */
 public function buildTable(\DOMDocument $sourceDom, Definition $definition, array $parameters = array())
 {
     $tableDom = new TableDom();
     $sourceXpath = new XPath($sourceDom);
     $this->xpathResolver->registerXPathFunctions($tableDom->xpath());
     $this->xpathResolver->registerXPathFunctions($sourceXpath);
     $tableEl = $tableDom->createRoot('table');
     $this->iterateRowDefinitions($tableEl, $sourceXpath, $definition, $parameters);
     $this->executePasses($definition, $tableEl);
     return $tableDom;
 }