From: sgunderson@bigfoot.com <> Date: Fri, 11 Aug 2006 22:13:56 +0000 (+0200) Subject: Bugfix in attribute handling. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=9d583ab241aeafaee2a7aa1dfca086a1cb193833;p=xml-template Bugfix in attribute handling. --- diff --git a/XML/Template.pm b/XML/Template.pm index 3762fe6..4061167 100644 --- a/XML/Template.pm +++ b/XML/Template.pm @@ -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); + } } }