Headline 1
Lorem Ipsum >>>>
Table of Contents
<<<< Lorem Ipsum
Headline 2
lorem ipsum
Headline 2
lorem ipsum
Headline 3
lorem ipsum
Headline 1
lorem ipsum
Headline 2
lorem ipsum
EOT;
class TestMarkupvfsfile
{
/**
* utility class
* @var JSTestUtil
*/
protected $util;
/**
* Scanner
* @var WBMarkup_Scanner
*/
protected $scan;
/**
* Handler
* @var WBMarkup_Handler_Xml2Html
*/
protected $hdl;
/**
* Handler
* @var WBMarkup_Handler_Xinha2Xml
*/
protected $hdlXml;
public function __construct()
{
$this->ute = new JSTestUtil();
$this->scan = WBClass::create( 'WBMarkup_Scanner' );
$this->hdl = WBClass::create( 'WBMarkup_Handler_Xml2Xinha' );
$this->hdlXml = WBClass::create( 'WBMarkup_Handler_Xinha2Xml' );
$this->hdlHtml = WBClass::create( 'WBMarkup_Handler_Xml2Html' );
}
public function displayAll($markup)
{
$this->ute->mkHeader(true);
foreach ($markup as $ml) {
$this->scan->setHandler($this->hdl);
echo "
\n";
echo "Convert ".strlen($ml)." bytes
\n";
echo "
XML\n";
echo htmlspecialchars( $ml );
echo "
Xml2Xinha\n";
echo "scan " . $this->scan->scan($ml) . "
\n";
$xinha = $this->hdl->getParsedContent();
$html = WBString::replaceSuperPlaceholders($xinha);
echo htmlspecialchars( $html) . "\n";
$this->scan->setHandler($this->hdlXml);
echo "
Xinha2Xml\n";
echo "scan " . $this->scan->scan($xinha) . "
\n";
$xml = $this->hdlXml->getParsedContent();
echo htmlspecialchars( $xml ) . "\n";
$this->scan->setHandler($this->hdlHtml);
echo "
Xml2Html\n";
echo "scan " . $this->scan->scan($xml) . "
\n";
$html = $this->hdlHtml->getParsedContent();
echo htmlspecialchars( $html ) . "\n";
echo "
\n";
echo $html;
break;
}
$this->ute->mkFooter(true);
}
}
$test = new TestMarkupVfsfile();
$test->displayAll($markup);
?>