cvs: phd(PHD_0_4) / package.xml /formats xhtml.php

From: Date: Sun, 19 Oct 2008 12:56:24 +0000
Subject: cvs: phd(PHD_0_4) / package.xml /formats xhtml.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-2253@lists.php.net to get a copy of this message
bjori Sun Oct 19 12:56:24 2008 UTC Modified files: (Branch: PHD_0_4) /phd package.xml /phd/formats xhtml.php Log: - Add Christian as dev - MFH: Various new elements - MFH: CS+WS

http://cvs.php.net/viewvc.cgi/phd/package.xml?r1=1.74.2.19.2.1&r2=1.74.2.19.2.2&diff_format=u Index: phd/package.xml diff -u phd/package.xml:1.74.2.19.2.1 phd/package.xml:1.74.2.19.2.2 --- phd/package.xml:1.74.2.19.2.1 Sun Oct 19 12:42:22 2008 +++ phd/package.xml Sun Oct 19 12:56:24 2008 @@ -34,6 +34,12 @@ <email>loudi@php.net</email> <active>yes</active> </developer> + <developer> + <name>Christian Weiske</name> + <user>cweiske</user> + <email>cweiske@php.net</email> + <active>yes</active> + </developer> <date>2008-11-01</date> <version> @@ -46,10 +52,24 @@ </stability> <license uri="http://www.opensource.org/licenses/bsd-license.php">BSD Style</license> <notes> - Fixed bug #46094 (and then from now on italic). (Hannes) - Fixed a bug where it was only possible to pass one parameter to phd.bat. (Kalle) - Fixed a bug where it wasn't possible to have paths with spaces in when using phd.bat. (Kalle) - Added PEAR XHTML output. (Rudy) + - Added PEAR XHTML theme. (Rudy, Christian) + - Added support for new elements (Christian) + * glossentry + * glossdef + * glosslist + * important + * paramdef + * personblurb + * phrase + * prompt + * releaseinfo + * spanspec + * qandadiv + - Improved &lt;email&gt; support (now creates mailto: links). (Christian) + - Fixed bug #46094 (and then from now on italic). (Hannes) + - Fixed a bug where it was only possible to pass one parameter to phd.bat. (Kalle) + - Fixed a bug where it wasn't possible to have paths with spaces in when using phd.bat. (Kalle) + - Fixed xhtml validation issue for itemizedlist. (Christian) </notes> <contents> http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.67.2.2&r2=1.67.2.2.2.1&diff_format=u Index: phd/formats/xhtml.php diff -u phd/formats/xhtml.php:1.67.2.2 phd/formats/xhtml.php:1.67.2.2.2.1 --- phd/formats/xhtml.php:1.67.2.2 Sat Aug 23 13:51:13 2008 +++ phd/formats/xhtml.php Sun Oct 19 12:56:24 2008 @@ -1,5 +1,5 @@ <?php -/* $Id: xhtml.php,v 1.67.2.2 2008/08/23 13:51:13 bjori Exp $ */ +/* $Id: xhtml.php,v 1.67.2.2.2.1 2008/10/19 12:56:24 bjori Exp $ */ class XHTMLPhDFormat extends PhDFormat { protected $elementmap = array( /* {{{ */ @@ -38,7 +38,7 @@ 'funcdef' => 'format_suppressed_tags', 'funcsynopsis' => 'div', 'funcsynopsisinfo' => 'pre', - 'function' => 'span', + 'function' => 'span', 'funcprototype' => 'code', 'surname' => 'format_name', 'othername' => 'format_name', @@ -53,6 +53,7 @@ 'calloutlist' => 'format_calloutlist', 'callout' => 'format_callout', 'caution' => 'format_admonition', + 'citation' => 'format_citation', 'citerefentry' => 'span', 'classname' => array( /* DEFAULT */ 'span', @@ -102,10 +103,14 @@ ), 'figure' => 'div', 'filename' => 'var', + 'glossentry' => 'li', + 'glossdef' => 'p', + 'glosslist' => 'ul', 'glossterm' => 'span', 'holder' => 'span', 'imageobject' => 'div', 'imagedata' => 'format_imagedata', + 'important' => 'format_admonition', 'index' => array( /* DEFAULT */ 'div', 'article' => 'format_chunk', @@ -121,7 +126,10 @@ 'indexdiv' => 'dl', 'indexentry' => 'dd', 'initializer' => 'format_initializer', - 'itemizedlist' => 'ul', + 'itemizedlist' => array( + /* DEFAULT */ 'ul', + 'para' => 'format_para_itemizedlist', + ), 'legalnotice' => 'format_legalnotice_chunk', 'listitem' => array( /* DEFAULT */ 'li', @@ -149,7 +157,7 @@ 'classsynopsisinfo' => 'format_classsynopsisinfo_oointerface', ), 'interfacename' => 'span', - 'option' => 'span', + 'option' => 'span', 'orderedlist' => 'ol', 'para' => array( /* DEFAULT */ 'p', @@ -158,6 +166,7 @@ 'footnote' => 'format_footnote_para', 'refsect1' => 'format_refsect1_para', ), + 'paramdef' => 'format_suppressed_tags', 'parameter' => array( /* DEFAULT */ 'format_parameter', 'methodparam' => 'format_methodparam_parameter', @@ -165,11 +174,14 @@ 'part' => 'format_container_chunk', 'partintro' => 'div', 'personname' => 'format_personname', + 'personblurb' => 'div', + 'phrase' => 'span', 'preface' => 'format_chunk', 'primaryie' => 'format_suppressed_tags', 'procedure' => 'format_procedure', 'productname' => 'span', 'programlisting' => 'format_programlisting', + 'prompt' => 'span', 'propname' => 'span', 'property' => array( /* DEFAULT */ 'span', @@ -188,6 +200,7 @@ 'refsynopsisdiv' => 'div', 'refname' => 'h1', 'refnamediv' => 'div', + 'releaseinfo' => 'div', 'replaceable' => 'span', 'row' => 'format_row', 'screen' => 'format_screen', @@ -212,6 +225,7 @@ 'entry' => 'span', 'example' => 'format_example_content', ), + 'spanspec' => 'format_suppressed_tags', 'step' => 'format_step', 'superscript' => 'sup', 'subscript' => 'sub', @@ -267,6 +281,7 @@ 'xref' => 'a', 'year' => 'span', 'quote' => 'format_quote', + 'qandadiv' => 'div', 'qandaset' => 'div', 'qandaentry' => 'dl', 'question' => 'dt', @@ -277,6 +292,7 @@ 'affiliation' => 'format_suppressed_text', 'contrib' => 'format_suppressed_text', 'shortaffil' => 'format_suppressed_text', + 'titleabbrev' => 'format_suppressed_text', 'programlisting' => 'format_programlisting_text', 'alt' => 'format_alt_text', 'modifier' => array( @@ -318,6 +334,7 @@ ), ), 'literal' => 'format_literal_text', + 'email' => 'format_email_text', ); @@ -355,7 +372,7 @@ "tablefootnotes" => array( ), ); - + public function __construct(array $IDs) { parent::__construct($IDs); } @@ -400,7 +417,7 @@ /* Suppress any content */ return ""; } - + public function format_literal($open, $name, $attrs) { if ($open) { if (isset($attrs[PhDReader::XMLNS_DOCBOOK]["role"])) { @@ -427,7 +444,7 @@ return $this->TEXT($value); } } - + public function format_copyright($open, $name, $attrs) { if ($open) { return '<div class="'.$name.'">&copy; '; @@ -590,12 +607,12 @@ } return "</div>"; } - + public function format_classsynopsis_ooclass_classname_text($value, $tag) { $this->cchunk["classsynopsis"]["classname"] = $value; return $this->TEXT($value); } - + public function format_classsynopsis_methodsynopsis_methodname_text($value, $tag) { $value = $this->TEXT($value); if ($this->cchunk["classsynopsis"]["classname"] === false) { @@ -615,7 +632,7 @@ } return $method; } - + public function format_fieldsynopsis($open, $name, $attrs) { $this->cchunk["fieldsynopsis"] = $this->dchunk["fieldsynopsis"]; if ($open) { @@ -805,6 +822,12 @@ } return ")</span>"; } + public function format_para_itemizedlist($open, $name, $attrs) { + if ($open) { + return "</p>\n<ul>\n"; + } + return "</ul>\n<p class=\"para\">"; + } public function format_segmentedlist($open, $name, $attrs) { $this->cchunk["segmentedlist"] = $this->dchunk["segmentedlist"]; if ($open) { @@ -1035,9 +1058,9 @@ public function format_tgroup($open, $name, $attrs) { if ($open) { PhDFormat::tgroup($attrs[PhDReader::XMLNS_DOCBOOK]); - return "<colgroup>\n"; + return ''; } - return "</colgroup>\n"; + return ''; } private function parse_table_entry_attributes($attrs) { $retval = 'align="' .$attrs["align"]. '"'; @@ -1088,7 +1111,11 @@ public function format_th_entry($open, $name, $attrs) { if ($open) { $colspan = PhDFormat::colspan($attrs[PhDReader::XMLNS_DOCBOOK]); - return '<th colspan="' .((int)$colspan). '">'; + if ($colspan == 1) { + return '<th>'; + } else { + return '<th colspan="' .((int)$colspan). '">'; + } } return '</th>'; } @@ -1107,7 +1134,7 @@ } /* - * "colspan" is *not* an standard prop, only used to overwrite the + * "colspan" is *not* an standard prop, only used to overwrite the * colspan for <footnote>s in tables */ if (isset($props["colspan"])) { @@ -1118,7 +1145,10 @@ $rowspan = PhDFormat::rowspan($dbattrs); $moreattrs = self::parse_table_entry_attributes($dbattrs); - return $retval. '<td colspan="' .((int)$colspan). '" rowspan="' .((int)$rowspan). '" ' .$moreattrs. '>'; + + $sColspan = $colspan == 1 ? '' : ' colspan="' .((int)$colspan) . '"'; + $sRowspan = $rowspan == 1 ? '' : ' rowspan="' .((int)$rowspan). '"'; + return $retval. '<td' . $sColspan . $sRowspan . ' ' . $moreattrs. '>'; } return "</td>"; } @@ -1126,6 +1156,17 @@ public function admonition_title($title, $lang) { return '<b class="' .(strtolower($title)). '">' .($this->autogen($title, $lang)). '</b>'; } + + public function format_citation($open, $name, $attrs, $props) { + if ($open) { + return '[<span class="citation">'; + } + return '</span>]'; + } + + public function format_email_text($value) { + return '&lt;<a href="mailto:' . $value . '">' . $value . '</a>&gt;'; + } } /*
« previous php.doc.cvs (#2253) next »