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 // load dual-libraries
22 require_once '../library/HTMLPurifier.auto.php';
23 require_once 'library/ConfigDoc.auto.php';
25 $purifier = HTMLPurifier
::getInstance(array(
26 'AutoFormat.PurifierLinkify' => true
29 $schema = HTMLPurifier_ConfigSchema
::instance();
30 $style = 'plain'; // use $_GET in the future
31 $configdoc = new ConfigDoc();
32 $output = $configdoc->generate($schema, $style);
35 file_put_contents("$style.html", $output);
37 if (php_sapi_name() != 'cli') {
38 // output = instant feedback
41 echo 'Files generated successfully.';