24 require_once(
"./Services/COPage/classes/class.ilPageContent.php");
25 require_once(
"./Services/COPage/classes/class.ilPCTable.php");
54 $this->tab_node =& $a_node->first_child();
57 function create(&$a_pg_obj, $a_hier_id, $a_pc_id =
"")
61 $this->tab_node =& $this->dom->create_element(
"Table");
62 $this->tab_node =& $this->node->append_child($this->tab_node);
63 $this->tab_node->set_attribute(
"Language",
"");
64 $this->tab_node->set_attribute(
"DataTable",
"y");
73 $path =
"//PageContent[@HierId='".$this->getHierId().
"']".
74 "/Table/TableRow[$i+1]/TableData[$j+1]/PageContent[1]/Paragraph[1]";
77 if (is_object(
$res->nodeset[0]))
79 return $res->nodeset[0];
84 $path2 =
"//PageContent[@HierId='".$this->getHierId().
"']".
85 "/Table/TableRow[".($i+1).
"]/TableData[".($j+1).
"]";
90 $td_node = $res2->nodeset[0];
92 if (is_object($td_node))
95 $children = $td_node->child_nodes();
96 for($i=0; $i<count($children); $i++)
98 $td_node->remove_child($children[$i]);
103 $pc_node = $td_node->append_child($pc_node);
104 $par_node = $this->dom->create_element(
"Paragraph");
105 $par_node = $pc_node->append_child($par_node);
106 $par_node->set_attribute(
"Characteristic",
"TableContent");
107 $par_node->set_attribute(
"Language",
124 if (is_object($cell_par))
127 $childs = $cell_par->child_nodes();
128 for($i=0; $i<count($childs); $i++)
130 $content.= $this->dom->dump_node($childs[$i]);
147 if (is_array($a_data))
149 foreach ($a_data as $i => $row)
153 foreach ($row as $j => $cell)
155 $temp_dom = @
domxml_open_mem(
'<?xml version="1.0" encoding="UTF-8"?><Paragraph>'.$cell.
'</Paragraph>',
156 DOMXML_LOAD_PARSING, $error);
162 if(empty($error) && is_object($par_node))
165 $children = $par_node->child_nodes();
166 for($k=0; $k < count($children); $k++)
168 $par_node->remove_child($children[$k]);
173 $path =
"//Paragraph";
176 if (count(
$res->nodeset) == 1)
178 $new_par_node =&
$res->nodeset[0];
179 $new_childs = $new_par_node->child_nodes();
180 for ($l = 0; $l < count($new_childs); $l++)
182 $cloned_child = $new_childs[$l]->clone_node(
true);
183 $par_node->append_child($cloned_child);