15 $this->def =
$config->getHTMLDefinition();
17 $ret .= $this->
start(
'div', array(
'class' =>
'HTMLPurifier_Printer'));
33 $doctype = $this->def->doctype;
37 $ret .= $this->
row(
'Name', $doctype->name);
38 $ret .= $this->
row(
'XML', $doctype->xml ?
'Yes' :
'No');
39 $ret .= $this->
row(
'Default Modules', implode($doctype->modules,
', '));
40 $ret .= $this->
row(
'Default Tidy Modules', implode($doctype->tidyModules,
', '));
57 $ret .= $this->
row(
'Parent of fragment',
$def->info_parent);
59 $ret .= $this->
row(
'Block wrap name',
$def->info_block_wrapper);
69 foreach (
$def->info_tag_transform as $old => $new) {
70 $new = $this->
getClass($new,
'TagTransform_');
71 $list[] =
"<$old> with $new";
97 foreach ($this->def->info_content_sets as
$name => $lookup) {
113 $ret .= $this->
element(
'caption',
'Elements ($info)');
114 ksort($this->def->info);
119 foreach ($this->def->info as
$name =>
$def) {
121 $ret .= $this->
element(
'th',
"<$name>", array(
'class'=>
'heavy',
'colspan' => 2));
125 $ret .= $this->
element(
'td',
$def->descendants_are_inline ?
'Yes' :
'No');
127 if (!empty(
$def->excludes)) {
133 if (!empty(
$def->attr_transform_pre)) {
139 if (!empty(
$def->attr_transform_post)) {
141 $ret .= $this->
element(
'th',
'Post-AttrTransform');
145 if (!empty(
$def->auto_close)) {
152 $ret .= $this->
element(
'th',
'Allowed attributes');
156 if (!empty(
$def->required_attr)) {
176 if (isset(
$def->elements)) {
177 if (
$def->type ==
'strictblockquote') {
178 $def->validateChildren(array(), $this->config, $context);
180 $elements =
$def->elements;
182 if (
$def->type ==
'chameleon') {
183 $attr[
'rowspan'] = 2;
187 $elements = array_flip(array(
'col',
'caption',
'colgroup',
'thead',
188 'tfoot',
'tbody',
'tr'));
190 $ret .= $this->
element(
'th',
'Allowed children', $attr);
192 if (
$def->type ==
'chameleon') {
200 '<em>Inline</em>: ' .
210 '<em>'.ucfirst(
$def->type).
'</em>: ' .
211 $this->escape($this->listifyTagLookup($elements)),0,0);
224 foreach ($array as
$name => $discard) {
225 if (
$name !==
'#PCDATA' && !isset($this->def->info[
$name]))
continue;
239 foreach ($array as $discard => $obj) {
240 $list[] = $this->
getClass($obj,
'AttrTransform_');
252 foreach ($array as
$name => $obj) {
253 if ($obj ===
false)
continue;
254 $list[] =
"$name = <i>" . $this->
getClass($obj,
'AttrDef_') .
'</i>';
265 $ret .= $this->
element(
'th', $text, array(
'colspan' => $num,
'class' =>
'heavy'));