2007-05-28 02:20:55 +00:00
< ? php
// overload default configuration schema temporarily
$custom_schema = new HTMLPurifier_ConfigSchema ();
$old = HTMLPurifier_ConfigSchema :: instance ();
$custom_schema =& HTMLPurifier_ConfigSchema :: instance ( $custom_schema );
2007-06-25 18:38:39 +00:00
HTMLPurifier_ConfigSchema :: defineNamespace ( 'Element' , 'Chemical substances that cannot be further decomposed' );
HTMLPurifier_ConfigSchema :: define ( 'Element' , 'Abbr' , 'H' , 'string' , 'Abbreviation of element name.' );
HTMLPurifier_ConfigSchema :: define ( 'Element' , 'Name' , 'hydrogen' , 'istring' , 'Full name of atoms.' );
HTMLPurifier_ConfigSchema :: define ( 'Element' , 'Number' , 1 , 'int' , 'Atomic number, is identity.' );
HTMLPurifier_ConfigSchema :: define ( 'Element' , 'Mass' , 1.00794 , 'float' , 'Atomic mass.' );
HTMLPurifier_ConfigSchema :: define ( 'Element' , 'Radioactive' , false , 'bool' , 'Does it have rapid decay?' );
HTMLPurifier_ConfigSchema :: define ( 'Element' , 'Isotopes' , array ( '1' => true , '2' => true , '3' => true ), 'lookup' ,
2007-05-28 02:20:55 +00:00
'What numbers of neutrons for this element have been observed?' );
2007-06-25 18:38:39 +00:00
HTMLPurifier_ConfigSchema :: define ( 'Element' , 'Traits' , array ( 'nonmetallic' , 'odorless' , 'flammable' ), 'list' ,
2007-05-28 02:20:55 +00:00
'What are general properties of the element?' );
2007-06-25 18:38:39 +00:00
HTMLPurifier_ConfigSchema :: define ( 'Element' , 'IsotopeNames' , array ( '1' => 'protium' , '2' => 'deuterium' , '3' => 'tritium' ), 'hash' ,
2007-05-28 02:20:55 +00:00
'Lookup hash of neutron counts to formal names.' );
2007-06-25 18:38:39 +00:00
HTMLPurifier_ConfigSchema :: defineNamespace ( 'Instrument' , 'Of the musical type.' );
2007-05-28 02:20:55 +00:00
2007-06-25 18:38:39 +00:00
HTMLPurifier_ConfigSchema :: define ( 'Instrument' , 'Manufacturer' , 'Yamaha' , 'string' , 'Who made it?' );
HTMLPurifier_ConfigSchema :: defineAllowedValues ( 'Instrument' , 'Manufacturer' , array (
2007-05-28 02:20:55 +00:00
'Yamaha' , 'Conn-Selmer' , 'Vandoren' , 'Laubin' , 'Buffet' , 'other' ));
2007-06-25 18:38:39 +00:00
HTMLPurifier_ConfigSchema :: defineValueAliases ( 'Instrument' , 'Manufacturer' , array (
2007-05-28 02:20:55 +00:00
'Selmer' => 'Conn-Selmer' ));
2007-06-25 18:38:39 +00:00
HTMLPurifier_ConfigSchema :: define ( 'Instrument' , 'Family' , 'woodwind' , 'istring' , 'What family is it?' );
HTMLPurifier_ConfigSchema :: defineAllowedValues ( 'Instrument' , 'Family' , array (
2007-05-28 02:20:55 +00:00
'brass' , 'woodwind' , 'percussion' , 'string' , 'keyboard' , 'electronic' ));
2007-06-25 18:38:39 +00:00
HTMLPurifier_ConfigSchema :: defineValueAliases ( 'Instrument' , 'Family' , array (
2007-05-28 02:20:55 +00:00
'synth' => 'electronic' ));
2007-06-25 18:38:39 +00:00
HTMLPurifier_ConfigSchema :: defineNamespace ( 'ReportCard' , 'It is for grades.' );
HTMLPurifier_ConfigSchema :: define ( 'ReportCard' , 'English' , null , 'string/null' , 'Grade from English class.' );
HTMLPurifier_ConfigSchema :: define ( 'ReportCard' , 'Absences' , 0 , 'int' , 'How many times missing from school?' );
2007-05-28 02:20:55 +00:00
2007-06-29 02:16:47 +00:00
HTMLPurifier_ConfigSchema :: defineNamespace ( 'Text' , 'This stuff is long, boring, and English.' );
HTMLPurifier_ConfigSchema :: define ( 'Text' , 'AboutUs' , 'Nothing much, but this should be decently long so that a textarea would be better' , 'text' , 'Who are we? What are we up to?' );
HTMLPurifier_ConfigSchema :: define ( 'Text' , 'Hash' , " not-case-sensitive \n still-not-case-sensitive \n super-not-case-sensitive " , 'itext' , 'This is of limited utility, but of course it ends up being used.' );