]> git.sesse.net Git - xml-template/commitdiff
Slightly more insane php5 namespace cloning stuff.
authorsgunderson@bigfoot.com <>
Mon, 21 Apr 2008 19:58:38 +0000 (21:58 +0200)
committersgunderson@bigfoot.com <>
Mon, 21 Apr 2008 19:58:38 +0000 (21:58 +0200)
php5/xml-template.php

index af055917757f63f7902294636b615c15231ab5fe..b6f4041c2cf45ae81435edfa29187594ec2b793b 100644 (file)
@@ -173,8 +173,7 @@ function own_clone_node($node, $doc)
                                if (isset($nsuri)) {
                                        $attr2 = $doc->createAttribute($attr->name);
                                } else {
-                                       $attr2 = $doc->createAttributeNS($nsuri, $attr->name);
-                                       $attr2->prefix = $attr->prefix;
+                                       $attr2 = $doc->createAttributeNS($nsuri, $attr->prefix . ":" . $attr->name);
                                }
                                $attr2->value = $attr->value;
                                $newnode->appendChild($attr2);