1
0
mirror of https://github.com/php/phd.git synced 2026-03-23 22:52:05 +01:00
This commit is contained in:
Moacir de Oliveira Miranda Júnior
2009-08-06 03:38:03 +00:00
parent a7864f6086
commit 3920471d8d

View File

@@ -1510,7 +1510,7 @@ ul.toc li a:hover {
$questions = $xp->query("//db:qandaentry/db:question");
$xml = '<questions xmlns="' .PhDReader::XMLNS_PHD. '">';
$retval = '<div class="qandaset"><ol class="qandaset_questions">';
foreach($questions as $node) {
$id = $xp->evaluate("ancestor::db:qandaentry", $node)->item(0)->getAttributeNs(PhDReader::XMLNS_XML, "id");
@@ -1519,17 +1519,10 @@ ul.toc li a:hover {
$id = uniqid("phd");
}
$node->setAttribute("xml:id", $id);
$xml .= $doc->saveXML($node);
$retval .= '<li><a href="#'.$id.'">'.htmlentities($node->textContent, ENT_QUOTES).'</a></li>';
}
$xml .= "</questions>";
$r = new PhDReader();
$r->XML($xml);
$render = new PhDRender;
$render->attach($this);
$render->render($r);
$retval .= "</ol></div>";
return $retval;
}
}
public function format_question($open, $name, $attrs, $props) {