From 9d583ab241aeafaee2a7aa1dfca086a1cb193833 Mon Sep 17 00:00:00 2001 From: "sgunderson@bigfoot.com" <> Date: Sat, 12 Aug 2006 00:13:56 +0200 Subject: [PATCH] Bugfix in attribute handling. --- XML/Template.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); + } } } -- 2.39.2