ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
List.php
Go to the documentation of this file.
1 <?php
2 
7 {
8 
9  public $name = 'List';
10 
11  // According to the abstract schema, the List content set is a fully formed
12  // one or more expr, but it invariably occurs in an optional declaration
13  // so we're not going to do that subtlety. It might cause trouble
14  // if a user defines "List" and expects that multiple lists are
15  // allowed to be specified, but then again, that's not very intuitive.
16  // Furthermore, the actual XML Schema may disagree. Regardless,
17  // we don't have support for such nested expressions without using
18  // the incredibly inefficient and draconic Custom ChildDef.
19 
20  public $content_sets = array('Flow' => 'List');
21 
22  public function setup($config) {
23  $ol = $this->addElement('ol', 'List', new HTMLPurifier_ChildDef_List(), 'Common');
24  $ul = $this->addElement('ul', 'List', new HTMLPurifier_ChildDef_List(), 'Common');
25  // XXX The wrap attribute is handled by MakeWellFormed. This is all
26  // quite unsatisfactory, because we generated this
27  // *specifically* for lists, and now a big chunk of the handling
28  // is done properly by the List ChildDef. So actually, we just
29  // want enough information to make autoclosing work properly,
30  // and then hand off the tricky stuff to the ChildDef.
31  $ol->wrap = 'li';
32  $ul->wrap = 'li';
33  $this->addElement('dl', 'List', 'Required: dt | dd', 'Common');
34 
35  $this->addElement('li', false, 'Flow', 'Common');
36 
37  $this->addElement('dd', false, 'Flow', 'Common');
38  $this->addElement('dt', false, 'Inline', 'Common');
39  }
40 
41 }
42 
43 // vim: et sw=4 sts=4