* @license PHP License * @package wb * @subpackage Markup */ WBClass::load('WBString' , 'WBMarkup_Handler_Xml2Xinha' , 'WBMarkup_Handler_Xml2Html'); /** * Markup Scanner Handler: XML2Tex * * Convert Wombat XML data to TeX * * @version 0.1.0 * @package wb * @subpackage Markup */ class WBMarkup_Handler_Xml2Tex extends WBMarkup_Handler_Xml2Html { /** * called right after scan is complete * * @return bool usually true, false to stop the scanner */ public function onScanComplete() { /* foreach (array_keys($this->con) as $con) { // $this->con[$con]->reset(); echo $con . " getclass " . get_class($this->con[$con]) . "
"; } */ return parent::onScanComplete(); } /** * Get patTemplate object * * @return patTemplate */ protected function createPatTemplate() { $obj = WBClass::create('patTemplate'); $obj->setType('tex'); return $obj; } /** * Get File Name Suffix * * @return string */ protected function getPatTemplateSuffix() { return '.tex.tmpl'; } /** * Get Instance of Matching Converter * * Use parent implementation and set template mode to "TeX"; * * @param $ns * @param $tag * @return WBMarkup_Converter */ protected function getConverter($ns, $tag) { $con = parent::getConverter($ns, $tag); if (!$con) { return $con; } $con->setTmplType('tex'); return $con; } }