I want to find all *.xml files that have a particular DOCTYPE and change the suffix from .xml to .dita.
I can list the files doing this:
find . -type f -name '*.xml' -exec grep --files-with-matches '<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA' {} +
but I'm not clear about piping this into an mv command that will do the desired rename.