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 require_once '../library/HTMLPurifier.auto.php';
25 require_once 'library/ConfigDoc.auto.php';
27 $purifier = HTMLPurifier
::getInstance(array(
28 'AutoFormat.PurifierLinkify' => true
31 $schema = HTMLPurifier_ConfigSchema
::instance();
32 $style = 'plain'; // use $_GET in the future
33 $configdoc = new ConfigDoc();
34 $output = $configdoc->generate($schema, $style);
37 file_put_contents("$style.html", $output);
39 if (php_sapi_name() != 'cli') {
40 // output = instant feedback
43 echo 'Files generated successfully.';