From e3e26f1944e636fa7677a111496612a5c8ac9bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Sat, 14 Dec 2024 11:39:25 -0300 Subject: [PATCH 1/3] XML fragments fixups --- configure.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/configure.php b/configure.php index 3519a63a0..0eb73106a 100755 --- a/configure.php +++ b/configure.php @@ -964,7 +964,7 @@ function xinclude_residual( DOMDocument $dom ) $fixup = ""; break; case "refsect1": - $fixup = ""; + $fixup = "[failed xi:xinclude]"; break; case "tbody": $fixup = ""; @@ -980,9 +980,12 @@ function xinclude_residual( DOMDocument $dom ) if ( $fixup != "" ) { $other = new DOMDocument( '1.0' , 'utf8' ); - $other->loadXML( $fixup ); - $insert = $dom->importNode( $other->documentElement , true ); - $node->parentNode->insertBefore( $insert , $node ); + $other->loadXML( "$fixup" ); + foreach( $other->documentElement->childNodes as $otherNode ) + { + $imported = $dom->importNode( $otherNode , true ); + $node->parentNode->insertBefore( $imported , $node ); + } } $node->parentNode->removeChild( $node ); } From ec7a3d8f4f59bfb0afaa4c731ce55b33b85895dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Sat, 14 Dec 2024 12:20:53 -0300 Subject: [PATCH 2/3] Workaround PhD empty title bug --- configure.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.php b/configure.php index 0eb73106a..42aed712b 100755 --- a/configure.php +++ b/configure.php @@ -964,7 +964,7 @@ function xinclude_residual( DOMDocument $dom ) $fixup = ""; break; case "refsect1": - $fixup = "[failed xi:xinclude]"; + $fixup = "_%failed xi:xinclude%"; break; case "tbody": $fixup = ""; From 82b0474cdadb30d650bb27cfd4048fb7cca9c561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Fri, 20 Dec 2024 12:24:21 -0300 Subject: [PATCH 3/3] Issue for empty title workwround. --- configure.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.php b/configure.php index 42aed712b..078c66e53 100755 --- a/configure.php +++ b/configure.php @@ -964,7 +964,7 @@ function xinclude_residual( DOMDocument $dom ) $fixup = ""; break; case "refsect1": - $fixup = "_%failed xi:xinclude%"; + $fixup = "__"; // https://github.com/php/phd/issues/181 break; case "tbody": $fixup = "";