#### # Functions implementing diff:* processing #### package Gestinanna::XSM::Diff; use Algorithm::Diff (); use Algorithm::Merge (); use base qw(Gestinanna::XSM); our $NS = 'http://ns.gestinanna.org/diff'; sub start_document { return "#initialize diff namespace\n"; } sub end_document { return ''; } sub comment { return ''; } sub processing_instruction { return ''; } sub characters { my ($e, $text) = @_; $e -> append_state('text', $text); return ''; } my %test_types = qw( lt < le <= gt > ge >= eq = ne != ); sub start_element { my ($e, $node) = @_; my ($tag, %attribs); $tag = $node->{Name}; foreach my $attrib (@{$node->{Attributes}}) { $attribs{$attrib->{Name}} = $attrib->{Value}; } #else { warn("Unrecognised tag: $tag"); #} # [ AND => ( # [ 'name', '=', 'some name' ], # [ OR => ( # [ 'age', '<', '40' ], # [ 'postalcode', '=', '12345' ] # ) # ] # ) # ] return ''; } sub end_element { my ($e, $node) = @_; my $tag = $node->{Name}; return ''; } my $split_regex = qr{ (?: (?