3 require_once 'HTMLPurifier/HTMLModule.php';
4 require_once 'HTMLPurifier/ChildDef/Table.php';
7 * XHTML 1.1 Tables Module, fully defines accessible table elements.
9 class HTMLPurifier_HTMLModule_Tables
extends HTMLPurifier_HTMLModule
14 function HTMLPurifier_HTMLModule_Tables() {
16 $this->addElement('caption', true, false, 'Inline', 'Common');
18 $this->addElement('table', true, 'Block',
19 new HTMLPurifier_ChildDef_Table(), 'Common',
22 'cellpadding' => 'Length',
23 'cellspacing' => 'Length',
24 'frame' => 'Enum#void,above,below,hsides,lhs,rhs,vsides,box,border',
25 'rules' => 'Enum#none,groups,rows,cols,all',
33 'align' => 'Enum#left,center,right,justify,char',
34 'charoff' => 'Length',
35 'valign' => 'Enum#top,middle,bottom,baseline',
38 $cell_t = array_merge(
41 'colspan' => 'Number',
42 'rowspan' => 'Number',
46 $this->addElement('td', true, false, 'Flow', 'Common', $cell_t);
47 $this->addElement('th', true, false, 'Flow', 'Common', $cell_t);
49 $this->addElement('tr', true, false, 'Required: td | th', 'Common', $cell_align);
51 $cell_col = array_merge(
54 'width' => 'MultiLength',
58 $this->addElement('col', true, false, 'Empty', 'Common', $cell_col);
59 $this->addElement('colgroup', true, false, 'Optional: col', 'Common', $cell_col);
61 $this->addElement('tbody', true, false, 'Required: tr', 'Common', $cell_align);
62 $this->addElement('thead', true, false, 'Required: tr', 'Common', $cell_align);
63 $this->addElement('tfoot', true, false, 'Required: tr', 'Common', $cell_align);