generate markup and value pairs to replace markup into each value respectively