#! /usr/bin/perl

use strict;
use warnings;
package XML::TemplateSAX::Cleaner;
use base qw(XML::SAX::Base);

sub start_element {
	my ($self, $data) = @_;
	my $attrs = $data->{'Attributes'};

	for my $a (keys %$attrs) {
		if ($attrs->{$a}->{'NamespaceURI'} eq 'http://template.sesse.net/') {
			delete $attrs->{$a};
		}
	}

	$self->SUPER::start_element($data);
}

1;
