'div', /* Docbook-xsl prints "abstract"... */ 'acronym' => 'acronym', 'article' => 'format_container_chunk', 'author' => 'div', 'authorgroup' => 'div', /* DocBook-xsl prints out "by" (i.e. "PHP Manual by ...") */ 'appendix' => 'format_container_chunk', 'application' => 'span', 'bibliography' => array( /* DEFAULT */ 'div', 'article' => 'format_chunk', 'book' => 'format_chunk', 'part' => 'format_chunk', ), 'book' => 'format_container_chunk', 'chapter' => 'format_container_chunk', 'colophon' => 'format_chunk', 'firstname' => 'span', 'surname' => 'span', 'othername' => 'span', 'honorific' => 'span', 'glossary' => array( /* DEFAULT */ 'div', 'article' => 'format_chunk', 'book' => 'format_chunk', 'part' => 'format_chunk', ), 'caution' => 'div', 'classname' => array( /* DEFAULT */ 'span', 'ooclass' => 'b', ), 'classsynopsis' => 'format_classsynopsis', 'code' => 'code', 'collab' => 'span', 'collabname' => 'span', 'colspec' => 'format_colspec', 'command' => 'span', 'computeroutput' => 'span', 'constant' => 'format_constant', 'constructorsynopsis' => 'format_methodsynopsis', 'emphasis' => 'em', 'enumname' => 'span', 'entry' => array ( /* DEFAULT */ 'format_entry', 'row' => array( /* DEFAULT */ 'format_entry', 'thead' => 'format_th_entry', 'tfoot' => 'format_th_entry', 'tbody' => 'format_entry', ), ), 'envar' => 'span', 'example' => 'div', 'filename' => 'var', 'glossterm' => 'span', 'holder' => 'span', 'index' => array( /* DEFAULT */ 'div', 'article' => 'format_chunk', 'book' => 'format_chunk', 'part' => 'format_chunk', ), 'info' => 'div', 'informalexample' => 'div', 'informaltable' => 'table', 'itemizedlist' => 'ul', 'listitem' => array( /* DEFAULT */ 'li', 'varlistentry' => 'format_varlistentry_listitem', ), 'literal' => 'i', 'mediaobject' => 'div', 'methodparam' => 'format_methodparam', 'methodsynopsis' => 'format_methodsynopsis', 'methodname' => 'format_methodname', 'member' => 'li', 'note' => 'format_note', 'ooclass' => array( /* DEFAULT */ 'span', 'classsynopsis' => 'format_classsynopsis_ooclass', ), 'option' => 'span', 'orderedlist' => 'ol', 'para' => array( /* DEFAULT */ 'p', 'example' => 'format_example_content', ), 'parameter' => array( /* DEFAULT */ 'format_parameter', 'methodparam' => 'format_methodparam_parameter', ), 'part' => 'format_container_chunk', 'partintro' => 'div', 'personname' => 'span', 'preface' => 'format_chunk', 'productname' => 'span', 'programlisting' => 'format_programlisting', 'propname' => 'span', 'property' => 'span', 'proptype' => 'span', 'refentry' => 'format_chunk', 'reference' => 'format_container_chunk', 'refsect1' => 'format_refsect', 'refsect2' => 'format_refsect', 'refsect3' => 'format_refsect', 'refname' => 'h1', 'refnamediv' => 'div', 'row' => 'format_row', 'screen' => 'format_screen', 'sect1' => 'format_chunk', 'sect2' => 'format_chunk', 'sect3' => 'format_chunk', 'sect4' => 'format_chunk', 'sect5' => 'format_chunk', 'section' => 'format_chunk', 'set' => 'format_chunk', 'setindex' => 'format_chunk', 'simplelist' => 'ul', 'simpara' => array( /* DEFAULT */ 'p', 'note' => 'span', 'listitem' => 'span', 'entry' => 'span', 'example' => 'format_example_content', ), 'systemitem' => 'format_systemitem', 'table' => 'format_table', 'term' => 'span', 'tfoot' => 'format_th', 'thead' => 'format_th', 'tgroup' => 'format_tgroup', 'tip' => 'div', 'title' => array( /* DEFAULT */ 'h1', 'example' => 'format_bold_paragraph', 'info' => array( /* DEFAULT */ 'h1', 'example' => 'format_bold_paragraph', ), 'legalnotice' => 'h4', 'note' => 'format_note_title', 'refsect1' => 'h3', 'refsect2' => 'h4', 'refsect3' => 'h5', 'section' => 'h2', 'sect1' => 'h2', 'sect2' => 'h3', 'sect3' => 'h4', 'table' => 'format_bold_paragraph', ), 'type' => 'span', 'userinput' => 'format_userinput', 'variablelist' => 'format_variablelist', 'varlistentry' => 'format_varlistentry', 'varname' => 'var', 'warning' => 'div', 'year' => 'span', ); /* }}} */ protected $textmap = array( ); protected $role = false; public function __construct(array $IDs) { parent::__construct($IDs); } public function __call($func, $args) { if ($args[0]) { trigger_error("No mapper found for '{$func}'", E_USER_WARNING); return "{$args[1]}"; } return "/{$args[1]}"; } public function transformFromMap($open, $tag, $name) { if ($open) { return sprintf('<%s class="%s">', $tag, $name); } return "$tag>"; } public function CDATA($str) { switch($this->role) { case "php": return sprintf('
%s
', $name);
}
return "\n";
}
public function format_systemitem($open, $name, $attrs) {
if ($open) {
$val = isset($attrs[PhDReader::XMLNS_DOCBOOK]["role"]) ? $attrs[PhDReader::XMLNS_DOCBOOK]["role"] : null;
switch($val) {
case "directive":
/* FIXME: Different roles should probably be handled differently */
default:
return sprintf('', $name);
}
}
return "\n";
}
public function format_example_content($open, $name, $attrs) {
if ($open) {
return ''; } return "
';
}
return '"; } public function format_note_title($open, $name, $attrs) { if ($open) { return ''; } return ''; } public function format_bold_paragraph($open, $name, $attrs) { if ($open) { return "'; } return "
"; } return "
"; } public function format_table($open, $name, $attrs) { if ($open) { return '