2007-02-04 01:52:13 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
2007-02-04 04:41:34 +00:00
|
|
|
* XHTML 1.1 List Module, defines list-oriented elements. Core Module.
|
2007-02-04 01:52:13 +00:00
|
|
|
*/
|
|
|
|
class HTMLPurifier_HTMLModule_List extends HTMLPurifier_HTMLModule
|
|
|
|
{
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-11-25 02:24:39 +00:00
|
|
|
public $name = 'List';
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-02-04 20:09:35 +00:00
|
|
|
// According to the abstract schema, the List content set is a fully formed
|
2007-02-04 01:52:13 +00:00
|
|
|
// one or more expr, but it invariably occurs in an optional declaration
|
|
|
|
// so we're not going to do that subtlety. It might cause trouble
|
|
|
|
// if a user defines "List" and expects that multiple lists are
|
|
|
|
// allowed to be specified, but then again, that's not very intuitive.
|
2007-02-04 20:09:35 +00:00
|
|
|
// Furthermore, the actual XML Schema may disagree. Regardless,
|
|
|
|
// we don't have support for such nested expressions without using
|
|
|
|
// the incredibly inefficient and draconic Custom ChildDef.
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-11-25 02:24:39 +00:00
|
|
|
public $content_sets = array('Flow' => 'List');
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2008-05-22 19:36:59 +00:00
|
|
|
public function setup($config) {
|
2008-04-21 23:28:52 +00:00
|
|
|
$this->addElement('ol', 'List', 'Required: li', 'Common');
|
|
|
|
$this->addElement('ul', 'List', 'Required: li', 'Common');
|
|
|
|
$this->addElement('dl', 'List', 'Required: dt | dd', 'Common');
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2008-04-21 23:28:52 +00:00
|
|
|
$this->addElement('li', false, 'Flow', 'Common');
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2008-04-21 23:28:52 +00:00
|
|
|
$this->addElement('dd', false, 'Flow', 'Common');
|
|
|
|
$this->addElement('dt', false, 'Inline', 'Common');
|
2007-02-04 01:52:13 +00:00
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-02-04 01:52:13 +00:00
|
|
|
}
|
|
|
|
|
2008-12-06 09:24:59 +00:00
|
|
|
// vim: et sw=4 sts=4
|