]> git.sesse.net Git - xml-template/commitdiff
Finally figure out how to remove attributes in PHP.
authorsgunderson@bigfoot.com <>
Sun, 13 Aug 2006 00:07:40 +0000 (02:07 +0200)
committersgunderson@bigfoot.com <>
Sun, 13 Aug 2006 00:07:40 +0000 (02:07 +0200)
php/xml-template.php

index 37f7d653a071f8f84a8d4d836bed400ee4ad8cf5..43132a9af1f369c45f3ab97c47d49203e9170a80 100644 (file)
@@ -42,8 +42,7 @@ function XML_Template_process($node, $obj, $clean = 1)
                                                if ($attr->namespace_uri() == 'http://template.sesse.net/' && $attr->name() == 'id') {
                                                        $id = $attr->value();
                                                        if ($clean) {
-                                                               // FIXME: this won't work since we're not in the right namespace
-                                                               // $child->remove_attribute($attr->name());
+                                                               $attr->unlink_node();
                                                        }
                                                }
                                        }