From 905a64b65fddf521a4806a3885e97fdc7a2bcca4 Mon Sep 17 00:00:00 2001 From: haszi Date: Thu, 13 Jun 2024 21:02:40 +0200 Subject: [PATCH] Remove ReaderKeeper from Generic XHTML format --- phpdotnet/phd/Package/Generic/XHTML.php | 4 ++-- phpdotnet/phd/Render.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/phpdotnet/phd/Package/Generic/XHTML.php b/phpdotnet/phd/Package/Generic/XHTML.php index 6a7dc8e6..b570a531 100644 --- a/phpdotnet/phd/Package/Generic/XHTML.php +++ b/phpdotnet/phd/Package/Generic/XHTML.php @@ -1967,9 +1967,9 @@ public function format_entry($open, $name, $attrs, $props) { } public function format_qandaset($open, $name, $attrs, $props) { if ($open) { - $node = ReaderKeeper::getReader()->expand(); + $xml = "" . $props["innerXml"] . ""; $doc = new \DOMDocument; - $doc->appendChild($node); + $doc->loadXml($xml); $xp = new \DOMXPath($doc); $xp->registerNamespace("db", Reader::XMLNS_DOCBOOK); diff --git a/phpdotnet/phd/Render.php b/phpdotnet/phd/Render.php index e3a17cc3..fc0d829b 100644 --- a/phpdotnet/phd/Render.php +++ b/phpdotnet/phd/Render.php @@ -76,6 +76,7 @@ public function execute(Reader $r) { /* {{{ */ ( $r->name === "type" || $r->name === "classsynopsis" || + $r->name === "qandaset" || in_array($r->name, ["methodsynopsis", "constructorsynopsis", "destructorsynopsis"], true) ) ) {