Rewrite data-replace handling and add support for data-with
Merge pull request #10 from tvdeyen/fix/data-replace-data-with

Rewrite data-replace handling and add support for data-with