]> git.sesse.net Git - xml-template/commitdiff
Bugfix in attribute handling.
authorsgunderson@bigfoot.com <>
Fri, 11 Aug 2006 22:13:56 +0000 (00:13 +0200)
committersgunderson@bigfoot.com <>
Fri, 11 Aug 2006 22:13:56 +0000 (00:13 +0200)
XML/Template.pm

index 3762fe6fca23f0763301931f5c9bc0b9eb80a541..40611673988b94046cb990395833aabd7fb4209e 100644 (file)
@@ -72,9 +72,11 @@ sub process {
                                        for my $attr ($attrs->getValues) {
                                                next if ($attr->getName =~ /^xmlns(:|$)/);
 
-                                               my ($nsuri, $prefix, $tag) = $nsup->process_attribute_name($attr->getName);
-                                               $id = $attr->getValue;
-                                               $child->removeAttribute($attr->getName) if ($clean);
+                                               my ($nsuri, undef, $tag) = $nsup->process_attribute_name($attr->getName);
+                                               if ($nsuri eq 'http://template.sesse.net/' && $tag eq 'id') {
+                                                       $id = $attr->getValue;
+                                                       $child->removeAttribute($attr->getName) if ($clean);
+                                               }
                                        }
                                }