4 * Generates XML and HTML documents describing configuration.
10 - make XML format richer (see XMLSerializer_ConfigSchema)
11 - extend XSLT transformation (see the corresponding XSLT file)
12 - allow generation of packaged docs that can be easily moved
13 - multipage documentation
14 - determine how to multilingualize
18 if (version_compare('5', PHP_VERSION
, '>')) exit('Requires PHP 5 or higher.');
19 error_reporting(E_ALL
); // probably not possible to use E_STRICT
21 define('HTMLPURIFIER_SCHEMA_STRICT', true); // description data needs to be collected
23 // load dual-libraries
24 set_include_path(realpath('../library') . PATH_SEPARATOR
. get_include_path() );
25 require_once '../library/HTMLPurifier.includes.php';
26 require_once 'library/ConfigDoc.auto.php';
28 $purifier = HTMLPurifier
::getInstance(array(
29 'AutoFormat.PurifierLinkify' => true
32 $schema = HTMLPurifier_ConfigSchema
::instance();
33 $style = 'plain'; // use $_GET in the future
34 $configdoc = new ConfigDoc();
35 $output = $configdoc->generate($schema, $style);
38 file_put_contents("$style.html", $output);
40 if (php_sapi_name() != 'cli') {
41 // output = instant feedback
44 echo 'Files generated successfully.';