#44247 [Asn->Csd]: qandaset related error
| From: | bjori@php.net | Date: | Mon, 03 Mar 2008 12:32:04 +0000 |
| Subject: | #44247 [Asn->Csd]: qandaset related error | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-567@lists.php.net to get a copy of this message | ||
ID: 44247
Updated by: bjori@php.net
Reported By: philip@php.net
-Status: Assigned
+Status: Closed
Bug Type: Doc Build problem
Operating System: Mac
PHP Version: Irrelevant
Assigned To: bjori
New Comment:
This bug has been fixed in CVS. Since the websites are not directly
updated from the CVS server, the fix might need some time to spread
across the globe to all mirror sites, including PHP.net itself.
Thank you for the report, and for helping us make PHP.net better.
Previous Comments:
------------------------------------------------------------------------
[2008-03-03 11:50:55] bjori@php.net
Re-open.
The <qandset /> is producing mismatching opening and closing tags.
------------------------------------------------------------------------
[2008-03-02 11:47:38] bjori@php.net
This bug has been fixed in CVS. Since the websites are not directly
updated from the CVS server, the fix might need some time to spread
across the globe to all mirror sites, including PHP.net itself.
Thank you for the report, and for helping us make PHP.net better.
------------------------------------------------------------------------
[2008-02-25 17:07:54] philip@php.net
Description:
------------
Building via PhD (CVS-FEB25-2008) produces some libxml related errors,
although it still builds. The full output can be found in this
pastebin:
http://pastebin.ca/917717
Partial output will be attached to this bug report. The above pastebin
should be around for about a year.
Note: The FAQ, that uses <qandaset>, appears to build fine.
Reproduce code:
---------------
$ cd /cvs/phpdoc
$ php configure.php
$ phd -d .manual.xml
The code in question:
/* FIXME: This function is a crazy performance killer */
public function qandaset($stream) {
$xml = stream_get_contents($stream);
$old = libxml_use_internal_errors(true);
$doc = new DOMDocument("1.0", "UTF-8");
$doc->preserveWhitespace = false;
$doc->loadXML(html_entity_decode(str_replace("&", "&amp;",
"<div>$xml</div>"), ENT_QUOTES, "UTF-8"));
if ($err = libxml_get_errors()) {
print_r($err);
libxml_clear_errors();
}
fclose($stream);
libxml_use_internal_errors($old);
$xpath = new DOMXPath($doc);
$nlist = $xpath->query("//div/dl/dt");
$ret = '<div class="qandaset"><ol
class="qandaset_questions">';
$i = 0;
foreach($nlist as $node) {
$ret .= '<li><a href="#'
.($this->cchunk["qandaentry"][$i++]).
'">' .($node->textContent). '</a></li>';
}
return $ret.'</ul>'.$xml.'</div>';
}
Actual result:
--------------
Partial result:
Array
(
[0] => LibXMLError Object
(
[level] => 3
[code] => 68
[column] => 0
[message] => StartTag: invalid element name
[file] =>
[line] => 223
)
)
PHP Warning: DOMXPath::query(): Invalid or inclomplete context in
/usr/local/lib/php/phd/themes/php/phpdotnet.php on line 533
Warning: DOMXPath::query(): Invalid or inclomplete context in
/usr/local/lib/php/phd/themes/php/phpdotnet.php on line 533
PHP Warning: Invalid argument supplied for foreach() in
/usr/local/lib/php/phd/themes/php/phpdotnet.php on line 536
Warning: Invalid argument supplied for foreach() in
/usr/local/lib/php/phd/themes/php/phpdotnet.php on line 536
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44247&edit=1