<?php

if (isset($_GET['source'])) { die(highlight_file(__FILE__1)); }

// load the XSL stylesheet
$xsl_doc = new DOMDocument();
$xsl_doc->load("HexTAC_doc_to_interface.xsl");
$proc = new XSLTProcessor();
$proc->importStylesheet($xsl_doc);

// the XSL stylesheet may accept up to 5 parameters:

// document name
$proc->setParameter('''document''Test document');
// current date
$proc->setParameter('''date'date('UTC'));
// current time
$proc->setParameter('''time'time());
// user name
$proc->setParameter('''user''John');
// file name of a previously summarized document
// in case you want to modify an extract produced by HexTAC
$proc->setParameter('''summary''example/extract.xml');

// apply the stylesheet to generate the Web interface
$xml_doc = new DOMDocument();
// source document
$xml_doc->load('example/source.xml');
echo(
$proc->transformToXML($xml_doc));

?>