svn: /phd/branches/PHD_ENTERPRISE/packages/PHP/ xhtml.php

From: Date: Thu, 06 Aug 2009 03:38:03 +0000
Subject: svn: /phd/branches/PHD_ENTERPRISE/packages/PHP/ xhtml.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-4617@lists.php.net to get a copy of this message
moacir Thu, 06 Aug 2009 03:38:03 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=286863 Log: fixing bug #49123 Bug: http://bugs.php.net/49123 (Assigned) FAQ entries don't have links Changed paths: U phd/branches/PHD_ENTERPRISE/packages/PHP/xhtml.php Modified: phd/branches/PHD_ENTERPRISE/packages/PHP/xhtml.php =================================================================== --- phd/branches/PHD_ENTERPRISE/packages/PHP/xhtml.php 2009-08-06 03:18:49 UTC (rev 286862) +++ phd/branches/PHD_ENTERPRISE/packages/PHP/xhtml.php 2009-08-06 03:38:03 UTC (rev 286863) @@ -1510,7 +1510,7 @@ $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 @@ $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) {

« previous php.doc.cvs (#4617) next »