fix diff implementation and test
add domdiff example