function &create(&$root, &$pipeline) { $state =& $pipeline->getCurrentCSSState(); $box =& new TableSectionBox(); $box->readCSS($state); // Automatically create at least one table row $row = new TableRowBox(); $row->readCSS($state); $box->add_child($row); // Parse table contents $child = $root->first_child(); while ($child) { $child_box =& create_pdf_box($child, $pipeline); $box->add_child($child_box); $child = $child->next_sibling(); } return $box; }