From: sgunderson@bigfoot.com <> Date: Sat, 26 Apr 2008 17:35:10 +0000 (+0200) Subject: Add our own clone stuff when removing dummy elements, to avoid having PHP5 X-Git-Url: https://git.sesse.net/?p=xml-template;a=commitdiff_plain;h=8f931f29d9d4e95b793856a0f475a51c899d136d Add our own clone stuff when removing dummy elements, to avoid having PHP5 add tons of spurious extra namespace declarations on us. --- diff --git a/php5/xml-template.php b/php5/xml-template.php index 8e53452..46047ff 100644 --- a/php5/xml-template.php +++ b/php5/xml-template.php @@ -139,7 +139,7 @@ function XML_Template_clean($node) while ($node->childNodes->length > 0) { $child = $node->childNodes->item(0); $node->removeChild($child); - $parent->insertBefore($child, $node); + $parent->insertBefore(own_clone_node($child, $doc), $node); } $parent->removeChild($node); }