root/afridex/plugins/Flutter/purifier_lib/HTMLPurifier/HTMLModule/Ruby.php @ 22

Revision 21, 0.9 kB (checked in by admin, 18 years ago)
Line 
1<?php
2
3/**
4 * XHTML 1.1 Ruby Annotation Module, defines elements that indicate
5 * short runs of text alongside base text for annotation or pronounciation.
6 */
7class HTMLPurifier_HTMLModule_Ruby extends HTMLPurifier_HTMLModule
8{
9   
10    public $name = 'Ruby';
11   
12    public function __construct() {
13        $this->addElement('ruby', 'Inline',
14            'Custom: ((rb, (rt | (rp, rt, rp))) | (rbc, rtc, rtc?))',
15            'Common');
16        $this->addElement('rbc', false, 'Required: rb', 'Common');
17        $this->addElement('rtc', false, 'Required: rt', 'Common');
18        $rb = $this->addElement('rb', false, 'Inline', 'Common');
19        $rb->excludes = array('ruby' => true);
20        $rt = $this->addElement('rt', false, 'Inline', 'Common', array('rbspan' => 'Number'));
21        $rt->excludes = array('ruby' => true);
22        $this->addElement('rp', false, 'Optional: #PCDATA', 'Common');
23    }
24   
25}
26
Note: See TracBrowser for help on using the browser.