sub start_element {
my ($self, $data) = @_;
- my $attrs = $data->{'Attributes'};
-
return if ($data->{'NamespaceURI'} eq 'http://template.sesse.net/');
+
+ # we need to make a copy here, or we'll confuse the upper layers.
+ $data = { %$data };
+ my $attrs = $data->{'Attributes'} = { %{$data->{'Attributes'}} };
+
for my $a (keys %$attrs) {
if ($attrs->{$a}->{'NamespaceURI'} eq 'http://template.sesse.net/') {
delete $attrs->{$a};