cvs: phd /formats xhtml.php
| From: | Hannes Magnusson | Date: | Thu, 01 Jan 2009 21:32:56 +0000 |
| Subject: | cvs: phd /formats xhtml.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2904@lists.php.net to get a copy of this message | ||
bjori Thu Jan 1 21:32:56 2009 UTC
Modified files:
/phd/formats xhtml.php
Log:
MFB: validation issue
MFB: formaltable css class
- Fixed typo in dchunk
http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.80&r2=1.81&diff_format=u
Index: phd/formats/xhtml.php
diff -u phd/formats/xhtml.php:1.80 phd/formats/xhtml.php:1.81
--- phd/formats/xhtml.php:1.80 Sun Dec 28 16:22:43 2008
+++ phd/formats/xhtml.php Thu Jan 1 21:32:56 2009
@@ -1,5 +1,5 @@
<?php
-/* $Id: xhtml.php,v 1.80 2008/12/28 16:22:43 bjori Exp $ */
+/* $Id: xhtml.php,v 1.81 2009/01/01 21:32:56 bjori Exp $ */
class XHTMLPhDFormat extends PhDFormat {
protected $elementmap = array( /* {{{ */
@@ -397,7 +397,10 @@
),
"tablefootnotes" => array(
),
- "chunkd_id" => null,
+ "chunk_id" => null,
+ "varlistentry" => array(
+ "listitems" => array(),
+ ),
);
public function __construct(array $IDs) {
@@ -662,14 +665,17 @@
case "methodsynopsis":
case "constructorsynopsis":
case "destructorsynopsis":
+ ++$this->openPara;
return '<p class="'.$name.' rdfs-comment">';
break;
default:
+ ++$this->openPara;
return '<p class="'.$name.'">';
}
}
+ --$this->openPara;
return '</p>';
}
public function format_refsect($open, $name, $attrs) {
@@ -986,6 +992,7 @@
++$this->openPara;
return '<p class="' . $name . '">';
}
+
--$this->openPara;
return '</p>';
}
@@ -1055,13 +1062,19 @@
}
public function format_varlistentry($open, $name, $attrs) {
if ($open) {
- return isset($attrs[PhDReader::XMLNS_XML]["id"]) ? '<dt
id="'.$attrs[PhDReader::XMLNS_XML]["id"]. '">' :
"<dt>\n";
+ return isset($attrs[PhDReader::XMLNS_XML]["id"]) ? '<dt
id="'.$attrs[PhDReader::XMLNS_XML]["id"]. '"
class="varlistentry">' : "<dt
class=\"varlistentry\">\n";
+ }
+
+ // Listitems close the the dt themselfs
+ if ($this->cchunk["varlistentry"]["listitems"] &&
array_pop($this->cchunk["varlistentry"]["listitems"])) {
+ return "";
}
return "</dt>\n";
}
public function format_varlistentry_listitem($open, $name, $attrs) {
if ($open) {
- return "<dd>\n";
+ $this->cchunk["varlistentry"]["listitems"][] = 1;
+ return "</dt><dd class=\"listitem\">\n";
}
return "</dd>\n";
}
@@ -1251,7 +1264,7 @@
public function format_table($open, $name, $attrs, $props) {
if ($open) {
$this->cchunk["table"] = true;
- return '<table class="doctable">';
+ return '<table class="doctable formaltable">';
}
$this->cchunk["table"] = false;
$str = "";