The 1/4" expansion joint should carry from subfloor through the top of the installation. You don't really need the foam gasket when installing ditra or tile, since you can cut account for the expansion joint when cutting. Foam gasket is normally used for self leveling cement to keep it from running up against the perimeter of the room.
_________________________
The top ten reasons to procrastinate:
1.